Offer your insights or judgment on the input financial query or topic using your financial expertise. Reply as normal question answering

Frequency of investments to maximise returns (and minimise fees)
Okay, I think I managed to find the precise answer to this problem! It involves solving a non-linear exponential equation, but I also found a good approximate solution using the truncated Taylor series. See below for a spreadsheet you can use. Let's start by defining the growth factors per period, for money in the bank and money invested:   Now, let S be the amount ready to be invested after n+1 periods; so the first of that money has earned interest for n periods. That is,  The key step to solve the problem was to fix the total number of periods considered. So let's introduce a new variable: t = the total number of time periods elapsed So if money is ready to invest every n+1 periods, there will be t/(n+1) separate investments, and the future value of the investments will be:  This formula is exact in the case of integer t and n, and a good approximation when t and n are not integers. Substituting S, we get the version of the formula which explicitly depends on n:  Fortunately, only a couple of terms in FV depend on n, so we can find the derivative after some effort:  Equating the derivative to zero, we can remove the denominator, and assuming t is greater than zero, we can divide by the constant ( 1-G t ):  To simplify the equation, we can define some extra constants:    Then, we can define a function f(n) and write the equation as:  Note that α, β, γ, G, and R are all constant. From here there are two options: Use Newton's method or another numerical method for finding the positive root of f(n). This can be done in a number of software packages like MATLAB, Octave, etc, or by using a graphics calculator. Solve approximately using a truncated Taylor series polynomial. I will use this method here. The Taylor series of f(n), centred around n=0, is:  Truncating the series to the first three terms, we get a quadratic polynomial (with constant coefficients):  Using R, G, α, β and γ defined above, let c0, c1 and c2 be the coefficients of the truncated Taylor series for f(n):    Then,  n should be rounded to the nearest whole number. To be certain, check the values above and below n using the formula for FV. Using the example from the question: For example, I might put aside $100 every week to invest into a stock   with an expected growth of 9% p.a., but brokerage fees are $10/trade.   For how many weeks should I accumulate the $100 before investing, if I   can put it in my high-interest bank account at 4% p.a. until then? Using Newton's method to find roots of f(n) above, we get n = 14.004. Using the closed-form approximate solution, we get n = 14.082. Checking this against the FV with t = 1680 (evenly divisible by each n + 1 tested): Therefore, you should wait for n = 14 periods, keeping that money in the bank, investing it together with the money in the next period (so you will make an investment every 14 + 1 = 15 weeks.) Here's one way to implement the above solution with a spreadsheet. StackExchange doesn't allow tables in their syntax at this time, so I'll show a screenshot of the formulae and columns you can copy and paste: Formulae:  Copy and paste column A: Copy and paste column B: Results:  Remember, n is the number of periods to accumulate money in the bank. So you will want to invest every n+1 weeks; in this case, every 15 weeks.