To predict growth of money in a stock market I try to calculate expected return over a longer timeframe (e.g. 30 years) with a confidence interval. The simple math of taking an average stock market return and calculate the exponential growth from that misses the fact that annual returns (such as S&P) have large fluctuations.
To illustrate: portfolio A sees a few consecutive years of negative returns early in its time, B sees it late in its time. With 'everything else equal', A will have smaller absolute losses but B will have a higher overall value at the end. There is a non-zero chance that any portfolio ends up at zero value just by unlucky timing of the negative years. I expect the 84.2% confidence interval on any portfolio to be huge, and I like to get a better insight into that.
Assuming some simple basic numbers, 9% average annual return +/- 16% (1 sigma), from S&P historic data, and assuming the easiest, most realistic, or most pragmatic distribution for those returns.
The average growth is simple: $c_t = c_0 \cdot (1+g)^t$, with $c_0$ the start capital, $g$ the annual return, and $t$ the number of years.
But how do I calculate the expectation and variance when $g$ is a random variable?
I can do this computationally, see chart below for growth of a starting capital of 1 with the above assumptions. The yellow line uses the average return and disregards yearly fluctuations, the blue ones use randomly drawn annual returns, repeating 10'000 times. Red is the exponent of the mean of the log of the value after n years ($e^{|\ln(c_{n})|}$), i.e. the expectation value. Light red lines are at the 84.2% confidence intervals, i.e. 84.2% of the 10'000 repetitions has a value multiplier larger than 4 after 30 years. Interesting here is that the effective annual gain is only 7.7% when the mean gain is 9%.
Question remains, how do I derive the red lines in a more analytical way?
There is a related question on the product of variances, but, as pointed out in the comments there, VAR$(g * g * g * g *,...)$ would not be independent variables.
There is a related question on the square of a standard normal variable, but it assumes a zero mean and I can't figure out how to generalise the answer to the non-zero mean case.
Then there is a very related question on the variance of powers of a random variable, but it's about the general case where no probability distribution is known a-priori. In the comments of this question an answer is given:
$Var(𝑋^𝑛)=𝔼[𝑋^{2𝑛}]−𝔼[𝑋^𝑛]^2$
To calculate $𝔼[𝑋^p]$ the wikipedia page on moments gets me into Confluent hypergeometric functions, which can be calculated as infinite series. Am I in the right direction? I have the feeling it will not be computeable, should I be looking at another approach?