Lesson 10 of 12 · 10 min

Testing a strategy: backtest, forward test, demo

How to test a strategy in three stages, why 20 or 30 trades prove almost nothing, and how to avoid tuning your rules to the past.

By the end you'll be able to

  • Take a strategy through a backtest, a forward test and small live trading, and say what each stage checks
  • Calculate expectancy in R from a set of test results, before and after costs
  • Explain why small samples and curve fitting make a strategy look better than it is

Free course

Enrol in “Trading Strategies: How the Main Methods Work” to start this lesson

Enrolling is free. Your progress, quiz scores and certificate are kept in your account, on every device.

  • 12 short lessons with quizzes and interactive tools
  • Lesson videos for members
  • A certificate when you finish

You have spotted a setup that worked the last six times it appeared on the chart. Is that an edge, or six lucky coin flips? Until you test it properly, you cannot tell.

Same rules, different luck

Final balance
Worst drawdown
Longest losing streak

Each run uses the same settings with different luck. Run it several times: the shape changes, the drawdowns don't go away.

Every run above uses identical rules: a 40% win rate, winners worth 2R, 1% risk per trade. That is a genuine edge of +0.2R per trade on average. Press “Run 100 trades again” a few times. Some runs finish well up. Others spend most of the 100 trades below the starting balance, with long losing streaks and a deep drawdown.

This is what any test is up against. Every set of results mixes the edge with luck, and over a few dozen trades luck is usually the bigger part. So treat a new strategy as a hypothesis: a claim to be checked, not a fact to be traded.

Three stages, each with one job

1. Backtest. A backtest applies your exact rules to past charts. Scroll back, move forward one candle at a time, and log every trade the rules give you, wins and losses alike, in R. Its main job is to reject bad ideas cheaply. A method that loses on past data rarely improves live.

2. Forward test. A forward test trades the same rules in real time, on a demo account or at tiny size. It adds what a backtest cannot: real spreads, slippage, and your own discipline when the setup appears at an awkward moment.

3. Live at small size. Real money changes how you feel about each trade. Start at a fraction of your normal risk and raise it only once the live results look like the test results.

Move to the next stage only if two things hold: the expectancy in R is still positive after costs, and you actually followed the rules.

Why measure in R

Record each result as a multiple of the amount risked: a full stop is −1R, a 2:1 target is +2R. R lets you compare trades on different pairs, stop sizes and account balances. If R is new to you, see Reward-to-risk ratio.

How many trades is enough?

Fewer than you hope can mislead you. With 20 or 30 trades, a good method and a lucky one look the same. The range of plausible true expectancy narrows only slowly as trades are added: roughly, four times the trades halves its width.

Curve fitting

Curve fitting means tuning settings until the past looks perfect. You try RSI 14, then 11, then add a time filter and a second moving average, until the backtest has no bad months. Those settings have learned the noise in that stretch of data, and the future usually looks worse.

To guard against it: keep the rules few and simple, fix them before you look at results, and keep a later stretch of history you never tune on. If small changes to a setting wreck the results, the edge was probably never there.

Try it

Backtest log

Trades
Win rate
Avg win
Avg loss
Expectancy (R/trade)
Total R
Longest losing streak
Max drawdown (R)

Plausible range of the true expectancy

Your backtest results, in R. The range shows how much the true result could differ from what this sample shows.

Notice how the example’s +0.225R per trade comes with a plausible range from about −0.33R to +0.80R: twenty trades cannot rule out a losing method. A method like this typically needs around 200 trades before the range clears zero. Clear the log and add your own results as you test.

Quick check

Quick check

  1. Question 1 of 4

    What is a backtest best at?

Go deeper: Trading Expectancy: The Number That Says If a Strategy Works · How to Keep a Trading Journal (Template Included) · Forex Demo Accounts: How to Use One Properly

BrokerCut on Telegram

Get the latest forex news and market analysis.

Join the channel