Lesson 12: Backtesting and Forward Testing Basics

Beginner Level

Published: September 18, 2025

Lesson 12: Backtesting and Forward Testing Basics

Learning outcomes: Build a simple test plan, avoid overfitting, and validate with forward testing.

Backtesting tells you if your rules have an edge. Forward testing confirms if that edge survives live conditions.

The goal is to measure consistency, not to find a perfect win rate.

Core concepts

  • Rules must be written before testing.
  • Sample size of 50 to 100 trades improves confidence.
  • Track R distribution, not just win rate.
  • Walk-forward testing reveals robustness.
  • Include spread, slippage, and realistic costs.

Execution framework

  1. Define setup rules and invalidation.
  2. Collect historical data and execute the rules.
  3. Calculate win rate, average R, and drawdown.
  4. Run a forward test on new data.
  5. Refine only after a full sample.

Annotated walkthrough

Example: 60-trade backtest on EURUSD London session.

R histogram
R histogram shows payoff distribution.
Walk forward testing
Walk forward testing validates out-of-sample performance.
  1. Choose one setup and one market.
  2. Log 60 trades using the same rules.
  3. Analyze average R and max drawdown.
  4. Forward test for 20 trades before changing anything.

Common mistakes

  • Curve fitting to perfect past results.
  • Ignoring spread and slippage.
  • Changing rules mid-sample.
  • Stopping after a small sample size.

Checklist

  • Rules written and fixed.
  • Sample size at least 50 trades.
  • Costs included in results.
  • Forward test completed.
  • Results reviewed objectively.

Practice drills

  1. Backtest one setup for 50 trades.
  2. Create an R distribution chart from your data.
  3. Run a forward test for two weeks.

Pro tips

  • Keep testing simple and consistent.
  • Edge is about probability, not certainty.
  • Forward testing is non-negotiable.

Annotated Chart Pack

5+ annotated examples for this topic.

Backtest workflow
Backtest workflow. Document rules before testing.
Backtest pitfalls
Backtest pitfalls. Avoid overfitting and cherry picking.
R multiple histogram
R multiple histogram. Distribution is more important than win rate.
Rolling win rate
Rolling win rate. Track stability across time.
Walk forward test
Walk forward test. Validate out-of-sample performance.

Download the lesson pack for offline study and practice.

Lesson Quiz

Pass mark: 80%

1. Overfitting means:

2. Walk-forward testing is:

3. R distribution helps you see:

4. A reasonable sample size is roughly:

5. A common backtest pitfall is:

Log in to track progress.