On Tuesday morning, our crude futures trend strategy was long the expiring contract. The signal was doing exactly what we had asked: hold the position while the trend stayed positive. The backtest showed a modest gain. The paper account showed a sell, a buy in the next contract, two fees, and a worse entry than the chart suggested.
Nothing mysterious had happened to the signal. The backtest had treated “the futures price” as one continuous thing. The account had to close one contract and open another, in two different order books, at two different prices.
We found the discrepancy while reviewing a position that crossed the roll window. The strategy used a liquid front-month contract and held it until a calendar rule moved it to the next month. That rule was reasonable. The accounting around it was not.
Our continuous series had been back-adjusted to remove the gap between contracts. That made the chart useful for calculating a trend. It also meant the series contained no actual price at which we could close the old contract or open the new one. The backtest had used the adjusted level to mark the trade through the roll, then resumed trading as if the position had simply continued.
For a signal, a continuous series can be a useful measurement. For a fill, it is fiction. A roll is two trades, and the spread between contracts is part of the market structure, not a cosmetic jump to smooth away.
We rebuilt the event with the two listed contracts. The old month was bid 79.98 and offered 80.00. The next month was bid 80.42 and offered 80.45. Our long position had to sell the old contract at its bid, then buy the new contract at its offer. The calendar spread was 44 cents between those executable sides.
That number wasn’t automatically a loss of 44 cents. The contracts had different delivery months, and the spread reflected carry, storage, financing and expectations about supply. A position carried through the roll keeps exposure to the new contract’s price path; it does not pay the entire quoted spread as a fee. But the strategy must realize the old contract’s exit and establish the new contract’s entry. If its return calculation compares those prices as though they were the same instrument, it can invent or erase P&L.
We separated the jobs in the replay. The continuous series still generated the trend signal. Contract-specific prices handled marks and orders. At the roll, the simulator sent a close order for the expiring month and an open order for the next one, applied each contract’s fees, and used each book’s spread and available depth.
The first replay still disagreed with paper. We had synchronized both fills to the same timestamp, although the orders were submitted sequentially. The old-month close filled, but the next-month offer moved before the buy reached the book. A roll can be executed as a calendar spread where the venue supports it, or as two legs with exposure between them. Those are different execution assumptions. We used the paper account’s actual order sequence for the comparison.
Then we noticed the calendar rule itself was underspecified. “Roll five days before expiry” sounds precise until a holiday shifts the trading calendar, liquidity migrates earlier, or the expiry convention differs by contract. We had coded a count of calendar days in one place and business days in another. The paper strategy rolled on the fifth session before last trade; the backtest rolled five calendar days before it.
A roll date is a trading rule. Write down the exchange calendar and the event that triggers it, or the backtest and account will eventually disagree about which contract you own.
We changed the roll instruction to name the contract’s last trade date, count sessions on its exchange calendar, and require a minimum liquidity check before moving. That threshold was a practical guardrail, not a promise of a better fill: volume and open interest are imperfect guides to what our order can execute. We logged the selected contract and both leg prices so every replay could explain the handoff.
After those changes, the strategy’s historical return fell. The difference was not one giant roll loss. It came from many small corrections: the right contract, the right trading session, real fees on both legs, and exits and entries priced in their own books. One thin roll was especially expensive, so we kept it visible instead of averaging it away.
If your futures backtest uses a continuous chart, ask what that chart is allowed to do. It can provide a consistent input to a signal. It cannot stand in for a contract you could have bought or sold. For every position that crosses expiry, the research record should identify the old contract, the new contract, the roll trigger, the execution model and the two resulting cash flows.
That Tuesday trade wasn’t a sophisticated failure. It was a profitable-looking line on a chart that skipped the moment the account had to change what it owned. Once we put that moment back into the replay, the result became less flattering and much more useful.
← All posts


