Quant Memo
Advanced

Spread Construction and Hedge Ratios

Before you can trade a spread you have to build one, and the hedge ratio you pick decides what the residual actually contains. Regressing A on B and regressing B on A give answers 18% apart on the same data — and the gap between them is bigger than any sampling error you will ever quote.

Prerequisites: Ordinary Least Squares (OLS), Cointegration

A spread is not a thing you find in the market. It is a thing you build: pick two or more instruments, pick weights, subtract. The weights are the hedge ratio, and they do more work than anything else in the strategy — they decide whether what is left over is a mean-reverting residual you can trade or a slow directional bet you have accidentally taken on.

What the residual is supposed to contain

The construction is always the same shape. For a two-leg spread,

st=PtAβPtBs_t = P^A_t - \beta\,P^B_t

In words: hold one unit of A, short β\beta units of B, and sts_t is what that combined position is worth. The game is choosing β\beta so that sts_t is stationary — it wobbles around a fixed level instead of wandering off. Get it right and every common driver of the two names (the market, the sector, the oil price) cancels, leaving only the relative dislocation. Get it wrong and a slice of the common driver survives, so you are trading the sector while telling yourself you are trading the pair.

The explorer below is the picture of the estimate. The fitted line is the hedge relationship; the vertical residuals hanging off it are the spread, day by day. Drag the points and watch them change — that scatter is the object you are trying to make stationary.

Regression explorer
amber = residuals
fitted slope 1.133true slope 1.00 0.642SSres 42.0

Four defensible answers, and they disagree

Run 250 days of daily closes on two refiners, with r2=0.85r^2 = 0.85 between the price levels.

MethodWhat it assumesβ\beta
OLS, A on BAll the noise is in A1.18
Total least squaresNoise split between both1.31
OLS, B on A, then invertAll the noise is in B1.39
Volatility ratio, σA/σB\sigma_A/\sigma_BEqual-risk legs, ignore correlation1.28

These are the same data. The spread from 1.18 to 1.39 is 18%, and it comes entirely from a choice nobody writes down: which variable you decided was the noisy one.

Now put a number on that choice. The OLS slope of A on B is ρσA/σB\rho\,\sigma_A/\sigma_B; inverting the reverse regression gives σA/(ρσB)\sigma_A/(\rho\,\sigma_B). The ratio between them is exactly 1/ρ2=1/0.85=1.1761/\rho^2 = 1/0.85 = 1.176. So the disagreement is not arbitrary — it is 1/r21/r^2, and it shrinks only as the fit gets near-perfect.

Compare that to the sampling error you would quote in a report. The standard error of the OLS slope here is β(1ρ2)/ρ2/n=1.18×0.420/15.8=0.031\beta\sqrt{(1-\rho^2)/\rho^2}/\sqrt{n} = 1.18 \times 0.420/15.8 = 0.031, so a two-standard-error interval is [1.12,1.24][1.12,\,1.24]. The choice of estimator moves β\beta three times further than the sampling noise you were worried about.

Hedge-ratio uncertainty is dominated by specification, not by sample size. More data tightens the confidence interval around whichever estimator you picked; it does nothing about the fact that a different, equally defensible estimator sits 18% away.

What the difference costs

Take a $60,000 short in A: 1,000 shares at $60.

  • At β=1.18\beta = 1.18: buy 1,180 shares of B at $50 = $59,000.
  • At β=1.39\beta = 1.39: buy 1,390 shares of B at $50 = $69,500.

The second book carries $10,500 more long exposure to B and its sector — 17.5% of the position, unhedged. If the sector moves 3% while you wait for convergence, that leaks $315 of P&L that has nothing to do with your thesis. For scale: at σeq=\sigma_{\text{eq}} = $1.20 per share-pair, the whole 2-sigma-to-zero trade is worth about $2,400 gross on 1,000 pairs. You have introduced noise worth an eighth of the edge, and it recurs on every move the sector makes.

The practical rule: put the less liquid, noisier instrument on the left-hand side, because OLS attributes all error to the dependent variable. If neither leg is obviously noisier, use total least squares and stop pretending you know.

Prices, log prices, and what drifts

Regressing raw prices gives a share ratio: 1,180 shares of B per 1,000 of A, fixed. Regressing log prices gives an elasticity, which implies a fixed dollar ratio and therefore needs rebalancing as prices move.

The difference is not academic. Hold the share-ratio hedge while B rallies 20% to $60 and A rallies 10% to $66, and the legs become $66,000 short against $70,800 long — a $4,800 net long that you never chose. Over a multi-week holding period on a volatile pair, that drift can exceed the convergence you are waiting for. Most desks fit on log prices for anything held longer than a few days, and rebalance the dollar legs on a threshold.

One more distinction that trips people up: a hedge ratio from a regression of returns is a risk hedge — it minimises the variance of the combined position. A hedge ratio from a regression of price levels is a cointegrating vector — it is the one that makes the level stationary. They are different numbers, and only the second gives you something with a mean to trade back to.

Estimating it once is the real mistake

Fitting β\beta once and freezing it assumes the relationship is a constant of nature. It is not: capital structures change, a name issues equity, a business mix shifts. The usual fixes are a rolling 250-day re-fit (simple, but it makes β\beta a noisy series and you pay for the turnover), exponential weighting, or a Kalman filter that treats β\beta as a state which random-walks.

The filter's tuning knob — how much state noise you allow relative to observation noise — is genuinely hard to set, and getting it wrong destroys the book in a specific way. When the spread stretches, an over-responsive filter reads the stretch as a change in the relationship and slides β\beta toward the new prices. The z-score collapses back to zero on its own, the signal vanishes, and you never put on the trade that was about to pay.

A high r2r^2 between two price series is not evidence of a tradeable relationship. Two independent random walks routinely produce r2r^2 above 0.8 — that is spurious regression, and it is the default outcome for non-stationary data. The hedge ratio is only meaningful once the residual has passed a unit-root test.

In interviews

Say that the hedge ratio determines what survives in the residual, then show you know OLS is asymmetric: A-on-B and B-on-A differ by a factor of 1/r21/r^2, so at r2=0.85r^2=0.85 the two answers are 18% apart, and that gap dwarfs the standard error. Give the rule (noisier variable as the dependent one, or TLS), distinguish a returns beta from a cointegrating vector, and finish on the drift problem — a fixed share ratio silently becomes a directional position as prices move.

Related concepts

Used in strategies

Practice in interviews

Further reading

  • Engle & Granger (1987), Co-integration and Error Correction
  • Vidyamurthy, Pairs Trading: Quantitative Methods and Analysis
  • Johansen (1991), Estimation and Hypothesis Testing of Cointegration Vectors
ShareTwitterLinkedIn