Strategies & Setups
IntermediateLesson 55 of 70 · 10 min read

Testing a Strategy: Backtesting, Forward-Testing and Sample Size

A setup is only an idea until you have measured it over enough trades; one setup mastered beats five dabbled in.

Prefer bite-sized cards? Use Step by step above to study this lesson one idea at a time, with a quiz at the end.

A setup that sounds logical is still only a hypothesis. Before you trust it, you measure it. There are two stages, and both can be done without risking a cent.

Measure before you trust
HypothesisA setup that sounds logical
BacktestPast charts
Forward-testThe simulator, candle by candle
Both stages can be done without risking a cent.

Backtesting

Backtesting means going through past charts and recording what would have happened if you had followed your rules. Scroll back, move forward one candle at a time, and log every occurrence of the setup, winners and losers alike, as an R-multiple.

It is quick, but it flatters you. With the right-hand side of the chart visible, it is easy to notice only the clean examples (hindsight bias). Fills are imaginary and assume perfect execution. And if you keep adjusting rules until past results look wonderful, you have fitted the rules to old noise (curve-fitting), which will not repeat.

How a backtest flatters you
Hindsight bias
With the right side of the chart visible, you notice only the clean examples.
Imaginary fills
They assume perfect execution.
Curve-fitting
Rules adjusted until the past looks wonderful fit old noise. It will not repeat.

Forward-testing

Forward-testing, also called paper trading, means trading the rules as the candles form, without knowing what comes next. That is exactly what the simulator is for. It tests the strategy and it tests you: whether you spot the setup in real time, hesitate, chase, or break your rules. The journal records every trade and calculates win rate, profit factor, expectancy and average R for you.

Two ways to test
Backtesting
  • Past charts, one candle at a time
  • Log every occurrence in R
  • Quick, but flattering
Forward-testing
  • Candles form live, future unknown
  • Tests the strategy and tests you
  • Spot it, hesitate, chase, break rules?
  • Journal calculates the statistics

Sample size: why ten trades tell you nothing

Short runs are dominated by luck. A strategy that wins 45% of the time will lose five trades in a row fairly often: the chance for any given five trades is 0.55 x 0.55 x 0.55 x 0.55 x 0.55, which is about 5%. Over a hundred trades you should expect to see streaks like that. Judging after ten trades, you might throw away a good strategy or fall in love with a bad one.

What a sample can tell you
  1. 10 tradesAlmost nothing
    This is noise.
  2. 30 tradesA first rough impression
    Do not trust it yet.
  3. 50 to 100A usable estimate
    Of win rate and expectancy for this setup.
  4. 200+Good confidence
    As long as market conditions were varied.
A 45% strategy loses five in a row about 5% of the time: 0.55 x 0.55 x 0.55 x 0.55 x 0.55.
Example · Reading a 60-trade sample
You forward-test the VWAP pullback for 60 simulator trades. You win 27, a win rate of 27 / 60 = 45%. Your average winner is 1.8R and your average loser is 1R. Expectancy = (0.45 x 1.8) - (0.55 x 1) = 0.81 - 0.55 = +0.26R per trade. Over 60 trades that is about 15.6R, or roughly $1,560 at $100 per R, in the simulator. This is encouraging, not proof. Real trading adds commissions, slippage and emotions, all of which reduce the number.
Expectancy calculator
Expected profit per tradeHas an edge
+$35.00

Over 100 trades you would expect to make about $3,500. You lose more often than you win, but your wins are 2× the size of your losses.

Over 100 trades
+$3,500
Reward : risk
2 : 1
Average win ÷ average loss
Break-even
33.3%
Needed · yours 45%
Win / loss split
45 / 55
Out of every 100 trades
One possible run of 100 tradesWhat expectancy predictsBars: each trade · 48 won · 52 lost
Try your own win rate and average win and loss to see whether a set of results has positive expectancy.

One setup mastered beats five dabbled in

Suppose you take 60 trades. Spread across five setups, that is 12 trades each, which is too few to learn anything about any of them. All on one setup, it is a meaningful sample. You also start to recognise that setup's subtle good and bad versions, which is where a real edge tends to come from. Switching strategy after every losing streak resets your sample to zero each time, so you never find out whether anything works.

60 trades: sample size per setup
Spread over 5 setups12 each
All on one setup60

Switching strategy after every losing streak resets the sample to zero.

A test only counts if you followed the rules
If half your trades broke the plan, the statistics describe your impulses, not your strategy. Tag each journal entry as 'followed rules' or 'broke rules' and evaluate the two groups separately.
Tag every journal entry
Followed rules
  • Statistics describe your strategy
Broke rules
  • Statistics describe your impulses
Evaluate the two groups separately.
A realistic first goal
Pick one setup from this module. Take 50 simulator trades with fixed rules and 1R risk on each. Change nothing until the 50 are done. Then read the numbers.
Your first test
  • Pick one setup from this module
  • Take 50 simulator trades with fixed rules
  • Risk 1R on each
  • Change nothing until the 50 are done
  • Then read the numbers

Key takeaways

  • Backtesting on past charts is fast but flattered by hindsight, perfect fills and curve-fitting.
  • Forward-testing in the simulator tests both the rules and your ability to follow them.
  • Fewer than about 50 trades is mostly noise; losing streaks are normal even for a good strategy.
  • Only trades that followed the rules count as evidence about the strategy.
  • Concentrating on one setup builds a meaningful sample and real skill.
Practise this in the simulator

Check your understanding

Score 70% or more to pass the lesson. You can retry as often as you like.

1. Over 60 trades you win 45% of the time, with an average win of 1.8R and average loss of 1R. What is the expectancy?
2. What is curve-fitting?
3. After 8 trades with a new setup you have 6 losses. What is the most reasonable conclusion?
4. Why focus on a single setup when starting out?