A backtest tells a single story: the trades in the exact order they happened. Monte Carlo analysis generates thousands of alternative stories from the same ingredients and tells you how bad yours could have been. Here’s how it works, which variants exist and how to read the result without fooling yourself.
What a Monte Carlo simulation is
The Monte Carlo method repeats an experiment many times with random variations and studies the distribution of outcomes. It’s named after the Monaco casino and was developed in the 1940s for physics problems. In trading it answers a specific question: if a strategy’s results had come in a different order, or under slightly different conditions, what would have happened?
Instead of one number (the backtest drawdown), you get a range: the drawdown in the best case, the typical case and a bad case. That range is the useful information.
Why one backtest isn’t enough
Picture a strategy with 200 trades in its backtest. The total profit doesn’t depend on the order, but the drawdown does: if the losses came spread out, the maximum drawdown was moderate; if five of them had come in a row, it would have been much larger. The actual order was one among a huge number of possible ones, and there’s no reason for the future to repeat it.
Monte Carlo doesn’t predict the future. It shows whether the backtest result was a lucky or unlucky sample, and how much margin of error it carries.
Types of Monte Carlo test
| Test | What it does | What it measures |
|---|---|---|
| Reshuffle trades | Shuffles the order of the backtest trades without changing them. | How large the drawdown could have been. Total profit doesn’t change. |
| Resampling (bootstrap) | Builds new series by picking trades at random, with replacement. | Spread of both profit and drawdown. |
| Skip trades | Randomly removes a share of trades (for example 10%). | Whether the result depends on a few very good trades. |
| Vary costs | Randomly applies more spread, slippage or commission. | Whether the edge survives worse execution. |
| Vary parameters | Changes the parameters slightly and reruns the backtest. | Whether the strategy sits in a stable zone or on a fragile peak. |
| Vary the data | Adds small random changes to historical prices. | Whether the strategy depends on exact details of the history. |
The first three manipulate the list of trades and are fast. The last three rerun the backtest under different conditions: they take longer, but they’re the best at catching overfitting.
An example: the 95% drawdown
An example with made-up figures, just to explain the method. A strategy on a €5,000 account has a maximum drawdown of €900 in its backtest. Its trades are reshuffled 1,000 times and the maximum drawdown of each series is recorded:
| Percentile | Maximum drawdown | Reading |
|---|---|---|
| 50% | €1,050 | Half the series had a smaller drawdown than this. |
| 90% | €1,500 | Only one in ten was worse. |
| 95% | €1,700 | Only one in twenty was worse. |
| 99% | €2,150 | One in a hundred was worse. |
Notice that the backtest (€900) sits below the median: the actual order was favourable. If you size your risk on the backtest’s €900, you fall short. Using the 95th percentile, a reasonable reference would be around €1,700, almost double.
How to read the result
- Look at the 95th percentile, not the backtest. It’s a more cautious estimate of the drawdown you may face.
- Compare it with what you can take. If the 95% drawdown exceeds what you’re willing to lose, the lot size is too high for your account.
- Look for stability. In the tests that rerun the backtest (costs, parameters, data), a robust strategy stays profitable in most simulations, even if it makes less.
- Be wary of the extremes. If skipping 10% of the trades makes the profit collapse, the strategy depends on a few lucky trades.
What Monte Carlo can’t tell you
- It starts from the same trades. If the backtest is flawed or overfitted, Monte Carlo shuffles bad data. It doesn’t replace out-of-sample testing or walk-forward analysis.
- It assumes trades are independent. In reality, losses sometimes cluster because the market changes regime, and random shuffling breaks those clusters.
- It can’t see new markets. A kind of move that isn’t in the history doesn’t show up in any simulation either.
- Percentiles aren’t guarantees. “At 95%” means 5% of the simulations were worse, and the future can land there or beyond.
How to do it: MetaTrader 5, spreadsheets and StrategyQuant
The MetaTrader 5 Strategy Tester doesn’t include Monte Carlo analysis. It does let you export the report with every trade, and from there you have two routes:
- Spreadsheet: paste each trade’s result into a column, create several columns in shuffled order (with
RAND()and sort), calculate the maximum drawdown of each and take the percentiles. It’s the simplest way to understand the method. - Strategy-building software: programs such as StrategyQuant X include Monte Carlo tests that both manipulate trades and rerun the backtest with altered costs, parameters or data.
AUREUM used the second route: the two strategies it runs passed Monte Carlo analysis in StrategyQuant as one of the filters in the selection process, before being tested on ten years of market data they hadn’t seen when they were built. You can see the full process in the methodology.
Frequently asked questions
What is Monte Carlo analysis in trading?
A robustness test that generates thousands of random variations of a backtest (changing the order of trades, removing some, or altering costs, parameters or data) to show the range of possible results instead of just one.
What is Monte Carlo used for in a trading strategy?
Mainly to estimate a more cautious maximum drawdown than the backtest’s, and to detect whether the result depends on the order of trades, on a few very good trades, or on exact parameters and costs.
What does the 95% drawdown mean?
It’s the maximum drawdown that 95% of the simulations did not exceed. In other words, only one in twenty simulated series had a worse drawdown. It isn’t a guaranteed limit.
Does MetaTrader 5 have Monte Carlo analysis?
No. The MT5 Strategy Tester doesn’t include it, but it lets you export the report with the trades so you can do it in a spreadsheet or in specialised software.
Does passing Monte Carlo guarantee that a strategy works?
No. Monte Carlo starts from the backtest trades and assumes they’re independent, so it doesn’t catch every problem or market changes that aren’t in the history. It’s one more filter, alongside out-of-sample testing. Past or simulated results do not guarantee future results.
The figures in this article’s examples are made up and only serve to explain the method. Monte Carlo analysis is a simulation on past data: passing it doesn’t guarantee what a strategy will do afterwards. Leveraged gold trading, which on MetaTrader 5 brokers is usually done with CFDs, carries a high level of risk and you can lose some or all of your capital. Past or simulated results do not guarantee future results. This content is educational and is not financial advice.
AUREUM: automated rules on gold, with its backtest published
Software that runs two strategies on XAU/USD in your own MetaTrader 5 account, where every trade opens with its loss and profit limits already calculated. Its 2024–2026 backtest, with both strategies together, is published with its drawdowns: a maximum drawdown of 22.35% across 345 trades. It’s a simulation, not a live account, and trading leveraged CFDs can lose you money.
See the full report →