← Blog
Methodology Jul 6, 2026

Monte Carlo: a distribution instead of a single number

The Monte Carlo method was born in Los Alamos in the 1940s, when Stanisław Ulam and John von Neumann needed to compute things mathematics could not solve head-on — so they let randomness decide, a thousand times over. The name comes from the casino where Ulam's uncle used to lose. Eighty years later it is one of the most honest tools a trader can unleash on a strategy. The principle has not changed: when you cannot trust a single outcome, generate a thousand of them and study the whole distribution.

One history is a sample of size one

Even the most rigorous backtest has one quiet weakness: it runs on a market that happened exactly this way. Yet the specific path of prices is just one of infinitely many versions that “almost happened”. If a few exchange trades had executed a second differently, if one candle's wick had been a tenth of a percent longer — your strategy might have entered elsewhere, a stop-loss might (not) have triggered, and the result could look entirely different.

If a strategy's performance depends on the exact course of one history, you do not have a strategy — you have a bet that the past will repeat itself to the letter. It will not. A statistician would put it plainly: one equity curve is a sample of size one, and you do not build conclusions on a sample of one. How easily a strategy “memorizes” a single history is covered in our article on overfitting.

Markets that almost happened

Monte Carlo simulation attacks that weakness directly: it manufactures markets that never happened but easily could have. We inject controlled noise into historical prices — on the order of tenths of a percent, Gaussian (gentle waves around reality) or uniform (a harsher shake). One craftsmanship detail matters: the noise is applied to each price of the candle separately — open, high, low and close — and a naive perturbation would easily manufacture a candle that cannot exist: an open above the high, a close below the low. That is why the structure of every candle is re-enforced after noising: the high must remain the highest and the low the lowest point, open and close must lie between them — and the bid–ask spread must not fall apart. Only then does the altered market remain a market; otherwise you are not testing robustness, you are testing the strategy's behaviour on data that could never have occurred.

Each synthetic market is a fresh exam: the strategy trades the whole history again, with the same rules and the same parameters. Hundreds to thousands of runs (each with its own random seed, so any run can be reproduced) — and a single number becomes a distribution: a histogram of profits, a fan of equity curves, a distribution of drawdowns.

For completeness: there is a second family of Monte Carlo tests that shuffles the resulting trades instead of the data (their order, resampling) — it mainly probes the sequential risk of drawdowns. The two families complement each other; injecting noise into the data is the stricter one, because the strategy must make fresh decisions on prices it has never seen.

MONTE CARLO — EQUITY FAN CHART 5–95 % 25–75 % MEDIAN ORIGINAL BACKTEST START TIME EQUITY
Hundreds of runs on perturbed data form a fan. What matters is the median, the width of the band — and where the original backtest sits inside it.

What we read from the distribution

  • Median and profit percentiles. The median is a more honest “expected result” than any single backtest. Quartiles (25th–75th percentile) show how far outcomes spread; a 95% interval frames the realistic range.
  • The worst-case boundary (VaR). The 5th percentile of profit — the value only one run in twenty falls below. It answers the question a trader should ask first: how much can I realistically lose?
  • The drawdown distribution. Average and extreme drawdowns across runs. A single backtest shows one drawdown; the distribution shows how bad it can get when worse circumstances line up — never forget the fat tails (we wrote about them).
  • The share of profitable runs. A strategy profitable in 95 runs out of 100 stands on something real. A strategy profitable in 55 out of 100 is a coin flip with better marketing.

The decisive question: where does the original run sit?

The most valuable piece of information in the whole simulation is the position of the original backtest inside the fan. If it sits near the median, the result is a property of the strategy — the exact course of history did not matter. If it sits at the upper edge of the band (or even above it), the real history happened to be exceptionally kind to the strategy — you got lucky with the data, and you should not expect the backtest's performance from the live market. That, by the way, is a classic fingerprint of overfitting: a strategy latched onto the noise of one history falls apart the moment you take that noise away.

Common mistakes

  1. Too few runs. You cannot build a distribution from twenty simulations; percentiles from a tiny sample are noise. Hundreds of runs are the minimum, thousands the standard.
  2. Noise without market logic. Shaking prices without preserving candle structure and spreads manufactures impossible markets — and meaningless results.
  3. Tuning to the simulation. Whoever adjusts parameters until the fan looks pretty is overfitting one floor up — Monte Carlo is an exam, not another training set.
  4. Mistaking it for a forecast. The simulation does not say what the market will do. It says how sensitive your strategy is to the past not repeating itself exactly. That is a different — and more useful — piece of information.

How we work with it

In our testing chain, Monte Carlo is the fourth gate — after the backtest, genetic optimization and walk-forward. We inject controlled noise into prices while preserving candle structure and spreads, every run is reproducible, and we read the results exactly in the order described above: the fan, the median, the percentiles, the worst-case boundary, the drawdown distribution — and the position of the original run within it all. We do not care about the best run. We care about the median and the left tail — because that is where survival is decided. A distribution, not a single number.

Reading History and principle of the method: Monte Carlo method (Ulam, von Neumann, Metropolis). Related articles: Walk-forward analysis, Overfitting and Black swans and Fat Tony.

Want to see the distribution of your strategy's results instead of a single number? Get in touch →