Backtesting and overfitting
Risk Management

Backtesting and overfitting

7 cards and 4 quick questions. About 2 min.

The lesson in full

  1. Before risking real money on a rule like “buy when price closes above its 50-day average”, you can test it on the past. That's backtesting.

  2. A backtest shows how often the rule won, the average win and loss, the worst losing streak and the deepest drawdown.

  3. The trap is overfitting: tweaking settings until the rule fits the past perfectly. It has learned the noise, not a real pattern, and fails on new data.

  4. Test properly: build the rule on one period, then check it on data it has never seen, in different markets and conditions.

  5. Always include costs: spreads, commissions, slippage. A rule earning 0.1% per trade before costs loses money if each trade costs 0.15%.

  6. Common mistake

    Mistake: “it worked for 10 years, so it'll work next year.” Markets change. A backtest is evidence, not a guarantee.

  7. Key takeaway

    Test on the past, check on unseen data, include every cost, and keep rules simple.

Quick check

  1. Backtesting is... Testing a rule on past pricesYou see how a rule would have done before risking real money.
  2. Overfitting means... A rule fits the past but fails on new dataTuned too closely to old data, the rule learned noise rather than a real pattern.
  3. To trust a backtest more, test it on... Different markets and periodsA real edge should hold up on data the rule wasn't built on.
  4. A rule earns 0.1% per trade before costs, and each trade costs 0.15%. After costs it... Loses money0.1% − 0.15% = −0.05% per trade. Costs turned a winner into a loser.

Words in this lesson

Risk Management

  1. Your safety exit: stop loss
  2. How much to risk
  3. Risk and reward
  4. Win rate isn't everything
  5. The maths of losses
  6. Staying in the game
  7. Backtesting and overfitting
Practise it now: Stop Loss Sniper Practise it now: Survival Math Practise it now: Martingale Trap