Futures Backtest Costs: Fees, Slippage, Spread, and Position Sizing
See how a two-contract reference gain of 450 USD becomes 367 USD net after slippage and fees. Model commissions, spread, rolls, and sizing without double-counting.
Translate every tick into account currency
The contract specification, rather than the price series, defines the P&L units. Point value gives the currency value of a one-point move; tick size gives the minimum permitted price increment. Their product is the tick value. The multiplier states how many underlying units one contract represents. Terminology differs across markets, so record these quantities explicitly instead of deriving them from observed prices.
gross P&L = (exit price − entry price) × point value × contracts × direction
tick count = (exit price − entry price) ÷ tick size
gross P&L = tick count × tick value × contracts × direction
Set direction = +1 for longs and −1 for shorts. At a $50 point value and a 0.25 tick, one tick is worth $12.50. A favorable 3.75-point move spans 15 ticks and earns $187.50 per contract before costs. Test these calculations separately from the strategy.
Continuous derived data includes price_raw, back_adjustment and price = price_raw + back_adjustment. Signals can reference adjusted prices. Execution P&L, however, must use raw entry and exit prices for the contract actually traded; a current adjustment never was an executable historical price.
Charge both sides of the trade
Entry and exit each incur a “per side” charge. Round-turn cost is the two-sided total for one contract. Broker commissions, exchange and clearing charges, and regulatory fees may appear as separate items. Start from the account’s total and mark every input per side or round turn to prevent charging a fee twice.
commission and fees = contracts × (entry per-side cost + exit per-side cost)
net P&L = gross P&L − commissions and fees − spread/slippage costs − other modeled costs
Ticket-level fees are not per-contract fees: one order for five contracts incurs the ticket charge once. Actual executions determine costs for partial exits. If the contract earns a currency other than the account currency, include conversion in the ledger.
Small, frequent trades feel fixed charges soonest. Report gross edge per trade in ticks next to the net edge after costs. Two ticks of gross edge minus three ticks of costs leaves a losing trade, not an unexplained anomaly.
A midpoint fill assumes the spread costs nothing
Best ask less best bid is the bid–ask spread. Marketable buys normally execute at the ask, while marketable sells execute at the bid. Filling either side at the midpoint removes that expense. For midprice m and half-spread h, a simple round trip pays h when buying and gives up h when selling. The combined cost is one full spread before market impact.
A market-order model should cross the spread and then account for slippage from size and market conditions. Limit orders introduce nonexecution and adverse selection: a buy below the ask can remain unfilled, and its eventual fill may arrive while price moves against you. Define order eligibility, missed fills, and trade-through handling, or use another defensible convention. A touch of the limit price still does not prove execution.
Retain a midprice run as an idealized benchmark if useful. Apply spread-crossing and stressed execution to the same signals as well; comparing the reports isolates the effect of the execution assumptions.
Stops in fast markets need their own slippage assumptions
Slippage measures the gap between a reference price and the modeled fill. It can include spread, impact, latency, size, and price movement after the decision. One tick on every trade is transparent and easy to audit, but the same penalty can be too harsh at liquid noon and far too mild during a violent opening minute.
Use a tick baseline, increasing it as spreads widen, activity dries up, or short-term volatility rises. A multiplier based on order size relative to recent activity can account for size. Estimate the parameters from training evidence, or label them explicitly as stress scenarios. A cap must never be selected merely because larger values ruin the backtest.
Model entry and exit separately. Quiet passive entries and stops executing into fast moves face different liquidity; rolls, market opens, and announcements change conditions again. When the data lacks a required input, specify a scenario rather than inventing numerical precision.
Rolling a position costs two executions
The continuous series can switch contracts through one join, but the portfolio cannot. It closes the old contract and opens the new one, paying commissions and trading friction on both executions. Those charges belong at the roll; they do not replace the costs on the original entry or the final exit.
A difference between the two contract prices does not automatically become roll P&L. Calculate realized P&L for each dated-contract leg and let back adjustment preserve the research scale. Retain identifiers, raw fills, quantities, times, and costs so equity can be reconstructed from the legs instead of from a jump in the adjusted series at a join.
Liquidity can migrate during a roll, making its slippage unlike that of an ordinary entry. Change roll timing and roll cost in separate experiments. A different date also changes exposure, not just fees.
The full ledger for two contracts
Reconciling reference prices with cash P&L
- Two contracts have a reference buy of 5,000.00 and a reference sale of 5,004.50. The contract has a $50 point value and a 0.25 tick size, so a tick is worth $12.50. Moving 4.50 points covers 18 ticks and produces
4.50 × $50 × 2 = $450before execution costs. - The buy fills at 5,000.25, one adverse tick from the reference, and the sale fills at 5,004.00, two adverse ticks away. This gives
(1 + 2) × $12.50 × 2 = $75of slippage. At $2.00 per contract per side, fees add2 contracts × 2 sides × $2 = $8, leaving$450 − $75 − $8 = $367net. - Measured fill to fill, the 3.75-point move earns $375 gross; subtracting the $8 in fees produces the same $367. Slippage is already embedded in the modeled fills and cannot be deducted again. Those fills also crossed the spread, so no separate spread deduction belongs here. Recording reference prices, fills, and each cost component in the ledger exposes duplicate charges.
Costs need a range of scenarios
Reporting one scenario implies more precision than the execution model supports. Hold the signal logic and input data constant, vary individual execution assumptions, and then test adverse conditions together. Allow missed passive fills to change the resulting positions and trade count. The following grid illustrates the method rather than describing a particular market:
Scenario Commission/side Entry slippage Exit slippage Roll slippage/side
Idealized $0.00 0 ticks 0 ticks 0 ticks
Base $2.00 1 tick 1 tick 1 tick
Conservative $3.00 2 ticks 2 ticks 2 ticks
Stressed $4.00 3 ticks 4 ticks 3 ticks
Compare the scenarios on:
- Net P&L, maximum drawdown, and net expectancy per trade.
- Missed passive fills and the resulting change in trade count.
- Results by year or regime, including differences concealed by the full-sample total.
Flat results are not required. Locate the point where performance deteriorates and identify the assumption responsible.
Anchor the base case in observed fees and execution evidence rather than choosing it for the best-looking equity curve. The break-even cost is gross edge in ticks − all non-slippage costs in ticks. With two ticks of gross edge and half a tick of other costs, another 1.5 ticks of slippage consumes everything left. That concrete limit says more than an undefined “higher-cost scenario.”
Trade history says nothing about queue priority
Historical trades alone cannot reconstruct the full order book or assign a queue position to the simulated order. For these per-contract ticks, bid_sz and ask_sz measure volume executed at bid and ask; they are not resting quantities visible to a new order. volume likewise reports activity, not the number of contracts ahead in line.
Cancellations, hidden interest, queue position, and competing orders are absent, so touching a limit cannot establish a passive fill. Bars retain OHLC, volume, and trade count but lose order priority. The comparison of tick data and OHLCV bars details this distinction.
For marketable orders, scenarios can combine an estimated spread crossing with additional stress. Passive-order scenarios must allow missed fills and execution uncertainty. Neither a bar’s extreme nor a tick-size field proves that a fill occurred. The available derived dataset catalog and technical documentation describe the inputs; the execution model must supply the assumptions around them.
Isolate the effect of each position-sizing change
Increasing size magnifies the edge and any modeling error at once. Before changing contract counts, calculate net trade outcomes in account currency and estimate potential losses from gaps, stop slippage, and correlated positions. Since contracts come in whole units, rounding creates discrete changes in risk that a smooth sizing formula conceals.
Run separate comparisons for one-contract trading, volatility-scaled quantity, and equity-based quantity. Every run needs explicit maximum position, margin and cash limits, correlated-exposure rules, and behavior after losses. Recalculate only at defined decision times with the information available at those times. Treat added costs and potentially worse slippage from larger orders as a separate experiment.
Retain the full outcome distribution whenever the sizing rule changes. Drawdown, worst daily loss, margin use, and concentration show whether a handful of fortunate trades accounts for the result. These are research experiments, not personal recommendations. Find the breaking point in simulation, before the losses become real.