FeaturesLearnNISMGalleryFaqPricingAboutWeb Terminal (Desktop & iOS)Get Mobile App
Algorithmic Trading 101: Strategies, Backtesting & Risk Management
πŸ“š Course Β· 10 chaptersIntermediate 3.5 hours

Algorithmic Trading 101: Strategies, Backtesting & Risk Management

A practitioner-oriented course covering the core building blocks of systematic trading: how to backtest without fooling yourself, the statistics behind mean-reversion and momentum strategies, and how to size positions and manage risk so a good strategy doesn't blow up your account.

Algorithmic Trading

Course Syllabus

7 / 10
Chapter 7 of 10

Chapter 7: Futures Mechanics β€” Roll Returns, Backwardation, and Contango

7/10

Chapter 7: Futures Mechanics β€” Roll Returns, Backwardation, and Contango

In Chapter 6, we mentioned roll returns twice β€” once as a driver of time-series momentum in futures, and once as a subtlety that can make a commodity ETF fail to track its corresponding futures contract as closely as you'd expect. It's time to stop treating roll return as a footnote and give it the full, dedicated treatment it deserves.

Here is the single idea this entire chapter builds around: a futures contract's price is not simply a forecast of where the underlying asset will be. It is a more subtle construction, shaped by the cost of carrying that asset forward in time, storage economics, hedging pressure, and the passage of time itself toward expiry. Understanding this construction is essential β€” because if you trade Nifty futures, Bank Nifty futures, or any commodity future on MCX without understanding roll return, you are trading a return stream you don't fully understand, and that's a dangerous position for any systematic trader to be in.

Why this chapter matters: Roll return isn't an obscure technicality β€” it's a real, persistent component of futures returns that silently shapes the performance of pairs trades, calendar spreads, and momentum strategies alike. Traders who ignore it consistently misattribute strategy performance to the wrong cause, which is exactly the kind of error that leads to strategies breaking down unexpectedly in live trading.


1. Why Futures Prices Aren't Just a Spot-Price Forecast

The Basic Setup

A futures contract is an agreement to buy or sell an underlying asset at a specified price on a specified future date (the expiry). At any given moment, multiple futures contracts on the same underlying can be trading simultaneously β€” each with a different expiry date.

Classic Example: At any point in time, the NSE lists Nifty 50 futures contracts expiring in the current month, the next month, and the month after that (the near, mid, and far contracts). Similarly, MCX lists Gold futures with several different expiry months trading simultaneously. Each of these contracts, despite tracking the exact same underlying asset, typically trades at a different price.

Why would contracts on the same underlying, expiring at different times, trade at different prices? Because a futures contract must eventually converge to the spot price of the underlying by the time it expires β€” but between now and expiry, its price also reflects the cost (or benefit) of holding that position over time. This gap between the current futures price and the spot price is the origin of everything in this chapter.

Decomposing Futures Returns

This leads to arguably the single most important formula in this chapter:

Total Futures Return = Spot Return + Roll Return

  • Spot return is the return you'd expect from simply holding the underlying asset itself β€” Nifty going up 1% means the spot index moved up 1%.
  • Roll return is a return component that exists purely because of the shape of the futures curve β€” the relationship between near-dated and far-dated contract prices β€” and it accrues continuously, every single day a position is held, not just on the specific day you 'roll' from one contract to the next.

This second point trips up many beginner traders: they assume 'roll return' only matters on the day you close out an expiring contract and open a new one. In reality, it's baked into your daily mark-to-market P&L the entire time you hold any futures position, because the futures price itself is already reflecting this term structure at all times.

A simple flow diagram titled 'Decomposing Futures Total Return', showing a single box labeled 'Total Futures Return' splitting via two arrows into two boxes below β€” 'Spot Return (movement of the underlying asset)' and 'Roll Return (driven by the shape of the futures curve)' β€” with a small caption underneath reading 'Roll return accrues every day a position is held, not just on rollover day'
πŸ“· A simple flow diagram titled 'Decomposing Futures Total Return', showing a single box labeled 'Total Futures Return' splitting via two arrows into two boxes below β€” 'Spot Return (movement of the underlying asset)' and 'Roll Return (driven by the shape of the futures curve)' β€” with a small caption underneath reading 'Roll return accrues every day a position is held, not just on rollover day'

2. Backwardation and Contango: The Two Shapes of the Futures Curve

Defining the Two States

