Backtesting Strategies
Before you risk a dollar, you can test your rules against years of history. Done honestly, a backtest builds real confidence. Done carelessly, it builds a beautiful lie. Here is how to tell the difference.
- What backtesting is and how it pressure-tests an idea
- What a backtest can tell you, and what it cannot
- Why sample size makes or breaks a result
- The overfitting trap, and how forward testing catches it
You have a strategy idea. Before you put real money behind it, you would love to know: has this actually worked before? You can find out, because the market keeps decades of receipts. Running your rules against that history is called backtesting, and it is how serious traders separate a promising idea from a hopeful guess.
Done well, a backtest gives you the confidence to follow your rules when a trade gets uncomfortable. Done carelessly, it produces a gorgeous chart that means nothing and costs you real money. The difference is entirely in how honest you are with yourself, so let me show you how to do it right.
What a Backtest Actually Does
A backtest is simple in concept. You write down your exact rules: when you enter, when you exit, how much you risk. Then you apply those rules to historical data and see how they would have played out, trade by trade, over months or years.
The output is a track record you never had to live through. How often did it win? How much did it make on average? And crucially, how ugly did the worst losing stretch get? That last number, the deepest drawdown, often matters more than the profit, because it tells you whether you could have actually stomached the ride without quitting at the bottom.
Sample Size: One Win Proves Nothing
Here is the first place people fool themselves. A strategy that won eight of its last ten trades feels powerful. It is almost meaningless. Ten trades is far too few to tell skill from luck, the same way flipping eight heads out of ten does not make a coin magic.
A trustworthy backtest needs a large sample size: hundreds of trades, spread across very different market conditions, calm years and crashes, rising markets and falling ones. A strategy that held up through all of that has shown something real. A strategy tested only across one easy bull market has shown you that bull markets are easy. Always ask: how many trades, and through what kinds of markets?
The Big Trap: Overfitting
Now the trap that ruins more backtests than any other: overfitting. This is when you keep tweaking your rules until they fit the past perfectly. Move the exit a little here, add a filter there, adjust the strike just so, and watch the historical results get better and better, until the curve looks flawless.
The problem is that you did not find a better strategy. You memorized the past. Real markets contain a little signal and a lot of random noise, and when you tune your rules to fit every wiggle of history, you are fitting the noise. It is like memorizing the answers to last year's exam: you will ace last year's test and fail this year's, because you learned the answers, not the subject. An overfit strategy looks perfect on history and falls apart the moment real, unseen markets arrive.
The Honest Finish: Forward Test
The cure for fooling yourself is to test on data the strategy has never seen. After a backtest looks promising, you forward test: run the exact same rules on new market data going forward, or trade them on paper for a while, before risking real money. If the edge survives on fresh data, it is far more likely to be real. If it evaporates, you just saved yourself an expensive lesson.
When I was advising clients, backtesting was how they earned the confidence to actually follow their rules when a trade felt scary. But I always warned them about the gorgeous, overfit curve. The strategies that lasted were never the ones that looked perfect on history. They were the simple, slightly boring ones that held up everywhere.
- Use a large sample across many market conditions
- Keep the rules simple and few
- Study the worst drawdown, not just the profit
- Forward test on fresh data before going live
- Judging an edge from a handful of lucky trades
- Tweaking rules until history looks perfect
- Testing only one easy bull market
- Skipping the forward test entirely
- Backtesting applies your exact rules to history to pressure-test an idea.
- It can show a rough edge and the worst drawdown; it cannot predict the future.
- Sample size matters: hundreds of trades across many markets, not a lucky handful.
- Overfitting fits past noise and looks perfect, then fails live.
- Always forward test on fresh data before risking real money.
Pop Quiz
Three quick questions to lock it in. Pick an answer and the explanation shows up right away.
A strategy won 8 of its last 10 backtested trades. What should you conclude?
Ten trades cannot separate skill from luck, like eight heads in ten flips. You need a large sample size across many market conditions to trust a result.
What is overfitting?
Overfitting tunes the rules to every wiggle of history, fitting noise instead of a real edge. It is like memorizing last year's test answers, and it collapses on new data.
What is the best way to confirm a promising backtest is real?
Testing on data the strategy has never seen, by forward testing or paper trading, shows whether the edge survives outside the history you tuned it on.
Bottom Line
Backtesting lets you question your idea before the market charges you tuition for the answer. A good test uses a large sample across many conditions, studies the worst drawdown as closely as the profit, and resists the temptation to tune the rules into a flawless, fragile curve. The strongest strategies are simple, sturdy, and confirmed on fresh data. Test honestly, and your backtest becomes the confidence to follow your plan when it counts.
Next up: Trading Psychology. The best plan in the world is worthless if fear and greed talk you out of it. Next we face the hardest opponent in trading, the one in the mirror, and the mental tools that keep you disciplined.
