Look-Ahead Bias
Using information you could not have known at the time — the most common way a backtest cheats.
Look-ahead biasUsing information that wasn’t available at the time. is using information in your backtestTesting a trading strategy on historical data. that you could not actually have known at the moment of the trade. It’s the most common and most insidious way a backtestTesting a trading strategy on historical data. cheats — because it’s usually accidental and invisible in the results.
- Classic form — signal from the close, fill at the same close (you couldn’t have known the close in time to trade it).
- Data form — using restated/revised fundamentalsValuing a company from its business and financials. or futureA binding agreement to buy or sell at a set price on a future date. indexA basket of stocks tracked together to represent a market. membership for past dates.
- Why it’s deadly — the leaked futureA binding agreement to buy or sell at a set price on a future date. is known in backtestTesting a trading strategy on historical data., so results look amazing and fail completely live.
- The fix — point-in-time discipline: trade on the next bar’s open, use only data available at that instant.
How do I make sure my backtest has no look-ahead?
Enforce a strict time order: a signal computed from a bar’s data can only trigger a trade on the *next* bar (e.g. signal on today’s close → fill at tomorrow’s open). Use point-in-time data (no restated fundamentals, historical index membership), and be suspicious of any backtest that looks *too* good — a hidden look-ahead leak is the usual culprit.