In one line. Mistake of using data in a backtest that would not have been available at the time of the decision. Common source of inflated backtest results.
lookahead bias, explained
The error is easy to commit because history files show final, cleaned numbers. A company's annual profit for the year ending in March is stamped 31 March, yet it was published weeks later. In India, listed companies have up to 60 days after year end to publish audited annual results and 45 days for quarterly ones. A test that ranks stocks on 1 April using the full year's profit is using numbers that nobody held on that date.
Other routes include restated financials that replace the first reported figures, index membership lists taken from today rather than from the date being tested, and signals computed on a day's closing price but traded at that same close. The cure is point in time data: each figure is attached to the date it became public, and trades are placed after the signal, usually at the next day's price.
Lookahead errors tend to produce results that look too good to be true: a smooth curve, a very high win rate or a Sharpe ratio far above what live managers achieve. That is the clue to look for. The error is not always large, but it is one directional, always flattering. It differs from survivorship bias, which concerns which companies are in the data, and from overfitting, which concerns how many rules were tried; all three can occur together.
A worked example
An illustration: a rule buys the 10 cheapest stocks by P/E at the start of April, using profit for the year to 31 March. Real profits were published between 15 April and 30 May. A test using the full year profit from 1 April knows results up to two months early. Suppose 2 of the 10 stocks jump 10 percent when strong profits are published in May. The biased test captures those jumps; a correct test, using last year's profit until the new one is public, does not. The effect on an equal weight portfolio is 2 x 10 / 10 = 2 percent.
Common misreadings
- Lookahead bias is not only about knowing future prices; it also arises from future accounting data, later restatements and today's index lists.
- A test that trades at the same close it measured is not harmless: the signal used a price that could not be acted on after it printed.