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