Page 1 of 1

Look-Ahead Bias: The Quiet Bug Behind Too-Good Equity Curves

Posted: Tue Oct 27, 2026 3:57 am
by Shadow Trader
Look-ahead bias occurs when a backtest uses information that would not have been available at the decision moment. In coding terms it often hides in small details, such as reading the close of a bar that is still forming, or using a daily high or low in an intraday rule before that day has finished.

Multi-timeframe logic is a frequent culprit. Requesting a higher-timeframe value can return the finished candle of that period in the tester, whereas live trading only sees the partial one. Indicators that repaint, such as certain zigzag or swing-point tools, redraw past values once new data arrives and make historical signals look prescient.

Survivorship bias is a related problem, more common in equities but relevant to forex too. Testing only on pairs, brokers or vendors that are still active and popular ignores the instruments and approaches that failed. Selecting a pair because it performed well in the sample is a milder form of the same selection effect.

Detection methods include running the system bar by bar in a visual mode, truncating data and checking that earlier signals do not change, and comparing live signal logs against backtest output for the same period. Any mismatch deserves investigation before capital is involved.