Singuard Home Blog Contact eTrader eTrader for Businesses eTrader for Traders Broker Broker CRM Live Demo Prop Firm Prop Firm CRM Live Demo
Trading & Markets

Backtesting: Testing an Edge Without Fooling Yourself.

Any rule set can be tuned until the equity curve points up. The work in backtesting is not producing that curve, it is arranging the test so the curve can fail.

By August 4, 2026 7 min read

Give a trader ten years of EURUSD data, four indicators and an afternoon, and they will produce a rising equity curve. That is not a discovery. With enough parameters to turn, a rising curve on past data is guaranteed, because you are describing what already happened rather than predicting what has not. The useful question is narrower: does this rule set still work on data it was never tuned on, once realistic costs are subtracted?

What the test is actually measuring

A backtest replays historical prices and applies your rules to them. Its output is a set of hypothetical trades. It is honest about the sequence of prices and dishonest about almost everything else, because the fills, the spread at the moment of entry, the depth available and the emotional state of the person clicking are all modelled or ignored.

That makes a backtest good at some jobs and bad at others. It is good at rejecting ideas, at showing you how long the losing runs get, and at revealing how sensitive a system is to a single parameter. It is bad at forecasting a return. A trader who treats a passing test as permission to forward test is using it correctly. A trader who treats it as evidence of future profit is not.

The data problem

Most retail tests run on bar data. A one hour bar has an open, high, low and close, and the tester has no idea in which order the high and the low occurred. If your strategy has both a stop and a target inside the range of a single bar, the tester has to guess which one was hit, and the assumption it makes can flip a losing system into a winning one. Any strategy with tight stops needs tick or at least minute resolution, not hourly bars.

Historical feeds usually store bid prices. Your sell orders execute at the bid but your buy orders execute at the ask, so a test that ignores the spread systematically overstates entries. On instruments where the spread is a meaningful fraction of the average move, notably indices and gold, that single omission is enough to explain the whole gap between test and reality. Feeds also carry bad prints, and one spike wick in a data set can create a trade that never existed.

Data from your broker's platform is that broker's own feed, including its markup and its historical outages. A system tested on one feed and traded on another is being tested on a different instrument, and this shows up most on synthetic symbols and CFDs where every provider builds the price slightly differently.

Costs are part of the strategy, not a footnote

Before you look at any result, put the costs in. That means the typical spread for the hours you trade rather than the advertised minimum, commission per side, and a slippage assumption for market and stop orders. Overnight positions also pay or receive swap, which for a system holding for several days can outweigh the trading edge entirely.

The discipline that keeps you honest is to test with costs set higher than you expect. If a system survives a doubled spread assumption and a pessimistic slippage figure, the live result has room to disappoint without going negative. If it only works with perfect fills, it does not work.

Overfitting, and how to notice it

Overfitting is fitting the noise instead of the signal. It is easy to produce and hard to see, because the symptom is an excellent result. Three habits keep it in check.

Count your parameters. Every threshold, period, filter and time window is a degree of freedom, and the more of them you have relative to the number of trades, the more likely the result is an accident. A system with two parameters and four hundred trades is a different proposition from one with eleven parameters and ninety trades.

Look at the neighbours of your chosen setting. If a 20 period average returns a strong result and the 18 and 22 period versions both lose, you have found a fluke in one data set. A real effect degrades gracefully as the parameter moves. Plot the result across the whole parameter range and look for a broad plateau rather than a spike.

Split the data before you start. Reserve a block of history, develop on the rest, and touch the reserved block once. The moment you go back and adjust after seeing the reserved result, it is no longer out of sample and the honest thing to do is reserve a fresh block. Walk forward testing formalises this by rolling the optimisation window forward through the data set repeatedly.

Indicators that lie about the past

Some indicators redraw themselves once a bar completes, so the chart you inspect today shows signals that were never visible in real time. Others reference higher timeframe data in a way that quietly reads the future. A backtest built on either will produce results no live account can reproduce, and the effect is severe rather than marginal. The mechanics and the test procedure are covered in the guide to repainting indicators, and it is worth running that check before any other work on a new system.

From test to live

A passing backtest earns a forward test, not capital. Run the rules on a demo or on a very small live size for a period long enough to include a normal losing run, and log the trades as you would any others. Compare three things against the test: the fill prices, the number of trades taken, and the size of the worst drawdown. Divergence in trade count usually means the rules are less mechanical than you believed and you are exercising judgement without noticing.

Keep the outcome inside the risk framework you already use, because a tested system does not change the arithmetic of position risk or of drawdown. Write the tested rules into your trading plan so the live version and the tested version stay the same thing. Trading is high risk regardless of how thorough the testing was, and no test removes the possibility of loss.

"If you have to hunt for the settings that make it work, you have already been told the answer. A real edge is boring and it shows up on most nearby settings."

— Alex Onta, Executive Director, SINGUARD

Key Takeaways

Frequently Asked Questions

How many trades does a backtest need before the result means anything?

There is no single threshold, but a few dozen trades tells you almost nothing, because one or two outliers can carry the whole result. Traders generally want several hundred trades spread across different market conditions, including at least one trending period and one range period. Sample quality matters as much as sample size: three hundred trades taken in a single year of one regime is a weaker test than two hundred taken across five years.

Why does my backtest look far better than my live results?

The common causes are modelling costs too optimistically, using an indicator that recalculates on historical bars, testing on bar data when the strategy needs tick resolution, and optimising parameters on the same data used to judge the outcome. Each of these inflates the curve on its own, and most disappointing systems suffer from more than one at the same time.

Is a backtest worth doing at all if the data has these limits?

Yes, provided you use it for the right question. A backtest is good at rejecting ideas and at revealing the character of a strategy: how long the losing runs get, how the equity curve behaves in different regimes, how sensitive it is to a parameter change. It is poor at predicting future returns. Treat a passing backtest as permission to forward test, not as evidence of profitability.

Your Own Trading Firm, Live in 24 Hours.

SINGUARD builds the technology behind brokers and prop firms: trading platform, CRM, client portal and payment rails, one bundle, one predictable price. Book a call and see it working, or keep reading the guides.

More in Trading & Markets