Kairotick Get Lite free

Lesson 8 of 9 · 6 min read

Luck or edge: how to read a backtest honestly

By the . Updated .

Run enough tests and some will look great by chance. This lesson uses the course's own results to show how wide the doubt around a win rate is, how many tests it takes to fool you, and five questions to ask of any result.

In this lesson
  1. A win rate is an estimate
  2. What it takes to beat a coin flip
  3. The more you test, the more you find
  4. A worked example: gold's inside bar
  5. Five questions for any backtest
  6. Key takeaways
  7. Questions

Every lesson so far ended with a number: a win rate, an average result, a comparison with random trades. Some of those numbers looked good. This lesson is about whether to believe them.

It matters because most trading mistakes of this kind are not mistakes of arithmetic. The arithmetic is right. The trader simply tested something that looked good by chance and treated it as a discovery.

A win rate is an estimate

If you flip a fair coin 100 times, you will not get exactly 50 heads. A trading pattern is the same. A win rate measured on a few trades is a guess about the true win rate, and the fewer the trades, the rougher the guess.

The table shows how rough. Suppose a pattern won exactly half of its trades. The true win rate could be anywhere in the range shown, with 95% confidence.

How wide the doubt is
TradesWhat a 50% win rate could really be
5036.6% to 63.4%
10040.4% to 59.6%
50045.6% to 54.4%
2,00047.8% to 52.2%

The 95% interval (Wilson) around a 50% win rate. The true rate is very probably inside this range.

A stick figure shakes a handful of dice onto a table, a few land yellow and the rest grey, and the figure raises one eyebrow

With 50 trades, a 50% result could really be 36.6% or 63.4%. Even with 500 trades the range is still 45.6% to 54.4%. You need thousands of trades before a small edge shows.

That is why we printed a 95% range under every win rate in the tables of this course, and why we only called a result clear when the whole range sat above the random trades.

What it takes to beat a coin flip

Turn the table around. How high must a win rate be before the whole range sits above 50%?

What it takes to beat 50%
TradesWin rate needed to clear a coin flip
10060%
20057%
50054.4%
1,00053.1%
2,00052.2%

The lowest win rate whose 95% interval sits wholly above 50%.

With 100 trades you need 60%. With 1,000 you need 53.1%. A pattern that really wins 53% of its trades needs about a thousand of them before you can say so.

This is the most important thing a daily or 4-hour pattern teaches. Most of them produced a few dozen signals in two years, and no result on a few dozen trades can tell luck from edge.

The more you test, the more you find

There is a second problem, and it is the sneakier one. Every test has a small chance of looking good by luck. If you run many tests, you will find some.

In this course we ran 84 tests: seven patterns, four markets, three timeframes. A result is "clear" when the whole 95% range sits above the random trades. If no pattern had any edge at all, that would still happen about one time in forty, which is about 2.1 of the 84 tests.

We saw 8. That is more than luck's share, but not by a margin that proves much, because the tests are not independent: they use the same prices, the same years and the same market moves. And only 2 of the 8 were also above random trades in the same direction as the pattern, the stricter check from lesson 3.

The 8 were: engulfing patterns on USDJPY's 4-hour and daily charts, doji on USDJPY's 4-hour and daily charts, hammers on gold's 1-hour chart, inside bars on gold's 4-hour and daily charts, and the morning star on gold's 4-hour chart. Three of them rest on fewer than sixty trades.

A worked example: gold's inside bar

Lesson 5's gold result was the best-looking one: 55.8% won at 1:1, an average of +0.11R a trade over 503 trades.

How far from zero is that?

A 1:1 trade ends at about +1R or −1R, so one trade's result is roughly 1R away from the average. Over 503 trades, the average result is therefore uncertain by about 0.045R. The measured average is 2.5 times that, and the chance of landing that far from zero by luck alone is about 1.3%.

That looks convincing. But we looked at 84 tests. If every one of them were pure luck, the chance that at least one would look at least this good is roughly 65%.

So even our best result cannot be told apart from the best of 84 lucky ones. The twelve-year check in lesson 5 points the same way: from 2014 to 2023 the same rule lost money after costs.

Five questions for any backtest

  1. How many trades? Under a few hundred, the range around the win rate is too wide. Under a hundred, treat it with great caution.
  2. Against what? Compare with random trades in the same direction and with the same stop, not with zero. A buy rule in a rising market always looks good against zero.
  3. How many things did you try? If the pattern was picked from dozens of ideas or settings, discount the result. Write down how many you ran.
  4. Does it hold in a different period? Split the data. In our tests, every one of the 8 clear results won in both years, which is a good sign. A longer history is better still.
  5. After costs? Spread, commission and swap, on your own broker's prices.

A result that passes all five is still a hypothesis. It becomes more than that only when it keeps working on trades you have not made yet.

Key takeaways

  • A win rate from few trades is a rough guess. With 100 trades, a 50% result could really be 40.4% to 59.6%.
  • To clear a coin flip with confidence you need 60% on 100 trades, but only 53.1% on 1,000.
  • Of 84 tests, 8 looked clear, and luck alone gives about 2.1. Only 2 also beat random trades in the same direction.
  • Gold's inside bar was 2.5 standard errors from zero, but the best of 84 tests will often look that good.
  • Ask five questions of every backtest: how many trades, against what, how many tries, which period, and after which costs.

Questions

How many trades do I need to trust a backtest?

It depends on the edge you are looking for. To show that a 1:1 pattern beats a coin flip you need a win rate of 57% on 200 trades, 54.4% on 500, or 53.1% on 1,000.

What is overfitting?

Choosing a rule because it fit the past well, often after trying many versions. The more versions you try, the more likely the winner is luck. A rule found that way tends to do worse on new data.

How can I tell if a result is luck?

Look at the number of trades, compare with random trades in the same direction, count how many tests you ran, check a second period and include costs. A result that fails any of these is probably luck.

Why compare with random trades and not with zero?

Random trades with the same stop show what the market and the costs give you for free. If a pattern cannot beat them, the pattern is adding nothing.

Is a profitable backtest proof that a strategy works?

No. It is a hypothesis. Our best result, gold's 4-hour inside bar, was profitable from 2024 on and unprofitable from 2014 to 2023.

Kairotick tool

Test your own patterns, not ours.

TradeWarden is an Expert Advisor for MetaTrader 5. Its journal keeps each trade's MAE and MFE, the setup and the note you set on the panel, and a chart picture from when it opened and when it closed, so you can see which of your setups really pay.

Trading carries a high risk of losing money. TradeWarden never opens trades on its own and does not promise a pass.

Candlestick patterns, tested

  1. 1. How to read a candle
  2. 2. Engulfing patterns, tested
  3. 3. Hammers and shooting stars, tested
  4. 4. The doji: indecision or reversal?
  5. 5. Inside bars and breakouts, tested
  6. 6. Morning and evening stars
  7. 7. 1-hour, 4-hour or daily: where costs bite
  8. 8. Luck or edge: reading a test honestly
  9. 9. Test a pattern yourself

Educational content, not financial advice. Trading forex and CFDs carries a high risk of losing money. Examples use round numbers to show the method; check your own broker's contract specifications and your firm's rules.

Data and tools for this

When the high and low of the day form Previous day's high and low, how often they break How often the Asian range breaks Pivot point calculator Fibonacci calculator