Backtesting Mistakes That Make Strategies Look Better Than They Are
Repainting, look-ahead bias, unrealistic fills, ignored costs and overfitting: the common errors that inflate backtest results and how to avoid them.
Look-ahead bias and repainting
A strategy that reads information from the future, or from a higher-timeframe bar that has not closed yet, will look excellent on history and fail live. Use only completed bars for multi-timeframe values.
Unrealistic fills
Assuming you always trade at the exact close, or that a stop fills at its exact price after a gap, is optimistic. Model gaps by filling at the open when price jumps through a level, and add slippage.
Ignoring costs
Brokerage, taxes and slippage compound quickly on strategies that trade often. Include them before judging results. A high-frequency strategy can lose its entire edge to costs.
Overfitting
Tuning parameters until the historical curve looks smooth fits the noise of that particular sample. Keep parameters few, prefer round values, and test on a period you did not use when choosing them.
Too few trades
Dozens of trades can look convincing and still be luck. Look for several hundred trades across different market conditions before trusting statistics such as win rate and profit factor.
Ready to try it? Open the backtester and run your strategy on your own candles.
