guide · Performance & testing

Backtesting Trading Strategies: A Reproducible Test Plan

Backtesting applies specified trading rules to historical data using an execution model. A credible test records when information became available, how orders could fill and which costs apply. Its result describes that historical simulation, not a guaranteed live outcome.

TradeCopier Editorial TeamPublished
Arranged sample blocks and measurement tools illustrating careful performance testing
Editorial illustration. Examples and calculations below state their own assumptions.

Key points

  • Freeze the rules and data version before evaluating a test.
  • Signals and fills need a realistic chronological sequence.
  • Keep untouched evaluation data and report unsuccessful experiments too.

Scope and assumptions

  • The price sequence and cost example are invented. No strategy performance is claimed and no historical backtest has been presented as a live account result.

Write the test specification first

A backtest is a model of decisions and execution, not simply an indicator drawn over an old chart. It needs rules for entering, sizing, modifying and exiting positions, plus a definition of the information available at each decision. Any ambiguity can quietly become a favorable assumption in the software.

Start with a one-page specification. Name the instrument and contract, observation frequency, session calendar, signal timing, order type, sizing method, costs and evaluation dates. State how open positions are handled at the end of the test. Record the version of the strategy and dataset so another reviewer can rerun the same calculation.

The MetaTrader 5 testing documentation describes configurable historical testing and execution simulation. A platform providing these settings does not establish that any particular configuration is realistic. The test designer must connect the settings to the question being investigated.

Separate the strategy from the execution model

The strategy says when it wants an order. The execution model says whether, when and at what price that order fills. Keep these layers distinct. A profitable signal model can become unprofitable after costs, and a programming error in fill timing can create an apparent opportunity that never existed.

For example, a rule might calculate a signal from a completed five-minute bar. The execution model should not automatically grant entry at an earlier price inside that same bar. If the rule requires the closing value, the earliest permitted action follows the moment that value becomes available, with whatever delay and pricing convention the model specifies.

A worked timing error

Imagine a bar that opens at 100, trades down to 99, reaches 103 and closes at 102. A hypothetical strategy buys when the completed bar closes above 101. A backtest that detects the closing condition and then buys at the bar’s low of 99 has used information from the future relative to the supposed entry.

Even an entry at the bar’s open of 100 would be unavailable to that completed-bar decision. A defensible simulation needs a later executable price or a clearly specified close-execution mechanism supported by the market and data. The point is chronology, not which price makes the equity curve look better.

Now suppose both a stop and target lie inside the next bar’s high-low range. OHLC data alone may not reveal which was reached first. Choosing the profitable order of events every time creates another bias. Use data with adequate resolution or a documented conservative ambiguity rule, and report how sensitive results are to that choice.

Audit the dataset

Data questionFailure it can reveal
Are timestamps and sessions consistent?Signals shifted into the wrong trading window
Are missing and duplicate records identified?Artificial jumps or repeated trades
Were instruments selected using future survival?Survivorship bias
Are futures rolls and adjustments documented?Synthetic price changes mistaken for tradable returns
Were economic values revised later?Information unavailable at the original decision time

Do not silently fill missing prices with values that imply a tradable market. Record the gap and decide whether to exclude the affected period, model unavailable execution or obtain better data. Every choice should be reproducible. A clean-looking dataset is not necessarily a faithful one.

For futures, distinguish individual contracts from a continuous chart series. For portfolios, include the historical universe as it was known then where possible. The references on survivorship bias and look-ahead bias explain different ways an apparently historical sample can contain future knowledge.

Make costs explicit

Suppose an invented 200-trade simulation earns $1,000 before costs. A round-trip commission of $3 per trade reduces that by $600. Another $2 per trade of execution difference excluded from the initial model removes $400 more. The revised arithmetic is zero before any other operating costs.

This example does not assert a typical commission or slippage. It shows why gross profit alone is insufficient. Record whether a quoted commission is per side, per contract or per round trip. If bid-ask execution is already modeled, do not subtract the spread again. If financing varies with holding time, a flat fee may be a poor substitute.

Run separate sensitivity cases rather than presenting a single optimistic cost assumption. Identify the break-even cost level and ask whether the modeled margin survives plausible variation. Use the expectancy calculator for an arithmetic cross-check and keep the detailed fill-level calculation as the main record.

