Home / Course / Module 6 / Backtesting and Demo Trading: Useful, but Not the Real Thing

Module 6 · Lesson 7 of 10

Backtesting and Demo Trading: Useful, but Not the Real Thing

Before 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.

Intermediate5 min readLast reviewed 26 October 2026

Written by The Gold Desk editorial team. Not reviewed by a regulated financial adviser. Educational content, not financial advice.

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.

Module lessons and contents

After this lesson you will be able to

  • Explain what backtesting and forward testing are.
  • Recognise overfitting, survivorship bias and ignored spreads.
  • Describe how demo trading differs from live trading.
  • Plan a sensible, staged move from testing to small live trading.

What backtesting is

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.

Key idea

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.

Backtesting pitfalls

1. Overfitting

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.

2. Survivorship bias

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.

3. Ignoring spread and costs

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.

4. Hindsight and look-ahead bias

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.

5. Too few trades

A handful of trades proves little, because luck dominates small samples.

How costs change a backtest

Worked example (hypothetical numbers)

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.

ItemPoints
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.

A simple split to reduce overfitting

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.

Demo trading versus live trading

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.

AreaDemoLive
EmotionsLittle at stake, so little fear or greedReal money triggers stress, FOMO and hesitation
ExecutionOrders often fill instantly at the quoted priceSlippage and requotes can happen, especially in fast markets
SpreadsMay look tighter or steadierCan widen sharply around news or at quiet times
BehaviourEasy to take reckless tradesPressure changes decisions, often for the worse
CostsSometimes not modelledSpread, 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.

Warning

A great demo result is not a promise of live profits. Never scale up quickly because "demo worked".

A sensible staged path

One cautious way to move from idea to real trading looks like this.

BacktestRules on past data, with costs
DemoWeeks of forward testing
Small liveTiny size you can afford to lose
ReviewJournal, compare with demo
  • Forward testing on demo means trading the rules in real time without altering them. This avoids hindsight bias because the future really is unknown.
  • Move to live only with money you can afford to lose, at a small size, so that the emotional shock is limited.
  • Compare live results with demo in your journal (see Trading Journal and Review). Expect differences, and investigate them.
  • Do not pay for "proven backtested systems" sold with glossy results. Many are overfitted or invented (see Scams and Red Flags).

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.

Key takeaways

  • Backtesting applies fixed rules to past prices and can only reject weak ideas, not prove strong ones.
  • Overfitting happens when rules are tweaked until they fit old data by chance.
  • Survivorship bias hides the traders and strategies that failed.
  • Spread, slippage and overnight costs can turn a profitable-looking backtest into a loser.
  • Demo trading tests your method and platform skills, but not how you will behave with real money.

Test yourself

Frequently asked questions

How long should I demo trade?

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.

If my backtest is profitable, will I make money live?

Not necessarily. Costs, slippage, changing markets and your own behaviour can all make live results different.

Want trade ideas to practise on?

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.