What is look-ahead bias?
Look-ahead bias is the error of letting a backtest or analysis use information that would not have been available at the moment the simulated decision was made. Results built this way look better than anything that could have been achieved in real time, often by a wide margin and usually without any obvious sign that something is wrong.
Key facts
| What it is | Using information that was not available at the moment the simulated decision was made |
|---|---|
| Effect | Results look better than anything that could have been achieved in real time |
| Common sources | Adjusted prices used in price-level rules, and universes built from today’s index members |
| Remedy | Store the time at which each value became known and join on that time |
| In algoseek data | Unadjusted bars in US Equities Daily OHLC, dated factors in US Equities Detailed Adjustment Factors and daily membership lists in Index Components |
What are common examples of look-ahead bias?
The obvious cases are easy to catch, such as using the completed day’s closing price to form a trading decision and assuming execution at that same close, or ranking stocks on earnings figures that were published weeks after the period they describe. An order submitted before the close can legitimately fill at the closing price, as Cboe Market Close orders do, so the error in the first case lies in deciding with a price and then trading at it. The harder cases are buried in the data itself, in values that are correct today but were not known on the date they are stamped with.
How do adjusted prices create look-ahead bias?
Adjusted prices are the most common example. Booking Holdings effected a 25-for-1 stock split on April 2, 2026, and its shares traded at post-split prices from the next session, on April 6. algoseek’s daily bars show those two days very differently depending on whether the prices are adjusted:
US Equities Daily OHLC and Daily OHLC Adjusted · BKNG
| TradeDate | ClosePrice, US Equities Daily OHLC (US1055) | ClosePrice, US Equities Daily OHLC Adjusted (US1010) |
|---|---|---|
| 2026-04-02 | 4194.31 | 166.9485 |
| 2026-04-06 | 176.19 | 175.3248 |
On April 2 the stock closed at $4,194.31 and nobody could have bought it for $167. The adjusted figure divides the price by 25 for a split that had not yet happened, and it also takes out the two dividends that followed in June and September, so it will move again with the next one. For measuring returns that is exactly what adjustment is for, since the split itself creates no gain or loss.
The trouble starts when a rule depends on the level of a price or a volume. A screen for stocks under $200 would have selected Booking throughout March on adjusted data, and a minimum-volume filter would have seen 5,693,775 adjusted shares on April 2 where 227,751 traded in regular hours. Price-level rules belong on unadjusted prices, with adjusted series kept for return calculations.
How does algoseek data keep adjusted and unadjusted prices apart?
algoseek’s data keeps the two apart. The unadjusted bars in US1055 are the prices as they traded, and US Equities Detailed Adjustment Factors (US1005) lists each split and dividend with its effective date and the factor it applies, so a test can adjust a price only for the events that took effect between that price and the date being simulated. For Booking’s close of April 2:
US Equities Detailed Adjustment Factors · BKNG close of April 2, 2026
| Adjusted as of | Event taking effect | April 2 close |
|---|---|---|
| April 2, 2026 | none | 4194.31 |
| April 6, 2026 | 25-for-1 split (factor 0.04) | 167.7724 |
| June 5, 2026 | June dividend (factor 0.99749) | 167.3517 |
| September 11, 2026 | September dividend (factor 0.99759) | 166.9485 |
The table rebuilds each level from the factor records as they stand today, so it shows what each event did to the price and does not establish which versions of those records were available on each historical date.
The last row matches the adjusted close in US1010 to the fourth decimal place, so a test applying the factors date by date uses the same factors as algoseek’s adjusted series. Price-level rules can then run on the price that traded while returns still come from adjusted data.
How does universe selection create look-ahead bias?
Universe selection is the other common source. A strategy tested on today’s members of an index picks up stocks that joined later, often after they had already risen, while the ones that failed are quietly missing. Daily membership lists such as those in US Equities Index Components (US1019) let the universe be rebuilt date by date, allowing for the few days’ delay in recording changes that the dataset’s documentation warns of.
For anyone working with market data, the remedy is the same in each case. Every value a backtest uses needs the time at which it became known stored next to it, and the test has to join on that time rather than on the date the value describes.
Frequently asked questions
-
What is the difference between look-ahead bias and survivorship bias?
+
Look-ahead bias covers any information used before it was known. Survivorship bias is the case in which the universe itself was chosen with later knowledge, so that stocks which failed or left an index are missing from the test.
-
Are adjusted prices safe to use in a backtest?
+
They are the right input for measuring returns, since a split creates no gain or loss. Rules that depend on the level of a price or a volume belong on unadjusted prices.
-
How do you avoid look-ahead bias?
+
Store the time at which each value became known next to the value, and join on that time and not on the date the value describes.