Monte Carlo simulation in trading: what it shows
By Oalgo · Last reviewed
A Monte Carlo simulation reshuffles and resamples the trades from a backtest many times. It shows a range of possible paths and drawdowns instead of one line. It does not predict which path will happen.
How does a Monte Carlo simulation work?
#- Take the trades from a finished backtest.
- Reshuffle: put the same trades in a new random order, many times. The end point never changes, because the same trades add up to the same total. The path does, and so does the largest fall.
- Resample: build new lists by drawing short runs of trades from the original list, with repeats. Some trades appear twice and some not at all, so the end point changes too.
- Measure every path: its largest fall (drawdown), its win rate and its longest stretch below an earlier high.
- Line the paths up and read the range.
What does a worked example show?
#Twelve made-up trades, in money units, on an account that starts at 1,000: +30, −20, +25, −15, +40, −10, +20, −35, +15, +30, −25, +20. In the order they happened the account ends at 1,075 and its largest fall is 35, from 1,070 to 1,035. Then the simulation reshuffles the same twelve trades 2,000 times.
| Measure | In the real order | In 2,000 reshuffles |
|---|---|---|
| Account at the end | 1,075 | 1,075 every time |
| Largest fall | 35 | Smallest 35, middle 55, largest 105 |
| Reshuffles with a deeper fall than the real order | Not applicable | About 83 in every 100 |
Same trades, same end point. Only the order changed, and with it how far the account fell on the way. No reshuffle had a smaller fall than the real order, so one backtest shows only one of many possible paths.
How does Oalgo show it?
#In Oalgo, the Analytics tab of a finished backtest or forward test has a Monte Carlo card with a Run Monte Carlo button. It needs at least 30 trades and marks runs with fewer than 100 as Low confidence. A table compares your run with the simulated paths at the low end, in the middle and at the high end, and a tag says whether your order was lucky or unlucky. The card says it is built from your past trades and is not a forecast.
What can a Monte Carlo simulation not tell you?
#- It only mixes the trades you already have. If the backtest was tuned to the past (overfitting), every path is too.
- Reshuffling treats each trade as independent. Real trades often come in streaks that depend on the market.
- Few trades give a rough range (see how many trades you need).
- It does not say which path will happen, or what prices will do next.
Read next
- What is drawdown? Maximum drawdown explainedDrawdown is the fall from your account's high point to a later low. See how it is measured, why recovering takes a bigger gain, and how to read it.
- Is backtesting accurate? What it can and cannot tell youA backtest can be exact about the past and still say little about the future. See what it gets right, where real trading differs, and an example of costs.