How to Backtest a Trading Strategy: A Practical Guide

A step-by-step method for testing rule-based technical strategies on historical data — including the metrics that matter and the biases that make results look better than they are.

How to backtest a strategy, step by step

  1. Write the hypothesis first: State in one sentence what behaviour you're exploiting and why it should persist.
  2. Translate rules into conditions: Turn each rule into an indicator, an operator, a threshold, and a timeframe.
  3. Pick the symbol set and period: Include at least one trend, one range, and one sharp drawdown.
  4. Set the base timeframe and overrides: Define the evaluation cadence and higher-timeframe filters.
  5. Define exits and risk explicitly: Set fixed percentage, ATR-multiple, or condition-based exits.
  6. Run simulation & read setup log: Read individual setups to catch rule bugs before evaluating summary statistics.
  7. Evaluate metrics: Assess win rate, profit factor, max drawdown, and payoff shape.
  8. Stress-test: Shift start dates, nudge parameters, and run cross-symbol tests.