What It Does

WTI / Brent Spread runs on daily bars. On every session close where both legs printed, the strategy:

  1. Computes the closing price ratio ratio = CL_close / BZ_close.
  2. Pulls the prior lookback_days daily ratios (default 60), computes their mean and standard deviation.
  3. Computes today’s z-score: z = (today_ratio - mean) / stdev.
  4. If flat and z >= entry_z (default 2.0): short the spread by selling CL and buying BZ (the ratio is high relative to history; WTI is “rich” vs Brent).
  5. If flat and z <= -entry_z: long the spread by buying CL and selling BZ (the ratio is low; WTI is “cheap” vs Brent).
  6. If in a position and |z| <= exit_z (default 0.5): flatten both legs.

The strategy has no stops, no profit targets, no holding-period limit. The z-score crossing back through the exit band is the only exit. A spread that keeps stretching against the position is held until it eventually reverts or the backtest ends.

Why Pair Trades Get Used

WTI and Brent are both light sweet crude benchmarks and move together most of the time. The price difference reflects logistics and quality: Brent is waterborne and easier to ship globally; WTI is landlocked at Cushing, Oklahoma, and depends on pipeline and rail capacity to reach the coast. When US production outruns takeaway capacity, WTI cheapens versus Brent. When global supply tightens or sanctions reroute flows, the gap can narrow or invert.

A pair spread isolates this relative move. By design it has less directional exposure than a single-leg position: a large move in the absolute oil price that hits both benchmarks equally leaves the spread unchanged. The trade pays off when the relationship between the two legs reverts, not when oil itself moves.

The flip side: when the relationship structurally changes (a new pipeline opens, sanctions reshape flows, refining demand shifts), the spread can stretch beyond historical bands and stay there. The strategy does not detect or adapt to regime changes; it just keeps placing the same trade.

Notional Balance

CL and BZ are both quoted in $/barrel and both contracts represent 1,000 barrels, so one point of price movement is $1,000 on either leg. A default cl_quantity:bz_quantity of 1:1 is roughly dollar-neutral at any price regime, which is rare for cross-exchange pairs and is a big part of why this pair is convenient to trade as a ratio. Users who want a directional tilt can size the legs unequally; the strategy will accept any positive integer pair.

Presets

Five presets cover the canonical variants:

  • Classic Z=2 Both Sides: the default starting point. Trades both directions at 2-stdev entry, 0.5-stdev exit.
  • Tight Z=1.5 / Wide Z=2.5: narrower or wider entry bands. Tighter fires more often with more whipsaw; wider fires rarely but with cleaner setups.
  • Long Spread Only / Short Spread Only: directional variants for when you have a view on which side of the relationship is more reliable.

Best In

  • Periods where the WTI-Brent spread is range-bound and driven by ordinary inventory and freight dynamics.
  • Research where you want a market-neutral baseline against absolute oil price moves.
  • Studies on how often crude benchmark spreads mean-revert across different lookback windows.

Where It Struggles

  • Regime shocks. The April 2020 negative-WTI episode and the 2022 EU sanctions on Russian crude both reshaped the WTI-Brent relationship in ways the rolling z-score did not anticipate. Trades placed near those breaks took large drawdowns or stayed open for months.
  • Structural pipeline or storage changes. New WTI export capacity from the US Gulf gradually narrowed the historical Brent premium across 2020-2024; a strategy keyed off the older mean kept fighting the new equilibrium.
  • Funding cost is not modeled. Real cross-exchange spread trades have margin requirements on both legs, and roll costs differ between NYMEX and ICE Europe.

What It Does Not Do

  • No stops, no targets, no time-based exit. A spread that never reverts to the exit band stays open.
  • No regime detection. The strategy keeps applying the same z-score rule whether the relationship is range-bound or in the middle of a structural break.
  • No dynamic leg sizing. The cl_quantity:bz_quantity ratio is fixed per preset.
  • No roll handling for the continuous front-month series. Backtests use whatever continuous series the data files provide; live trading would require an explicit roll rule.

Test this strategy

Run it on your contracts, timeframes, and parameters.