Backtesting: Trusting Your Results
A backtest can prove almost anything if you let it. Learn the biases that produce beautiful, fake equity curves — and how to run a test you can actually trust.
Backtesting is simulating your strategy on historical data to see how it would have performed. Done well, it's the most powerful tool you have. Done badly, it's a machine for generating false confidence.
The three biases that ruin backtests#
1. Lookahead bias#
Using information that wasn't available yet. The classic mistake: acting on a candle's close before that candle has actually closed. Your real-time self never has that luxury.
2. Overfitting#
Tuning parameters until the curve looks perfect on past data. A strategy with ten optimized settings has usually just memorized history — it will fall apart live.
Red flag: the strategy makes $50k with a 14-period setting
and loses money with 13 or 15.
That's not an edge. That's a coincidence you fitted to.
3. Survivorship & cost blindness#
Testing only on assets that still exist, or ignoring spread, commission, and slippage. Real trading has friction. A backtest without costs is a fantasy.
How to run a test you can trust#
- Split your data. Build on one period, validate on another the strategy has never seen (out-of-sample testing).
- Keep it simple. Fewer parameters means fewer ways to fool yourself.
- Model costs generously. If it only works with zero spread, it doesn't work.
- Expect worse live. Real results are almost always below backtested ones. Plan for it.
A good backtest doesn't ask "how much could this have made?" It asks "how badly could this behave, and can I live with that?"
The point#
The goal of backtesting isn't a pretty equity curve — it's an honest estimate of risk. A modest, robust strategy you trust beats a spectacular one you secretly don't.