Zum Inhalt springen
Zerotoinvest
DEEN

Backtesting

Backtesting applies rules to past data. The test is only as good as the care taken to rule out the usual sources of error.

1 min read Last checked: 2026-09-05

The idea sounds compelling: take your rules, run them over the last ten years, and see what would have come out. In practice, almost every backtest is too optimistic.

The common mistakes are always the same. You use data that didn't exist yet at the decision point. You test only with companies that still exist today, missing the ones that went bankrupt. You forget fees, spread, and taxes.

The subtlest mistake is your own head. You know the past. If your first test looks bad and you tweak the parameters until it looks good, you haven't tested anything, you've fitted it.

In practice: define the rules completely before you look at the data. Test on one period, and verify on a different one you haven't touched before. And estimate costs generously, not tightly.

Summary

  • Almost every backtest is too optimistic.
  • Fix the rules completely before looking at the data.
  • A test period loses its independence once you reuse it multiple times.

Did you get it?

What is survivorship bias in a backtest?

The dataset only contains stocks that still exist today; the failed ones are missing.

Why are fundamental data problematic?

Because they get corrected after the fact, so today's datasets don't match what was known at the time.

Why isn't a once-separated test period enough?

Because it loses its independence once reused repeatedly.

Related

Where to go from here

Next lessonOverfitting