The relationship between near-dated and far-dated futures contracts on the same underlying falls into one of two states:

  • Backwardation: near-dated (closer to expiry) contracts are priced higher than far-dated contracts. In this state, roll return is positive.
  • Contango: far-dated contracts are priced higher than near-dated contracts. In this state, roll return is negative.

Classic Example: Suppose the current-month MCX Crude Oil futures contract is trading at β‚Ή6,200 per barrel, while the next-month contract is trading at β‚Ή6,150. The near contract is priced higher than the far contract β€” this market is in backwardation. As time passes and the near contract approaches expiry, it must converge toward the (currently unknown, but let's say roughly stable) spot price β€” meanwhile, if you're long the near contract, you benefit from this convergence dynamic, generating positive roll return. Conversely, if the current-month contract were trading at β‚Ή6,150 and the next-month contract at β‚Ή6,200, the far contract is priced higher β€” that's contango, and a long position in the near contract would face negative roll return as it converges downward toward a lower expected settlement level.

An Intuitive Mnemonic

Many traders struggle to remember which term means which. Here's a mnemonic rooted in classical economic theory (originally attributed to Keynes and Hicks): in a 'normal' commodity market, hedgers who physically own the underlying commodity β€” think of an Indian jewellery manufacturer that holds physical gold inventory, or an oil refiner that holds crude oil stock β€” want to hedge their exposure by selling futures, locking in a price for their existing inventory. Because they're net sellers of futures, they must offer speculators (who take the other side, buying futures) a bit of a discount to compensate speculators for taking on that risk. This tends to push near-term futures prices below the expected future spot price β€” which is the condition of 'normal backwardation.' The word 'normal' pairs with 'backwardation' as a memory aid: normal backwardation means futures prices are lower than the expected future spot price.

Note: This is a useful mnemonic, not an ironclad rule. Crude oil β€” a textbook 'normal' commodity by this theory β€” has spent extended historical periods in contango rather than backwardation, driven by storage costs, geopolitical supply dynamics, and shifting demand expectations. Use the mnemonic to remember the terminology, not to predict which state a given market will actually be in.

A two-panel line chart titled 'Backwardation vs. Contango β€” Futures Curve Shapes', with the left panel labeled 'Backwardation (e.g., MCX Crude Oil, tight near-term supply)' showing a downward-sloping line from a higher near-month contract price to a lower far-month contract price, and the right panel labeled 'Contango (e.g., Gold futures, high storage/carry costs)' showing an upward-sloping line from a lower near-month contract price to a higher far-month contract price, both charts with the x-axis labeled 'Contract Expiry (Near to Far)' and y-axis labeled 'Futures Price'
πŸ“· A two-panel line chart titled 'Backwardation vs. Contango β€” Futures Curve Shapes', with the left panel labeled 'Backwardation (e.g., MCX Crude Oil, tight near-term supply)' showing a downward-sloping line from a higher near-month contract price to a lower far-month contract price, and the right panel labeled 'Contango (e.g., Gold futures, high storage/carry costs)' showing an upward-sloping line from a lower near-month contract price to a higher far-month contract price, both charts with the x-axis labeled 'Contract Expiry (Near to Far)' and y-axis labeled 'Futures Price'

3. A Simple Mathematical Model of the Futures Curve

Building the Model

We can formalize this relationship with a simple model. Let the futures price at time t for a contract expiring at time T be represented as depending on two separate compounding rates:

  • A spot return rate, capturing how the underlying asset's price itself is expected to change over time.
  • A roll return rate, capturing the fixed gap between the futures price and the spot price, which shrinks to zero exactly at expiry (since the futures price must converge to the spot price by then).

Under this model, the total return of holding a specific futures contract over a short period is simply the sum of these two rates β€” mathematically confirming our decomposition from Section 1: total return = spot return + roll return.

The key practical insight from this model: because the roll-return component is essentially constant for a given contract (it depends on the current shape of the curve, which tends to persist for meaningful stretches, as we saw in Chapter 6), it can be estimated separately from the spot return using regression techniques on historical futures price data across different expiries.

Classic Example: If you regress the log-price behavior of Bank Nifty futures across its near, mid, and far monthly contracts against time, you can statistically separate out how much of Bank Nifty futures' total historical return came from the index itself moving (spot return) versus how much came from the persistent shape of the futures curve (roll return) β€” this is a genuinely useful diagnostic before building any futures-based strategy, because it tells you whether your strategy's apparent edge is really about directional views on the index, or about curve-shape dynamics that have nothing to do with predicting index direction.


4. Why This Matters for Mean-Reversion Strategies

The ETF-vs-Futures Trap

Here's a practical trap that catches many traders who've absorbed Chapters 4 and 5 but haven't yet internalized roll-return mechanics: an ETF that tracks a commodity's spot price closely will NOT necessarily cointegrate with the futures contract on that same commodity.

Why? Because the ETF's return reflects (approximately) pure spot return, while the futures contract's return reflects spot return + roll return. If roll return is a meaningfully sized, persistent component (which it often is), the ETF and the futures contract can drift apart over time in a way that has nothing to do with either instrument malfunctioning β€” it's simply the roll-return gap accumulating.

Classic Example: Suppose you notice that a Gold ETF (which closely tracks domestic spot gold prices) and MCX Gold futures (the near-month contract) appear highly correlated on a short-term chart, and you're tempted to build a mean-reversion pairs strategy betting on convergence whenever their prices diverge. If MCX Gold futures happen to be trading in a sustained, moderate contango (common for gold, since it's costly to store and doesn't generate income while held, unlike, say, a dividend-paying stock), the futures price will systematically drift above what a simple spot-tracking relationship would predict β€” not because of any temporary mispricing you can profit from, but because of a persistent, structural roll-return gap. A naive mean-reversion strategy betting on the ETF and futures reconverging to their historical average spread could suffer sustained losses, because the 'average spread' itself is not stable β€” it depends on the roll return, which can itself change over time as the futures curve shape shifts.

Warning: This exact mistake β€” assuming spot-tracking instruments and futures contracts on the same underlying will naturally cointegrate β€” has been a genuinely costly, real-world lesson for many systematic traders. Before building any pairs or spread strategy involving a futures contract, explicitly check whether the relationship should be tested on a roll-return-adjusted basis, not just raw price levels.

Calendar Spreads: Trading the Curve Itself, Not the Underlying

A calendar spread involves simultaneously holding a long position in one expiry of a futures contract and a short position in a different expiry of the same underlying β€” for example, long the current-month Nifty futures contract and short the next-month Nifty futures contract.

It's tempting to assume that because both legs track the same underlying index, the spread itself should be reliably mean-reverting β€” after all, both legs are 'the same thing,' just with different expiry dates. This intuition is misleading. What actually drives whether a calendar spread mean-reverts is not whether both legs share the same underlying β€” it's whether the roll return itself (i.e., the shape of the curve, backwardation versus contango) is mean-reverting.

Classic Example: If the roll return on Nifty futures has been persistently positive (backwardation) for an extended stretch β€” reflecting, say, sustained dividend-related and cost-of-carry dynamics β€” a calendar spread strategy assuming quick mean reversion back to a 'normal' contango-based spread level could be positioned against a genuinely persistent trend in the curve shape, rather than a temporary deviation ripe for reversion. The correct question to ask, using Chapter 4's tools, isn't 'does the spread between these two contracts mean-revert?' in isolation β€” it's 'does the roll return driving this spread mean-revert?', which requires analyzing the futures curve shape over time, not just the raw spread level.

A time-series chart titled 'Nifty Futures Calendar Spread Behavior', showing two lines over a 12-month period β€” one labeled 'Naive Assumption: Spread Mean-Reverts to a Fixed Historical Average' shown as a flat dashed horizontal line, and another labeled 'Actual Spread Behavior: Driven by Shifting Roll Return / Curve Shape' shown as a wandering line that drifts away from the naive fixed average for extended stretches before eventually reverting, annotated with a callout reading 'Testing the roll return itself for mean reversion, not just the raw spread, is the correct approach'
πŸ“· A time-series chart titled 'Nifty Futures Calendar Spread Behavior', showing two lines over a 12-month period β€” one labeled 'Naive Assumption: Spread Mean-Reverts to a Fixed Historical Average' shown as a flat dashed horizontal line, and another labeled 'Actual Spread Behavior: Driven by Shifting Roll Return / Curve Shape' shown as a wandering line that drifts away from the naive fixed average for extended stretches before eventually reverting, annotated with a callout reading 'Testing the roll return itself for mean reversion, not just the raw spread, is the correct approach'

5. Why This Matters for Momentum Strategies

Revisiting the connection from Chapter 6: because roll return tends to persist for extended periods (backwardation or contango conditions don't typically flip overnight), it becomes a genuine, structural driver of time-series momentum in futures markets.

Extracting Roll Return Directly

Beyond simply riding roll-return persistence as part of a broader momentum strategy, sophisticated traders sometimes attempt to isolate and trade the roll-return component directly, separate from taking any view on the direction of the underlying spot price.

The general approach: find a second instrument (another future, or a spot-tracking ETF) that is correlated with or cointegrated to the spot price of the commodity in question. By taking an offsetting position in that correlated instrument alongside your futures position, you can construct a combined position whose spot-return exposure roughly cancels out β€” leaving a return stream that's mostly driven by the roll return itself.

Classic Example: If you're long MCX Crude Oil futures during a period of sustained backwardation (aiming to capture the positive roll return), but you don't want to also be making an implicit directional bet on crude oil prices themselves, you could simultaneously short a correlated instrument that tracks crude oil's spot price movement closely, without carrying the same roll-return dynamic. The combined position's spot-return exposure largely cancels between the two legs, while the roll return from the futures leg β€” which the offsetting instrument doesn't share β€” remains as the primary source of expected return.

Note: This kind of roll-return extraction strategy is considerably more advanced than the basic time-series and cross-sectional momentum rules from Chapter 6, and requires careful attention to correlation stability between the two legs β€” a relationship that, per Chapter 4's lessons, needs its own dedicated cointegration testing rather than being assumed.


6. Practical Considerations for Indian Futures Markets

A few India-specific mechanics worth keeping in mind as you apply this chapter's concepts:

  • Nifty and Bank Nifty futures typically trade in contango during 'normal' market conditions, reflecting the cost-of-carry model (interest rates minus expected dividend yield) β€” since Indian equity indices have historically had positive interest-rate carry exceeding dividend yield, far-month contracts often trade at a premium to near-month contracts. This can shift during periods of unusual dividend concentration or shifting rate expectations.
  • MCX commodity futures (Gold, Silver, Crude Oil, Natural Gas) each have their own distinct typical curve behavior, driven by different underlying economics β€” storage costs for physical commodities, seasonal demand patterns, and global supply dynamics all shape whether a given commodity tends toward backwardation or contango, and this can vary meaningfully across commodities and over time.
  • Rollover dates and continuous contracts: When backtesting any futures strategy (revisit Chapter 1's warning on futures continuous contracts), remember that splicing together a continuous price series across multiple expiries requires careful back-adjustment β€” get this wrong, and you'll introduce phantom price jumps at each rollover date that have nothing to do with genuine roll return, corrupting your backtest with exactly the kind of artificial signal Chapter 1 warned about.

Golden Rule: Whenever you're building a strategy on Indian index or commodity futures, explicitly check the current shape of the futures curve (backwardation or contango) before assuming your mean-reversion or momentum logic applies cleanly β€” the curve shape isn't just background noise, it's often a meaningful part of why your strategy is generating the returns it is.


7. Key Takeaways

  • A futures contract's total return decomposes into spot return + roll return; roll return accrues continuously every day a position is held, not just on the specific rollover date.
  • Backwardation (near-dated contracts priced higher than far-dated) produces positive roll return; contango (far-dated priced higher) produces negative roll return.
  • The 'normal backwardation' mnemonic β€” hedgers sell futures to lock in prices, compensating speculators with a discount β€” helps remember the terminology, though real markets (like crude oil) don't always follow this 'normal' pattern.
  • A spot-tracking ETF and a futures contract on the same underlying will not necessarily cointegrate, because the futures contract carries an additional roll-return component the ETF doesn't share β€” a common and costly trap for mean-reversion pairs traders.
  • Calendar spreads are not automatically mean-reverting just because both legs share the same underlying; what matters is whether the roll return itself (the curve shape) is mean-reverting.
  • Persistent roll return is a genuine, structural driver of time-series momentum in futures, and sophisticated traders can attempt to isolate and trade the roll-return component directly using an offsetting, correlated instrument.
  • Always check the current futures curve shape (backwardation vs. contango) for Indian index and commodity futures before assuming a mean-reversion or momentum strategy will behave as expected β€” curve shape is often a real part of your strategy's return story, not background noise.

Coming up in Chapter 8: With a solid grasp of strategy construction across both mean reversion and momentum, we shift focus to arguably the most important topic in this entire course β€” position sizing and the Kelly formula β€” exploring how to determine optimal leverage, why full Kelly is best treated as an upper bound rather than a target, and practical alternatives like half-Kelly and simulation-based sizing for the fat-tailed, non-Gaussian returns real strategies actually produce.

Chapter 7: Futures Mechanics β€” Roll Returns, Backwardation, and Contango | Algorithmic Trading 101: Strategies, Backtesting & Risk Management - TradeKaizen