Check position sizing and account state

A backtest must respect the units of the instrument. A stop distance in points requires a point value; a futures quantity must usually be a whole number of contracts. A broker’s minimum lot and volume step can prevent the exact fractional quantity produced by a formula.

Include available equity, margin assumptions and simultaneous positions where they affect order eligibility. A strategy that opens ten overlapping trades cannot be assessed accurately by simulating each as if it had exclusive use of the account. A netting account and a hedging account may also represent positions differently.

For copying workflows, test the destination’s quantity and symbol rules separately. A backtest of a source strategy does not automatically simulate the full copier path. TradeCopier’s symbol mapping and configuration pages describe product considerations to investigate with supported accounts.

Reserve evaluation data before tuning

Keep a chronological period that is not used to choose parameters. Evaluate the selected rules there only after the development process is documented. If the result leads to changes, acknowledge that the period has now influenced development and should no longer be described as untouched.

A single holdout does not solve every research problem. Repeatedly checking it while making changes can indirectly fit the strategy to it. Keep an experiment log with the number of variations tried, including failures. The overfitting reference explains why selecting a winner from many noisy trials creates misleading confidence.

Inspect trades, not just the equity curve

Hand-check a small set of trades against the input data and rules. Include a normal winner, a loser, a gap, a session boundary and a case with competing exit conditions. This review can catch sign errors, impossible fills and cost omissions that aggregate statistics conceal.

Use a tiny inventory example as a separate accounting test. Buy two units at 100, sell one at 102, then mark the remaining unit at 99. Before costs, realized profit is 2, unrealized profit is −1, and the combined result is +1. The open quantity is one unit. A report showing realized profit of 4 has applied the exit to both units; a report showing total profit of 2 has ignored the open loss. Keep transaction costs and any currency conversion explicit when extending this example. Repeat with the opposite side and a partial fill to check sign and quantity handling independently of the strategy’s entry logic.

Then review net result, drawdown, number of observations, exposure and concentration. An impressive total produced by one unusual trade has a different evidential meaning from a broad pattern, although neither proves future returns. Use risk-adjusted statistics only after the underlying return series is reconciled.

Publish a report that can be challenged

A useful report includes the exact test period, dataset version, rules, parameter-selection process, costs, execution assumptions and limitations. It clearly labels all results as simulated. It should show the evaluation period separately from the development period and identify any post-result changes.

The CFTC’s discussion of hypothetical performance explains why simulated results should not be represented as actual trading. A disclaimer cannot repair an unrealistic model. The substantive work is to expose assumptions and retain the evidence needed to reproduce them.

After the historical review, a paper workflow test can investigate implementation behavior under current simulated conditions. A walk-forward analysis can examine a documented sequence of training and later evaluation windows. Each adds a different kind of evidence while leaving uncertainty about live outcomes.

Questions and answers

What is the difference between backtesting and paper trading?

Backtesting simulates specified rules on historical data. Paper trading usually observes a simulated account as data arrives. Both have model limitations and neither establishes live profitability.

Can OHLC bars accurately test every strategy?

No. A bar does not necessarily reveal the order of intrabar events or executable bid and ask prices. Strategies sensitive to that sequence need adequate data or explicit ambiguity assumptions.

What should a backtest report disclose?

Disclose the data and period, rule version, parameter-selection process, execution and cost assumptions, sizing constraints, evaluation split and known limitations. Label the result as simulated.

Sources and further checks

Use the current source for your exact instrument, account and platform. Referencing a general specification does not establish support for every TradeCopier workflow.

  1. MetaTrader 5: Strategy Testing · Checked September 19, 2026
  2. CFTC: Hypothetical trading-system performance · Checked September 19, 2026

Found an error? Send a correction with this page's address and a primary source. See our editorial standards for how we handle examples, claims and revisions.

Check the product workflow

Use these pages to check TradeCopier settings and connection requirements for your own setup.

Browse all resourcesCurrent resource: /learn/backtesting-trading-strategies

Start Copying Smarter Today

Join traders who trust TradeCopier for speed, reliability, and performance.

Get Started Free