Testing a Strategy

Testing tells you how a strategy would have behaved. It is essential — and easy to fool yourself with. This page covers how to test and, more importantly, how to read the results without lying to yourself.

Backtesting#

A backtest runs your strategy against historical market data and reports how it would have performed. It answers "did these rules make sense in the past?" A good backtest models the frictions that real trading has:

  • Fees on every entry and exit.
  • Slippage — the gap between the price you expected and the price you got.
  • Realistic fills — not assuming you always got the perfect price.

A backtest that ignores fees and slippage will look far better than reality.

Reading results honestly#

Look past the headline return. The numbers that tell you whether a strategy is survivable:

  • Maximum drawdown — the deepest peak-to-trough loss. Could you stomach it live?
  • Number of trades — ten trades prove nothing; a few hundred start to mean something.
  • Win rate and reward-to-risk together — a 40% win rate can be very profitable with the right payoff, and a 70% win rate can lose money with the wrong one.
  • Consistency — is the result spread across the whole period, or driven by one lucky stretch?

The curve-fitting trap#

Curve-fitting is tuning a strategy until it looks perfect on past data — and useless on future data. Warning signs:

  • Lots of parameters, each tuned to a suspiciously specific value.
  • Results that fall apart if you change a setting slightly.
  • A strategy that only ever worked in one market during one period.

Guard against it: keep rules simple, prefer strategies that stay robust when you nudge the inputs, and validate on data the strategy wasn't tuned on. A slightly worse backtest that holds up out-of-sample beats a perfect one that doesn't.

Then: paper trade#

A backtest is history. Before real capital, run the strategy forward in paper mode on live data — see Paper Trading and Deploying Live vs Paper.

Ready to put this into practice?Get started