Look-Ahead Bias
Look-ahead bias occurs in backtesting when a model inadvertently uses information that would not have been available at the time of the simulated trade. This typically happens when data points from the future are incorporated into the decision-making process for a past timestamp.
For example, using the closing price of a day to decide whether to buy at the opening of that same day creates an impossible scenario. This bias leads to overly optimistic performance results that cannot be replicated in real-time trading.
To avoid this, backtesting frameworks must strictly enforce a chronological data flow where only information known at the time of the trade is accessible. It is a fundamental error in quantitative finance that invalidates the predictive power of a strategy.
Rigorous code audits are required to ensure that time-series data is aligned correctly.