Home / Course / Module 6 / Backtesting and Demo Trading: Useful, but Not the Real Thing
Module 6 · Lesson 7 of 10Before risking real money, you can test an idea on past prices (backtesting) and in a practice account (demo trading). Both help, but both can mislead you if you ignore their limits.
Risk warning: CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money. Educational content only. Nothing here is a recommendation, and no result is guaranteed.
Backtesting means applying a set of rules to historical prices to see how they would have performed. For example: "buy gold when price closes above its 50-period moving average, with a stop-loss below the last low". You scroll back through past charts, take each trade that the rules would have produced, and record the results.
You can do this by hand on a chart, which is slow but teaches you a lot, or with software that automates the rules. Either way, the idea is to find out whether a method has any evidence behind it before real money is involved.
It is worth doing, but it answers a narrow question: "would these exact rules have worked on this particular past data?" It cannot say they will work in future. Markets change with interest rates, news and who is trading. For ideas on the rules themselves see Gold Trading Strategies.
A backtest is a way to reject bad ideas cheaply. A good backtest does not prove an idea is good, it just fails to prove it is bad.
Treat every backtest result with suspicion until you have checked for the traps below.
Overfitting (also called curve fitting) means tweaking rules until they match the past perfectly. If you try enough combinations of settings, some will look brilliant purely by chance. But they have learned the noise of old data, not a lasting pattern, and usually fail on new prices. Warning signs: many parameters, very precise settings, and a result that collapses when you change a number slightly.
Survivorship bias happens when you only look at what survived. If you study only traders, funds or instruments that are still around, you miss the ones that failed. Online, the "successful traders" you see are those who kept posting. The many who lost money and quit are invisible.
Past charts often show mid or one-sided prices. Real trades pay the spread (the gap between buy and sell price), possible commission and overnight financing charges. A strategy making many small trades can look profitable on paper and lose after costs.
On a past chart you already know what happened next. It is easy to draw a perfect support level after the fact or skip trades that "obviously" would have failed. Rules must be definable before seeing the outcome.
A handful of trades proves little, because luck dominates small samples.
A backtest shows 100 trades with an average gain of 0.8 points per trade before costs, a total of 80 points. The trader assumes zero spread.
Now suppose the real spread averages 0.5 points per trade, plus occasional wider spreads around news.
| Item | Points |
|---|---|
| Gross gain over 100 trades | +80 |
| Spread cost, 100 x 0.5 | -50 |
| Net before slippage | +30 |
If wider spreads and slippage (getting a slightly worse price than expected) add just 0.3 points per trade, that removes another 30 points, leaving zero. A method that looked solid turns into break-even, purely because of costs.
The lesson: always include realistic costs, and be sceptical of ideas that only work with many tiny trades. Our lesson on Gold Trading for Beginners explains how spreads work.
Develop your rules on one stretch of data (the "in-sample" period). Then test them, unchanged, on a different period you have not looked at (the "out-of-sample" period). If performance collapses, the rules were probably overfitted.
A demo account uses virtual money at live or near-live prices. It is excellent for learning your platform, practising order entry and testing a plan. For platform setup, see How to Trade Gold on MT5. But it is not the same as live trading.
| Area | Demo | Live |
|---|---|---|
| Emotions | Little at stake, so little fear or greed | Real money triggers stress, FOMO and hesitation |
| Execution | Orders often fill instantly at the quoted price | Slippage and requotes can happen, especially in fast markets |
| Spreads | May look tighter or steadier | Can widen sharply around news or at quiet times |
| Behaviour | Easy to take reckless trades | Pressure changes decisions, often for the worse |
| Costs | Sometimes not modelled | Spread, commission and overnight charges are real |
The biggest difference is psychological. Many people follow their plan perfectly on demo, then break it on day one of real trading when £50 is actually at risk. Demo results therefore tell you about your method, but much less about your discipline.
A great demo result is not a promise of live profits. Never scale up quickly because "demo worked".
One cautious way to move from idea to real trading looks like this.
Common mistakes: demo trading with an unrealistic balance far bigger than the real one you plan to fund, changing rules mid-test, and treating a short good run as proof.
Testing improves your odds of avoiding obviously bad ideas. It never removes risk, and leveraged CFD trading can lose money quickly.
There is no magic number. Long enough to trade your plan across different market conditions and collect a meaningful number of trades, which is usually weeks rather than days.
Not necessarily. Costs, slippage, changing markets and your own behaviour can all make live results different.
The Gold Desk shares XAUUSD signals on Telegram, with entry, stop loss and targets on every call. Signals are educational ideas, not advice, and no result is guaranteed. Not directed at residents of the USA. Join the free Telegram channel.