Home / Wiki / L / Look-Ahead Bias

Look-Ahead Bias

Trading and SpeculationUpdated 15 Nov 2026

Look-ahead bias is an error in the testing of a trading strategy or forecasting model in which the test uses information that would not have been available at the time each decision was supposed to be made. The simulated strategy is, in effect, allowed to see the future. The result is a historical performance that looks better than anything that could have been achieved in real trading.

It is one of the most common flaws in backtesting, alongside survivorship bias and overfitting. It differs from those in being a plain mistake of timing: a piece of data has been stamped with the wrong moment or used one step too early. Because it usually inflates results dramatically, an unusually smooth or profitable backtest is often the first sign of it.

01

How it arises

  • Trading on the bar that generates the signal. A rule computes a signal from the day's closing price and then assumes a trade at that same close, or uses the day's high or low to decide on an entry earlier in the day. In reality the signal is known only after the bar is complete.
  • Fundamental data dated to the period it describes. A company's results for the quarter ending 31 March may be published in May. A database that files them under 31 March lets a backtest trade on earnings six weeks before anyone knew them.
  • Revised data. Economic figures and company accounts are restated. A test that uses today's revised values, instead of the figures first released, uses knowledge that came later.
  • Full-sample statistics. Standardising a signal with the mean and standard deviation of the whole history, or choosing a parameter by fitting to all the data, feeds later observations into earlier decisions.
  • Today's universe. Selecting the current members of an index and testing them over the past uses knowledge of which companies went on to succeed.
  • Adjusted prices. Prices adjusted backwards for a later stock split or dividend differ from the prices that traded at the time, which matters for rules based on price levels.
  • Timestamps. News or data stamped with the time of the event, not the time it reached the market, appears earlier than it truly was.
02

An illustration

Consider a rule that buys a share at the open on any day when its close is higher than its open, and sells at the close. Tested on history, it wins every single time, because the condition for entering already contains the outcome. The error is obvious here, but the same structure can hide inside a long calculation. A less visible case is a strategy that ranks shares each month on growth in earnings per share, using a database keyed to fiscal period ends. Shifting every data item to its actual release date, a step called a point-in-time correction, typically removes much of the apparent profit, since the test had been buying good results before they were announced.

03

Detection

Several signs point to the problem. Returns far above what comparable live strategies earn, a very high Sharpe ratio, or an equity curve with almost no losing periods deserve suspicion. A simple check is to delay every signal by one extra period: a sound strategy usually loses a little performance, while one that depended on leaked information collapses. Another is to truncate the data at an earlier date and recompute the signals for a past day. If they differ from the values computed with the full data, later information is entering the calculation. Comparing backtest results with a period of paper trading or small-scale live trading is the final test.

04

Prevention

The main defence is discipline about time. Each input should carry the moment at which it became known, and the simulation should release it only then. Vendors sell point-in-time databases of fundamentals and index membership for this purpose. An event-driven backtest, which processes data one event at a time in the order it occurred and uses the same code as live trading, makes it structurally harder to peek ahead than a calculation performed on whole columns of data at once.

Signals should be lagged so that orders are placed on the bar after the one that produced them, with realistic assumptions about the price obtained. Parameters and scaling factors should be estimated only on data before each decision date, as in walk-forward optimization. In machine learning, the same rule governs how data are split: test data must lie entirely after training data, and cross-validation schemes must be adapted so that overlapping observations do not leak across the boundary.

05

Newer forms

Models trained on text raise a variant of the problem. A large language model trained on documents up to a recent date has absorbed accounts of how past events turned out. Asking it to judge old news as if in real time can therefore draw on hindsight, even though no future price was supplied directly. Researchers address this by testing only on events after the model's training cut-off, or by using models whose training data end before the test period begins.

Last updated 15 Nov 2026