← Blog

Can you trust your backtest? Walk-forward and Monte Carlo, in plain English

A backtest with a beautiful equity curve proves one thing for certain: your strategy would have worked on the exact past it was built on. That’s it. The honest question is whether it’ll work on a future it hasn’t seen. Two checks get you most of the way there, and neither needs a statistics degree.

Walk-forward. Instead of testing on all your data at once, you slice it into chunks. Tune (or just evaluate) on the first chunk, then measure on the next chunk the strategy never saw. Move the window forward and repeat. If the edge holds up segment after segment — early data, middle data, recent data — it’s probably real. If it only shines on the slice you optimized and falls apart on the rest, you didn’t find an edge, you found a coincidence and named it a strategy. That’s overfitting, and walk-forward is how you catch it.

Monte Carlo. Your backtest is one ordering of your trades — the one that happened. But the order was partly luck. Monte Carlo takes your actual trades and reshuffles them thousands of times, building thousands of alternate equity curves. Now instead of a single final number you get a range: in the unlucky 5% of orderings, how deep was the drawdown? How often did the account end red? That range is what you actually need to size around — because you’ll live one of those orderings, and it might not be the pretty one.

Together they answer two different fears. Walk-forward asks “did I fit to the past?” Monte Carlo asks “how much of my result was luck?” A strategy that survives both isn’t guaranteed to win. But one that survives neither is just a story you told with a chart.

Activate your code →