Gold Signals
عربي

How to backtest a gold strategy honestly

· 2 min read · VIP PIPS IQ

Every strategy looks great in a lucky test. The real question is whether the result repeats. This article shows how to fool yourself less when testing.

Quick answer

A result from 30 trades can miss the true win rate by about ±18 percentage points, and from 300 trades by about ±6. So do not judge a strategy on a small number of trades, include spread, and test on data you did not use for tuning.

Why short results deceive us

Luck plays a big role with few trades. Ten winners in a row can come from an ordinary strategy.

How many trades do you need?

The margin of error on a win rate shrinks as the number of trades grows. The figures are approximate (95% confidence) for a win rate near 50%.

Bar chart of the margin of error when estimating win rate at 30, 100, 300 and 1,000 tradesMargin of error on win rate (±%)30 trades17.9%100 trades9.8%300 trades5.7%1,000 trades3.1%
Approximate margin of error (95%) for a 50% win rate: 1.96 x square root(0.25 ÷ number of trades).

The table

The table shows the margin for win rates of 50% and 40%:

TradesMargin (50% win rate)Margin (40% win rate)
30±17.9%±17.5%
100±9.8%±9.6%
300±5.7%±5.5%
1,000±3.1%±3.0%

Overfitting

If you keep changing settings (like an indicator period) until the past data looks best, you are memorising the past, not discovering a rule. The result usually gets worse on new data.

Common mistakes

Using information from the future by accident (like a candle close before it closes), ignoring spread and slippage, choosing one convenient test period, and forgetting that your broker may fill at a different price.

A better method

Split your data: one part for tuning and one you have not seen for testing. Then run the strategy on a demo account in real time and log results in R with the actual spread.

What about our signals?

The C1b strategy is still being tested, and site figures come from a public data feed without spread. Do not treat them as evidence of future profits, and try them on a demo account first.

Frequently asked questions

How many trades are enough to judge?

There is no magic number, but hundreds of trades are far more reliable than dozens, and the margin of error falls as the count rises.

Is a backtest guaranteed?

No. It is an estimate from the past, markets change, and real execution costs reduce the result.

backtestingstrategy testingsample sizeoverfitting

See live gold signalsEntry, stop loss and two targets for every signal, plus a lot size calculator.

More guides

More articles