Monte Carlo simulations, kept simple
A clear guide to Monte Carlo simulation for backtests: reshuffle the same trades many times to see a range of outcomes instead of one lucky path. Education only, not advice.
Part of the Backtesting and Research track on Agenticks. About 11 minutes, written for a advanced reader.
A backtest hands you one equity curve: one line that climbs and dips its way to a final number. It is tempting to treat that line as the truth. The problem is that the exact path you got was partly luck. The same trades in a slightly different order would have produced a different ride and a different worst drop. A Monte Carlo simulation is a simple trick that exposes this. It takes the trades you already have and replays them many times in different orders, building not one line but a whole fan of possible lines.
The name sounds intimidating, so set it aside for a second. The idea is just reshuffling. Imagine your backtest produced 200 trades, a mix of wins and losses. Write each trade result on a card. Now shuffle the deck and deal the cards out in a new order, adding them up as you go to draw a fresh equity curve. Shuffle again, draw another. Do that a few thousand times and you have a few thousand equity curves, all made from the exact same wins and losses, just dealt in different sequences.
Same trades, many orders
Monte Carlo keeps your wins and losses fixed and only changes their order. Each reshuffle is a path the same edge could plausibly have taken. The fan of paths shows how much of your single result was the edge and how much was the luck of the sequence.
Why does order matter so much? Because losing streaks cluster differently each time you shuffle. In one ordering, five losers happen to land early, while the account is small and survives. In another ordering, those same five losers land back to back near a high, carving out a much deeper hole. The total profit at the very end is identical, because the same trades are present in every shuffle. What changes is the path: the size of the worst dip, and how long the account spent underwater. Order does not change the destination, but it dramatically changes the trip.
Final profit stays the same, the worst drop does not
Reshuffling the same trades always ends at the same total profit, since no trade is added or removed. But the deepest peak-to-trough fall along the way, the maximum drawdown, swings widely from one ordering to the next. That swing is exactly the risk Monte Carlo is built to reveal.
Once you have the fan of curves, you stop reading single numbers and start reading a range. Take the maximum drawdown from each of the thousands of reshuffled runs and line them all up. Most runs cluster around a typical drawdown. A lucky few barely dip at all. And a worrying tail of runs dig far deeper than the one your original backtest happened to show. That tail is the point. Your single backtest gave you one drawdown figure; Monte Carlo tells you it could realistically have been a lot worse, purely from a different shuffle.
Each faint line is the same trades dealt in a different order. The spread between the best and worst paths is the picture of risk a single equity curve hides.
A useful way to read the output is in percentiles. A common one is the worst five percent of runs. If ninety-five out of a hundred reshuffles stayed inside a 20 percent drawdown but the worst five dug past 35 percent, then 35 percent is the kind of pain you should be prepared for, not the gentle 18 percent your single backtest happened to print. Planning around the friendly middle of the fan is how people get caught out. Planning around the ugly tail is the entire reason to run the simulation.
You run a Monte Carlo by reshuffling the same 200 trades thousands of times. What stays the same across every reshuffle, and what changes? The final total profit stays the same; the maximum drawdown along the way changes Right. No trade is added or removed, so the end profit is fixed. Only the order changes, and order is what decides how deep the worst drawdown gets on each path.
- Reshuffle
- Deal the same trades in a new order to draw a fresh curve
- The fan of curves
- Thousands of paths built from the same wins and losses
- Worst-case tail
- The small share of runs with the deepest drawdowns
- Distribution
- A range of outcomes instead of one single number
Put the steps of a simple trade-reshuffling Monte Carlo in the order you would actually run them.
- Collect the list of trade results from a finished backtest
- Shuffle the trades into a new random order
- Add them up in that order to draw one equity curve
- Repeat thousands of times and collect every result
- Read the range, especially the worst-case tail
Monte Carlo is honest only as far as your inputs are honest. It reshuffles the trades you fed it, so it cannot fix a bad backtest. If your sample size was tiny, reshuffling forty trades just produces a fan of unreliable curves; the simulation looks scientific but the foundation is sand. It also assumes your trades are interchangeable, which understates risk if your real losses tend to cluster in trends or news events rather than scatter randomly. And it never predicts the future, because every card in the deck came from the past.
It stresses a backtest, it does not bless one
Monte Carlo shows the spread of luck inside the trades you already have. It cannot create an edge that was not there, rescue too-small a sample, or forecast tomorrow. Treat it as a stress test on one backtest, never as proof that a strategy will work going forward.
reshuffles range drawdown
Why is the worst-case tail of a Monte Carlo usually the most useful part to read? Because it shows a realistic deep drawdown the single backtest happened to dodge, so you can plan for it Yes. Your one backtest showed one path. The tail reveals how much worse a different, equally plausible ordering could have been, which is what you actually need to survive.
You can read a range, not just one path
Monte Carlo reshuffles the same trades into thousands of orderings. The final profit holds steady while the worst drawdown swings, and reading the worst-case tail tells you the risk a single equity curve hides. It stresses a backtest; it never predicts the future.
Common questions
- What is a Monte Carlo simulation in trading?
- It is a method that takes the trades from a backtest and reshuffles or resamples them many times to build a range of possible equity curves. Instead of one path through history, you see thousands of plausible paths made from the same wins and losses, which shows how much luck shaped the single result you happened to get.
- Why reshuffle trades that already happened?
- The order of your wins and losses was partly luck. The same set of trades in a different order produces a different equity curve and a different worst drawdown. Reshuffling shows the spread of outcomes that the same edge could have produced, so you are not fooled by the one ordering you saw.
- What does Monte Carlo actually tell me?
- It turns a single number into a distribution. Instead of one final profit and one maximum drawdown, you get a range: a typical outcome, a good case, and a bad case. The bad case is the part most people skip, and it is usually the most useful.
- Does Monte Carlo predict the future?
- No. It only reshuffles trades you already have, so it is bounded by your sample and your assumptions. If the underlying edge changes or the sample was too small, Monte Carlo cannot rescue it. It is a way to stress one backtest, not a forecast.
Terms defined in this lesson
Continue
Sources