Get 40% OFF Your First Purchase With Code FIRST40

Trading styles

Backtesting:testing rules on the past.

Backtesting means applying a trading strategy's exact rules to historical price data to see how it would have performed. A fair backtest uses fixed rules, includes commission, spread and slippage, and keeps some data aside to test on afterwards. It shows how rules behaved in the past; it cannot show they will work in future.

How to backtest a strategy

Write the rules down so precisely that someone else would take the same trades: entry, stop, target or exit, position size, and when not to trade. Then step through historical data - manually, bar by bar, or with software - recording every trade the rules produce, including the losing ones.

Record the results in the account's own terms: net PnL, the largest drawdown, the longest losing streak, and the number of trades. A handful of trades is anecdote; most traders look for at least a hundred before drawing conclusions.

The biases that flatter a backtest

Most backtests look better than live trading. The usual reasons:

  • Overfitting - tuning rules until they fit the past, so they describe noise rather than a repeatable effect.
  • Look-ahead bias - using information that was not available at the time of the trade, such as a bar's close before it closed.
  • Ignoring costs - leaving out commission, spread, swap and slippage.
  • Selective samples - testing only on the period where the idea obviously worked.

Out-of-sample testing and forward testing

Keep a block of data aside and test on it only once, after the rules are fixed. If results collapse there, the rules were likely fitted to the first sample. Forward testing - trading the fixed rules on a demo or simulated account in real time - is the next step, because it adds real execution and real decisions. Robustness testing asks whether the result survives small changes: nudge each parameter, try nearby markets and other periods, and see whether the edge holds or collapses.

Step by step

How to identify it

A backtest is worth trusting only if it passes these checks.

  1. The rules were written down before the test and not changed during it.
  2. Commission, spread and slippage are included.
  3. The sample covers different market conditions, including ranges and trends.
  4. Results hold on data kept aside for out-of-sample testing.
  5. The drawdown and losing streak are ones you could actually sit through.

Worked example

The concept,walked through

A backtest that shrinks, described

An illustrative test in words, with no real figures. It is not a record of any strategy.

  1. 1. In-sampleA trader tunes a breakout rule on two years of data and it shows a strong result.
  2. 2. Costs addedAdding commission and a realistic spread removes about half the result.
  3. 3. Out-of-sampleOn a third year kept aside, the rule is roughly breakeven.

The final picture - little or no edge after costs - is the useful one. The first result described the fitting, not the strategy.

Common mistakes

Where tradersgo wrong

Adjusting rules after every losing trade

That fits the past more closely each time and makes the test meaningless.

Testing on too few trades

A small sample can look excellent by chance.

Leaving out costs

Short-term strategies are the most sensitive to them.

Limitations

What it cannottell you

No chart concept predicts price. These are the limits worth keeping in view.

  • Past data cannot include conditions that have not happened yet.
  • Even a careful backtest cannot capture real execution, emotions or changes in market behaviour.

In an evaluation

Using it on asimulated account

Test against the account's rules, not just profit: would the strategy's worst day have breached the daily loss limit - $3,000 on Instant or $5,000 on 1 Step and 2 Step on a $100,000 account - or its worst run the max drawdown? A strategy that is profitable overall but breaches on one bad day fails an evaluation.

Include GFN's commission, $3.50 per side, $7 per lot round turn, in the test.

Questions

Asked aboutthis concept

Applying a strategy's fixed rules to historical price data to see how it would have performed, including costs.

There is no fixed number, but a few dozen trades can look good by chance. Many traders look for at least a hundred across different market conditions.

Sources

What this pagerelied on

  1. Backtesting - Wikipedia. Retrieved 23 September 2026. The definition of backtesting and its main limitations.
  2. Overfitting - Wikipedia. Retrieved 23 September 2026. Why a model tuned to past data can fail on new data.

Educational content only, not investment advice or a recommendation to trade. Chart concepts describe what price has done; none of them predicts what it will do, and trading any strategy can lose money. Get Funded Now accounts are simulated and trade virtual funds. Last reviewed 22 September 2026.

Ready when you are

Your capital stays yours.The risk is ours.

One evaluation fee, no time limits and up to 90% of simulated profits. Pick an account size and your credentials arrive by email within minutes.

No subscriptions or hidden fees

Payouts every 14 days

$400,000 max total allocation