CE Market SolutionsTest your own version of this rule on 10 years of NQ.Backtest your version →

Explainer

What is futures backtesting?

Futures backtesting runs a set of trading rules on past market data to show what those rules would have done, trade by trade, with costs included.

Updated

The short answer

Futures backtesting means taking a set of trading rules and running them on historical futures prices. The output is a record of every trade the rules would have taken: when each one entered, where its stop and target sat, when it exited, and what it made or lost after costs.

The point is to replace a feeling about a setup with a record you can read line by line. You still decide what the record means. The backtest only supplies the record.

Backtest
A run of fixed trading rules over past market data, producing a record of every trade the rules would have taken.
Trade
One entry and its exit, whether the exit is a stop, a target or a time stop.
Fill
The price at which an order is assumed to execute.
Roll
The switch from an expiring futures contract to the next contract month.

What a backtest needs

Four things decide whether a backtest means anything.

  • Rules that cannot be misread. If a rule can be read two ways, the result is really two different tests. A range written as 18:00–19:00 ET either includes the 19:00 bar or it does not, and the answer changes the trades.
  • Price data fine enough for the rules. A rule about the first five minutes after the open needs bars shorter than five minutes. Our runs use 1-minute CME futures data.
  • Exact fills. The test has to say where each order fills. A target fills when price touches it, at that exact price. A signal that appears when a bar closes can first be acted on at the next bar’s open.
  • Costs. Commission and slippage come out of every trade. A test without them shows a result no account could have had.
A backtest answers the question its rules ask, and nothing else. Write the rules so there is only one way to read them.

Why futures need extra care

A futures contract expires. When it does, trading moves to the next contract month, and that contract usually trades at a different price. The difference is not a market move. Nobody could have traded it.

Chain the months together without handling this and a roll can trigger an entry, or hit a stop, on a price change that never happened. So roll dates have to be explicit events in the data, and the simulation has to run on raw prices.

Our method takes the front month by volume and switches at the 18:00 ET session open. Prices are not back-adjusted. No trade is held through a contract change: a position still open at the close of the last session before a roll exits at that session’s final bar close, and nothing is reopened on the new contract.

Each contract also has its own size. One point is worth $20 on NQ, $2 on MNQ, $50 on ES, $5 on MES and $100 on GC. A backtest can report in points, in R or in dollars, so you need to know which one you are reading.

What a backtest can tell you

It can tell you how many trades the rules would have taken, how those trades were spread across the years, how far the account would have fallen at its deepest, how long the longest losing streak ran, and how much the costs took. Those are facts about the history the rules were run on.

It can also show where a description of the rules was incomplete. When the trades on the page are not the ones you pictured, the rule needs a sharper sentence.

What a backtest cannot tell you

It cannot tell you what happens next. Simulated results are not actual trading. They are built with the benefit of hindsight, and they cannot show the effect of things such as a market too thin to fill your order.

It also cannot test you. A rule that is easy to follow on a chart of the past can be hard to follow live, after three losing trades in a row. That is what a bar-by-bar replay or a forward test is for.

Questions and answers

What is a backtest in trading?

A backtest runs fixed trading rules on past price data and records every trade the rules would have taken, with entries, exits and costs.

Is a futures backtest different from a stock backtest?

The method is the same. Futures add contract expiry, so the data has to handle rolls, and each contract has its own dollar value per point and its own tick size.

Can a backtest predict future results?

No. A backtest is a simulation on past data, and simulated results do not represent actual trading. It shows what the rules would have done, not what they will do.

Do I need to code to backtest a futures strategy?

Not with our service. You describe the rules in plain language, and if something is ambiguous we ask rather than guess.

How far back can a futures backtest go?

As far as the data goes. On ours, NQ and ES run from June 2, 2016 through August 27, 2026, and MNQ and MES start in May 2019, when those contracts launched. A run cannot ask for more history than the data covers.