Trading practiceUpdated 3 min readBy the FXNOD team
What is backtesting and why is it important?
Backtesting means applying a trading strategy's exact rules to historical prices to see how it would have performed. It matters because it tests an idea over hundreds of trades in minutes, without risking money. A good backtest shows whether a strategy deserves further testing. It cannot prove that the strategy will work in the future.

How to backtest
Write exact rules
Entry, exit, stake and stop, with no judgment left in them.
Choose the data
A long period that includes trending, sideways and volatile conditions.
Apply the rules candle by candle
By hand, scrolling the chart forward one candle at a time, or with software.
Record every trade
Including the ones you would rather skip.
Subtract costs
Spread, commission and a realistic allowance for slippage on each trade.
Calculate the measures
Win rate, average win and loss, expected value, maximum drawdown, longest losing streak.
What a backtest can tell you
- Whether the idea had any edge at all over the period.
- How deep its drawdowns went and how long they lasted.
- How often it trades, and in which conditions it loses.
- Whether the result depends on a handful of exceptional trades.
Four ways a backtest misleads
| Problem | What goes wrong | Defence |
|---|---|---|
| Overfitting | Settings are tuned until the past looks perfect | Few settings, and test on data not used for tuning |
| Look-ahead bias | The test uses information that was not available at the time | Decide only on closed candles |
| Ignoring costs | Spread and slippage are left out | Subtract them from every trade |
| Too little data | A few dozen trades in one market condition | Hundreds of trades across several conditions |
In-sample and out-of-sample
Split the history in two. Develop and adjust the strategy on the first part only. Then run it once, unchanged, on the second part. If the result collapses on data the strategy has never seen, it had learned the past and not the market. This single habit prevents most self-deception in backtesting.
Backtest, then forward test
A backtest is the first filter. The second is a forward test: running the unchanged rules on live prices with virtual money. It is slower, but it cannot be fitted to the past, and it includes real execution. Only a strategy that passes both deserves a small amount of real money.
On synthetic indices
Backtesting a direction rule on a random series will find settings that worked on that stretch of history, purely by chance, and they will not carry forward. For synthetic indices the useful test is of the payout and the stake sizing over a large number of trades. FXNOD does not have a backtester; a bot is tested there by running it on a Deriv demo account.
Questions people ask
- How far back should I backtest?
- Far enough to include at least a few hundred trades and several kinds of market. For a daily strategy that may be years; for an intraday one, months.
- Is backtesting accurate?
- It is accurate about the past if costs are included and no future information leaks in. It is a guide to the future, not a forecast.
- What is overfitting?
- Adjusting a strategy so closely to past data that it captures the noise of that period. It looks excellent in the test and fails afterwards.
- Can I backtest manually?
- Yes. Scroll a chart back, move forward one candle at a time, and record each trade your rules would have taken. It is slow and teaches you more than software does.
Test your rules before you fund them
Turn a rule into a bot in Bot Forge by answering questions, run it on your Deriv demo account, and read the result trade by trade.
Get started