Look-ahead bias and survivorship bias in backtests
Words on this page
- Look-ahead bias
- Letting a test use information that wasn't available on the day a decision was made.
- Survivorship bias
- Testing only on companies that still exist today, so the ones that went bust, were bought or were dropped from an index are missing.
- Index
- A list of companies chosen by rules, such as the S&P 500 (Standard & Poor's index of large American companies). Companies join and leave it over time.
- Backtest
- A replay of trading rules on past prices. Its results are hypothetical.
Look-ahead bias: knowing too soon
A test has look-ahead bias when any decision uses a fact that came later. It hides in small details:
- Trading at a day's closing price on a signal that needed that same closing price to be known.
- Using a company's quarterly figures from the end of the quarter, when they were only published weeks later.
- Using figures that were corrected afterwards, instead of the first numbers people actually saw.
- Choosing the stocks to test because of what they did later - for example, today's best-known companies.
Survivorship bias: forgetting the losers
Take today's list of companies in an index and test a rule on their history, and you have quietly removed every company that failed or shrank out of the index along the way. The rule never had to avoid them, so it looks safer and stronger than it could have been.
The same trap applies to funds and strategies: a list of funds that exist today leaves out the ones that closed, which were usually the weak ones.
How to check a backtest for both
- Ask, for every input, on what day it was known. Trade on the next day's price after a signal, not the same day's.
- Ask where the list of companies came from, and whether it changes over time the way the real index did.
- Testing whole funds - an index fund or a sector fund - avoids most survivorship bias, because a fund's own price history already includes the companies it held at the time, failures included.
- When a test does use a list of companies chosen today, say so next to the result and give it less weight.
Why it matters for the verdict
Luck tests and held-back years can't catch these errors: a biased backtest is wrong in every period, so it can pass every statistical check. The data has to be right first. That is why a careful tool explains what its data includes - and why Signal or noise is a check on luck, not on the data itself.
BasisPoint's bot records analysts' changes to their earnings forecasts day by day, as they happen, so that later tests can use only what was known on each day.
Questions
Which of the two is more common?
Both are common in home-made tests. Survivorship bias is the easier one to fall into, because the free lists of companies most people start from are today's lists.
Does testing funds instead of single companies help?
Yes, for survivorship bias: a fund's price history includes whatever it held at the time. It doesn't help with look-ahead bias, which depends on when your rule uses each piece of information.
Can a luck test catch these errors?
No. A biased test is wrong in every period, so it can look convincing to any statistical check. Fix the data first, then test for luck.
Education only: not investment advice and not a recommendation to buy or sell anything. Facts about BasisPoint checked on November 21, 2026.
