Survivorship bias is testing only on assets that still exist today, which leaves out the companies that were delisted, went bankrupt or were acquired. Avoid it by testing on the universe as it was on each date, with delisted names and their final prices included, from a data source that keeps them.
Why it inflates results
If you take today's S&P 500 members and backtest them over twenty years, every company in your test is one that survived and grew large enough to be in the index now. The ones that shrank, failed or were bought out are missing. A strategy that buys cheap or falling stocks looks especially good, because the cheap stocks that kept falling to zero have been removed from the data before the test began.
The effect is largest for:
- Long tests on stocks. The longer the history, the more names have dropped out.
- Small caps and value or mean-reversion rules. These buy exactly the companies most likely to be delisted.
- Crypto. Many coins listed a few years ago no longer trade, and free data sets often hold only the live ones.
It matters much less for a single liquid futures contract or currency pair, where the instrument itself does not disappear.
How to avoid it
- Use point-in-time membership. For each date, the universe is the set of assets that were tradable and met your rules on that date, not the set that meets them today.
- Keep delisted assets. Your data needs their full price history up to the last trading day, and ideally the delisting price or return. Commercial sources such as CRSP and Norgate Data sell survivorship-free US stock data for this reason. Most free sources do not include delisted names.
- Treat delisting as a trade outcome. A position held into a delisting should close at the last price, or at zero for a bankruptcy, not vanish from the record.
- Build the universe from rules. "Top 500 by market value at each month end" can be recomputed on any date. A fixed list of tickers cannot.
- Compare. Run the strategy on today's members and on the point-in-time universe. The gap between the two is roughly how much survivorship was adding.
How Reamer Research handles it
Reamer Research runs on the data you give it, so survivorship-free data from your own source runs as it is, delisted names included. You choose the vendor and the universe rules; the engine fills orders and records every trade the same way for each name.
A run spans the time range all its tickers share: each ticker is cut to the latest first bar and the earliest last bar across the run. A universe whose members change over time is therefore tested period by period, with each period's members passed in and the period set with start= and end=:
import reamer_research as rr
for t0, t1, members in periods: # e.g. one per quarter, from your universe file
bars = {t: f'data/{t}.bin' for t in members}
result = rr.backtest(MyRebalance(), bars, start=t0, end=t1)
MyRebalance is your strategy class; the same rule also runs as a function or a configured object. Runs are byte-identical, so the survivorship gap you measure by comparing universes comes only from the data.
Limits to know
- The data is yours to choose. Survivorship-free history comes from your own data source; the kit's fetchers for Alpaca and Databento return the symbols you ask for.
- A changing universe runs as a series of periods. Positions do not carry across periods, which suits strategies that rebalance on a schedule.
A $20 month includes the full kit, so you can test your universe rules on your own data and cancel if it does not fit.