Strategy Detail
Copper/Gold Pair Spread
Trades the Copper/Gold price ratio as a mean-reversion spread. Long the ratio when it stretches low, short when it stretches high, exit on z-score return to neutral.
Sample runs (3)
What It Does
Copper/Gold Pair Spread runs on daily bars. On every session close where both legs printed, the strategy:
- Computes the closing price ratio
ratio = HG_close / GC_close. - Pulls the prior
lookback_daysdaily ratios (default 60), computes their mean and standard deviation. - Computes today’s z-score:
z = (today_ratio - mean) / stdev. - If flat and
z >= entry_z(default 2.0): short the spread by selling HG and buying GC (the ratio is high relative to history, so copper is “rich” against gold). - If flat and
z <= -entry_z: long the spread by buying HG and selling GC (the ratio is low, so copper is “cheap” against gold). - 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 Copper Over Gold
The Copper/Gold ratio is one of the older “macro pulse” gauges. Copper is sometimes called “Dr. Copper” because industrial demand for it tracks the real economy: construction, electrification, manufacturing. Gold is the opposite trade, a store of value that tends to be bid up when investors expect inflation, currency debasement, or financial stress.
When growth expectations are strong, copper outperforms gold and the ratio rises. When risk-off sentiment dominates, gold bid carries it past copper and the ratio falls. Traders and analysts watch the ratio as a regime indicator alongside things like the 10-year yield.
A pair spread tries to monetize the swings in this ratio. The bet is that extreme readings in either direction tend to reverse within weeks to months as the regime moderates.
A Regime Indicator, Not a Cointegrated Pair
This is worth being upfront about. ES/NQ are both equity indices with overlapping constituents, so their ratio has a real anchor. HG and GC do not share that. Copper and gold respond to different things, and the ratio can stretch and stay stretched for long periods when the macro backdrop genuinely changes.
A few examples of what that looks like in practice:
- Sustained risk-off years where gold runs and copper stagnates can keep the ratio depressed for many months. A long-spread entry early in such a regime sits in drawdown the whole time.
- Strong industrial cycles or supply shocks in copper (chip shortages, EV buildout, mine disruptions) can push the ratio high and keep it there.
- The mean and stdev recomputed daily are slow to adapt; if the regime shift is durable, the strategy keeps re-entering the same losing trade as the rolling window catches up.
The strategy does not detect regime changes. It applies the same z-score rule whether the ratio is range-bound or trending. Sizing the position so the worst-case drawdown is survivable matters more here than in a tighter pair.
Notional Balance
HG sits around $4/lb with a $25,000 multiplier per point, so one contract is roughly $100k notional. GC sits around $2000/oz with a $100 multiplier, so one contract is roughly $200k notional. The default hg_quantity:gc_quantity of 4:1 brings these closer to balance at typical 2020-2024 prices. It is a starting point; users running the strategy at very different price regimes may want to adjust the leg ratio.
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 waits for extreme exhaustion.
- Long Spread Only / Short Spread Only: directional variants for when you have a view on which side of the relationship is more likely to revert.
Best In
- Periods where global growth and risk-off pressure trade off in cycles rather than one dominating for years at a time.
- Research where you want a macro-regime baseline to compare other strategies against.
- Studies of how cross-commodity relationships respond to a shifting rate or growth backdrop.
Where It Struggles
- Multi-year regime shifts. A persistent risk-off period or a structural copper bull can keep the spread on the wrong side of the mean indefinitely.
- High overall commodity volatility. The z-score thresholds were tuned for a typical window; in chaotic markets the same z value represents a much larger dollar move per leg.
- Funding cost is not modeled. Real pair trades have margin on both legs and may carry implicit financing costs not reflected in the backtest.
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 dynamic leg sizing. The
hg_quantity:gc_quantityratio is fixed per preset and does not rebalance as prices drift. - No regime detection. The strategy keeps applying the same z-score rule whether the ratio is range-bound or trending hard.
- No adjustment for supply shocks or contract specification changes.
Presets (5)
Named parameter bundles for this family. Pick one to see its parameters and pre-fill the New Backtest form. The form lets you adjust contract, date range, and capital before running.
Preset
Classic Z=2 Both Sides
Enter when the HG/GC ratio crosses 2 stdev from a 60-day rolling mean; exit when it returns to 0.5 stdev. Two-sided.
Preset
Tight Z=1.5 Both Sides
Earlier entry at 1.5 stdev. Fires more often than the classic preset; expect lower win rate per trade and more whipsaw when the growth/risk regime is in transition.
Preset
Wide Z=2.5 Both Sides
Only trade extreme dislocations beyond 2.5 stdev. Very rare; aims for cleaner setups when the ratio reaches an exhaustion point.
Preset
Long Copper-Gold Spread Only
Only takes long-the-spread setups (long HG, short GC when the ratio is depressed). A directional tilt for periods where gold has run hard against copper and you expect copper to catch up.
Preset
Short Spread Only
Only takes short-the-spread setups (short HG, long GC when the ratio is stretched high). A directional tilt for periods where industrial demand has outpaced gold and you expect the relationship to normalize.