Noon Barbari
S'inscrire
Tous les articles
conceptPublié ·Lecture de 9 min

Monte Carlo backtesting: why one equity curve tells you almost nothing

Your backtest gave you a single path through history. The future will pick a different one. Monte Carlo simulation shows you the whole range of outcomes you should expect — before you risk a dollar.

Sur cette page

A backtest hands you exactly one number for everything: one final return, one max drawdown, one Sharpe. It feels precise. It is not. That single equity curve is one sample drawn from a distribution of outcomes the strategy could plausibly have produced — and the live future will draw a different sample. The question that actually matters is not "what did this strategy do?" but "what is the range of things this strategy could reasonably do?" Monte Carlo simulation is how you answer it.

If you have ever shipped a strategy with a backtested 18% max drawdown and then watched it bleed 31% live, you already met this problem. The backtest wasn't wrong. It just showed you one path, and the path you got to trade was a worse one.

What Monte Carlo actually does

Monte Carlo backtesting takes the raw material of your single backtest — the sequence of trades, or the sequence of bar-by-bar returns — and resamples it thousands of times to build thousands of alternative histories. Each alternative history is just as plausible as the one you actually got. You then look at the distribution of results across all of them: not "the" return, but the 5th, 50th, and 95th percentile return; not "the" drawdown, but how deep drawdowns get in the worst 5% of runs.

The output is no longer a number. It is a confidence interval. "This strategy returns 22% on the median path, but 1 run in 20 loses money, and the 95th-percentile drawdown is 34%." That sentence is something you can actually size a position against.

Two ways to resample

There are two common resampling schemes, and the difference matters. Trade-order resampling shuffles the order of your completed trades. It answers the question "did I just get lucky with the sequence?" — if your strategy made all its money in three trades that happened early, reshuffling will expose that fragility fast. Its weakness: it assumes trades are independent and keeps the exact same set of trades every run.

Return resampling works on the bar-by-bar return series instead, and the honest version of it is the block bootstrap. Instead of drawing single bars at random — which destroys every bit of autocorrelation, trend, and volatility clustering that crypto markets are made of — you draw contiguous blocks of bars and stitch them together. A block length of, say, 24 hourly bars keeps a day of market structure intact while still reshuffling the larger picture.

Stacking the deck against yourself

Resampling history is only half the value. The other half is perturbing the parts of the backtest you know you got slightly wrong. Three perturbations earn their keep:

  • Slippage jitter — on every simulated fill, add a random adverse slippage drawn from a realistic distribution, not the fixed constant your backtest assumed. Real fills are noisy; your simulation should be too.
  • Entry-time jitter — shift entries by a bar or fractions of a bar. A strategy whose edge evaporates when entries move 30 minutes was never trading an edge; it was trading one specific tick.
  • Cost stress — re-run with fees and funding at the high end of what you might actually pay. If the median outcome flips negative, the edge was always inside the cost margin.

A strategy that survives 1,000 runs of resampled history with adverse slippage and jittered entries is a genuinely different kind of object from one that produced a single pretty backtest. The first you can size with conviction. The second you are guessing about.

How to read the distribution

Run the simulation and you get a fan of equity curves and a histogram for each metric. Four reads matter:

  1. The spread. A tight band of outcomes means the result is robust. A fan that ranges from +80% to -40% means your single backtest number was meaningless — you have a coin flip with extra steps.
  2. The downside tail. Look at the 5th-percentile return and the 95th-percentile drawdown. That drawdown is the one you must be able to survive emotionally and financially — not the backtested one.
  3. Probability of loss. If 1 run in 5 ends underwater, the strategy is not ready, regardless of how good the median looks.
  4. Where your real backtest sits. If your actual backtested curve sits up near the 90th percentile of the simulated distribution, you got a lucky draw — plan for the median, not for what you saw.
A typical Monte Carlo summary — 1,000 block-bootstrap reps
Metric              p5        p50       p95
------------------  --------  --------  --------
Total return         -8.4%     22.1%     61.7%
Max drawdown        -41.0%    -19.3%     -9.8%
Sharpe                0.21      0.94      1.62
Prob. of loss: 11.3%  (113 of 1000 runs ended < 0%)

Backtested curve sat at the p88 of the return distribution
-> the live expectation is the p50 (22%), not the 54% you saw.

Monte Carlo vs. walk-forward — you need both

These two tools answer different questions and do not substitute for each other. Walk-forward optimization asks "are my parameters overfit to the past?" by tuning on one window and testing on an unseen next window. Monte Carlo asks "how lucky was the single path I got?" by resampling outcomes. A strategy can pass walk-forward and still fail Monte Carlo because all its profit came from one un-repeatable streak. It can pass Monte Carlo and fail walk-forward because the parameters were curve-fit. Run walk-forward first to earn an honest set of out-of-sample trades, then Monte Carlo those trades.

Doing this in Noon Barbari

The Monte Carlo page runs block-bootstrap resampling with 1,000+ reps, adverse slippage, and entry-time jitter on the same rule set you backtested — no extra configuration, no code. It reports the percentile table above plus the fan-of-curves chart, so you read the range, not a point. Pair it with the walk-forward optimizer for the full validation stack. If you want to follow along, the free tier lets you build and backtest one strategy with no time limit — enough to run your first Monte Carlo and see how wide your "one" equity curve really was.

The takeaway is small and it costs nothing to adopt: stop reading a backtest as a forecast. It is one sample. Resample it honestly, look at the tail, and size for the median — not for the lucky path the past happened to hand you.

Essaie-le sur tes propres données

Chaque concept ci-dessus est implémenté dans la plateforme. Backtest, walk-forward, paper trading, puis passage en live — même jeu de règles à chaque étape.

Lectures associées