How Monte Carlo Simulation Works for Investing, Without Math
How Monte Carlo simulation of monthly investing works: drawing future returns, reading the results, and why the assumptions matter most.
Published · Updated
A Monte Carlo simulation tries thousands of possible futures with random numbers and shows how far the results spread. For a monthly investment plan, it answers "how much will I have in 20 years?" not with one amount but with a range: about this much in the middle, about this much in the worst one in ten. How wide that range is depends heavily on how the future returns were drawn. A simulation is not a forecast; it maps what could happen under the assumptions you give it.
What a fixed rate leaves out
A fixed-rate compound interest calculator grows your money at the same rate every month. At 5% a year that is about 0.41% each month, every month. Under that assumption it makes no difference when a bad year comes or how many months it lasts.
Real markets reach the same 5% average by rising and falling. A big drop in the first few years, while you have put in little, and the same drop in the last few years, when the balance is large, end in very different amounts. A single fixed-rate line cannot show that difference.
The same monthly plan drawn as one fixed-rate line and as eight paths that rise and fall. An illustration, not a simulation result.
A Monte Carlo simulation works in three steps
Decide how monthly returns are drawn: set rules for how much the money grows on average and how much it swings.
Repeat thousands of times: draw each month's return at random under those rules and carry the balance to the end. Each of these futures is called a path. Think of rolling the dice thousands of times.
Read the results as a distribution: line up every path's final balance and read off the middle result, the low results, and the share of paths that reached a goal.
The arithmetic is simple. Whether the results are any good depends almost entirely on the first step.
There are three main ways to draw future returns
From a normal distribution: set only an average and a size of swings, and draw each month independently. It is the simplest method, but very large monthly drops like those real markets have are rare in it, and bad months do not cluster the way they do in real markets. The low results and the falls along the way tend to look too good.
By resampling past months: pick each month at random from the actual monthly returns of the past. Large drops appear as often as they did in history, but shuffling the months breaks up runs such as a crash lasting several months.
By switching between market regimes: move between a calm regime, where prices move gently, and a wild regime, where they swing hard. Once in the wild regime the model tends to stay there for a while, so bad months tend to cluster and stocks are more likely to fall together when markets turn rough. Models like this are known as regime-switching models.
All three are built from past data. What differs is which features of the past they carry into the future.
How to read the results, and two common mistakes
Median: the result in the middle of all the paths. Half end above it and half below. It is closer to a typical outcome than the average, which a few very good paths pull up.
The 10th to 90th percentile band: one path in ten ends below its lower edge, and one in ten above its upper edge. The wider the band, the more the same plan can turn out differently.
Share of paths that reach a goal: for example, "the money lasted in 90% of paths".
Two mistakes are common. The first is to read the median as what will happen: plan on the median and half the paths fall short of it. The second is to read "90%" as the chance that it will happen. It means 90% of the paths in the model did so; change the assumptions and the share changes.
The assumptions change the results most
The return you assume: one percentage point more or less a year makes a large difference to the amount after 20 years.
The period of history: use only a period that happened to go well, and the model assumes the good times continue. The shorter the history, the less certain even the estimate of the average return.
Runs of losses and assets moving together: whether the model lets bad months cluster, and stocks fall together in rough markets, changes how deep the falls along the way go and, to a smaller degree, the low end of the band.
Fees, taxes, inflation and currency: whether they are included changes how much you actually keep.
When you use a simulator, check these assumptions before you look at its numbers.
How compoundsim's simulator does it
The Monte Carlo investment simulator draws 1,000 paths the third way, by switching regimes. Each month it moves, with set probabilities, between a calm regime, where prices move gently, and a wild regime, where they swing hard. In the model fitted to the full history (the S&P 500 since 1993), the S&P 500 in US dollars tends to rise in the calm regime and fall in the wild one. The two regimes look like this:
Measure
Calm regime
Wild regime
Long-run share of months
About 85%
About 15%
Average stay once entered
About 18.6 months
About 3.4 months
S&P 500 volatility (USD, annualized)
About 13%
About 21%
In US dollars, the S&P 500 swings about 1.6 times as much in the wild regime as in the calm one, and once the regime starts it lasts about 3.4 months on average. So some paths take one loss after another and fall a long way before they end.
One path with its wild-regime months shaded gray: in the wild regime, down months are more frequent and larger. An illustration, not a simulation result.
The regime is shared by every asset, and how the assets move together changes with it. A correlation near 1 means two assets move in the same direction; near 0, they move independently.
Correlation with the S&P 500
Calm regime
Wild regime
Developed-market stocks (ex-US)
0.80
0.91
Emerging-market stocks
0.67
0.82
Long-term US Treasuries
-0.04
-0.01
Gold
0.05
-0.07
In the wild regime, US and non-US stocks move together even more closely. You can see the correlation of each pair in the index correlation matrix, and how a mix of assets turns out in the portfolio simulator.
A few more details:
The period of history: you can choose it. Each path uses its own slightly different average returns and chances of switching regime, within what the history can account for; a shorter history leaves more room for those differences, so the band tends to widen. Compare the last 5 years of history with the full history.
The data: apart from Bitcoin, the dividend-adjusted prices of US-dollar ETFs that track each index (SPY for the S&P 500). The ETFs' own expenses are already in those prices.
Currency and inflation: results can be shown in another currency, and by default they then include its swings against the dollar where the site has that currency's exchange-rate history (without it, the funds' dollar returns are used, as if the rate never moved), with the rate's long-run trend taken out since nobody knows whether it will continue. The Real view shows results in today's money, after inflation (2% a year by default).
The random seed: the date (UTC) on which you open the page. Anyone opening it on the same day sees the same results, and opening it again the next day draws 1,000 new paths.
What a Monte Carlo simulation cannot tell you
Markets unlike any before: every method is built from past data, so a kind of market that never happened will not appear.
Slumps that last years: in this site's model the wild regime usually ends within a few months, so a slump like 2007 to 2009 comes up less often than history suggests. The low results may be optimistic.
Taxes and your own costs: taxes and the costs of your account, such as trading fees, are not included.