Backtesting & Trading Systems

Test rules on history without fooling yourself.

  1. What a Backtest Is — A backtest applies a set of trading rules to past prices to see how they would have performed. Here is what a backtest can tell you, what it cannot and how to read the results.
  2. Designing Testable Rules — A rule can be tested only if it is precise enough for a computer to follow. Here is how to turn a vague idea into testable rules, and a dramatic example of how using information you would not have had ruins a test.
  3. Overfitting and Curve Fitting — With enough tweaking, any set of rules can look brilliant on old data. Here is how overfitting happens, why testing many ideas guarantees some lucky winners and how to spot a curve-fit system.
  4. In-Sample vs. Out-of-Sample — The fairest test of a system uses data it was never tuned on. Here is how splitting data into in-sample and out-of-sample periods works, and what happened when we tuned 40 moving-average systems on 2007–2016 and tested them on 2017–2026.
  5. Costs, Slippage & Realism — Small costs add up fast in an active system, and hidden biases can flatter a backtest. Here is how trading costs changed our 200-day results, and the realism checks every test needs.
  6. From Backtest to Live Trading — Going live is the real test, and results almost always come in below the backtest. Here is a step-by-step path from paper trading to real money, and the rules for deciding when a system is broken.