Skip to content
All library documents

Backtesting Pitfalls: Look-Ahead Bias, Overfitting, and Execution Costs

Article FMZ digest · Author: 善

Summary

This chapter explains how backtesting helps validate trading signals, check strategy logic, and uncover implementation defects, while warning that historical simulation is not a forecast of future returns. It describes several ways simulations can misrepresent live trading: unstable signals from unfinished bars, future information embedded in indicators, fills assumed at prices that would not have been available, queue and liquidity constraints, gaps, and extreme events where stop orders may not execute as modeled.

It also covers overfitting to a limited historical sample and survivor bias, using the example of selecting the best result from many tested strategies. Slippage is presented as a practical execution cost that can materially change a backtest, especially for frequent trading; the chapter compares results with and without a small assumed slippage. It recommends checking strategy behavior in simulation before risking capital. The discussion is an introductory warning rather than a complete validation protocol: accurate results still depend on sound data, realistic fills, and independent testing.

Key ideas

  • Backtesting can verify historical signal behavior and expose errors in trading logic.
  • Unfinished-bar signals and indicators that revise past values can create misleading entries.
  • Simulated fills may ignore price gaps, order queues, liquidity limits, and partial execution.
  • Testing many configurations can produce impressive results by chance, creating overfitting and selection bias.
  • Adding slippage can materially reduce simulated performance, especially for frequent strategies.
  • Paper trading can help check implementation, but historical and simulated success do not guarantee future profits.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.