Skip to content
Archive
← r/algotrading
51
91%
u/LucidDion 1 day ago Strategy

Survivorship bias can really wreck a backtest

I ran a little experiment using a Dow 30 rotation strategy. First I backtested it using today's Dow 30 stocks, then ran the exact same strategy using the actual historical Dow components at each point in time. The results were dramatically different. The first backtest looked great, but the historically accurate version was pretty dismal. The animation shows the difference. It's a good reminder of how misleading a backtest can be when you're using today's index constituents to test strategies going back years. Curious how others handle this who backtest using stock index components. Do you use historical constituent data, or just accept survivorship bias as a limitation?
24 comments held Reddit says 18 on reddit ↗
  1. u/irussxx -2 1 day ago
    Ok
  2. u/NS031716 36 1 day ago
    Get out of here with your informative post. But seriously the list of things which can cause backtests to be misleading is very large
  3. u/DiscussionSudden1177 2 1 day ago
    for real, every time you think youve accounted for everything theres another gotcha waiting
  4. u/evendedwifestillnags 5 1 day ago
    I feel people back test completely wrong. Results of backtest don't even really matter much. You can have a high PF or win% but doesn't mean shit. For example we developed one platform where the win% hovers around 36% but it loses little wins huge. I want to stop saying back testing because people build one bot and back test it then go paper then live. Dumb process. You need to develop one strong strategy then run a simulation of it against thousands of its clones vs two different 10 year stretches. Vs. different market condition and universes. Then you can see if it has edge or not. Maybe I'm tired and cranky so I'll see myself out
  5. u/LucidDion OP 5 1 day ago
    Good point - but I'd expand it a little bit. I've found one good strategy is not enough, a good collection of complimentary strategies is preferable in my experience.
  6. u/[deleted] 0 1 day ago

    [deleted] — already gone when the archive first saw it

  7. u/deepfit 1 1 day ago
    Truth!
  8. u/C4ntona 1 1 day ago
    Of course it does. If you do it correctly. Why would you run thousands of clones? Do you want to make money or not? If you find something that works in a market there are reasons for it working and it will probably continue working if you did proper parameter stability tests and not cheating with OOS data. Its like monte-carlo simulations on the trade sequence, when in reality there is path dependency in real markets.
  9. u/settlethis1111 1 1 day ago
    SurvivorSHIP bias? Shouldn’t they call it survivorPLANE bias? Stupid joke aside, I see traders make this mistake all the time.
  10. u/trentard 1 1 day ago
    “strategy i built for 2024+ markets doesn’t work in 1980 markets” in other news water is wet?
  11. u/LucidDion OP 3 1 day ago
    Surprisingly I’ve seen many traders make this mistake. I thought the video captured the mistake in a nice vivid way 🤷‍♂️
  12. u/euroq 3 1 day ago
    This sub is especially full of pricks. They're pissy when people get something wrong and pissy when they offer useful advice.
  13. u/trentard 1 1 day ago
    i’m just here to shitpost so yeah youre not far off bud
  14. u/StatisticalSock 1 1 day ago
    How far back would you say it needs to be profitable for?
  15. u/trentard 1 1 day ago
    depends on the timeframe you pick, the regimes you label & the regime you’re targeting. concrete example: war / crisis adjusted BRENT / AUX algorithm: pick a longer horizon timeframe, I like swings on 4h or 6h with 12h context, model training & research timeframe 2017-2026 but the actual strategy development 2024-2026 e.g the actual macro tape you’re trying to target.
  16. u/steelheaddan 1 1 day ago
    That’s not exactly a good analogy. It’s not about the strategy but about the universe of stocks and looking into the future since if you just use the current SPX,NDX, DOW then you are automatically picking Apple, NVidia, etc before they were known to blow up. It is true that many Strats don’t work on the prior market - as it behaves differently due to all of the FED interventions. But survivorship bias is different than saying Strats today doesn’t work in 1980s markets. In fact many Strats from back then still work today (trend, momentum, mean reversion). There are always a top 5-10 momentum stocks that lift the market, it was oil in the 80s, internet in the 90s, and tech past the 2000 crash. Momentum strats and mean reversion Strats work but you have to use the stocks available at the time or you are looking into the future of only the current winners. Maybe you understand that, but it’s not what you wrote exactly.
  17. u/Dechirure 3 1 day ago
    If you're just testing on a ETF like SPY is that safer?
  18. u/LucidDion OP 1 1 day ago
    Yes I’d say that’s safe.
  19. u/[deleted] 1 1 day ago

    [removed] — already gone when the archive first saw it

  20. u/QuanTradin 2 1 day ago
    point in time constituents, always. today's list doesn't just add the winners, it also drops the names that went to zero or got bought out, so you need the delisted price history as much as the membership dates. Norgate is what most people here use for both.
  21. u/Expert_CBCD 2 1 day ago
    Absolutely critical and has happened to me a few times where I forgot to filter my tickets by the year the year. My set up is fairly low tech on this front of just using the wayback machine to download the list of the tickers at the end of that year and use them for the forward year but if I anything I would argue it’s fairly conservative as it keeps losers that were dropped during the following year and hasn’t added the winners
  22. u/romestamu 2 1 day ago
    I had a live strategy which performed great in back test but kept choosing losers over and over in live trading. Usually the live engine chose the same symbols day after day until they were delisted. Then I realized I didn't train the model with point in time constituents, meaning the model couldn't recognize what a death spiral looks like
  23. u/traderpier 2 1 day ago
    Make sure your price data still has the names that got dropped too. A lot of free sources lose a ticker once it's delisted after a buyout or bankruptcy, so even with the right member list those trades just disappear from the test.
  24. u/Environmental-Movie5 1 1 day ago
    Great experiment! Did you hold the picks with equal weights or by their weight in the index? The Dow is price weighted, so if you compared against it, the benchmark side could be off too.