Skip to content
All library documents

Constructing a Pairs Trading Spread with Regression Intercept and Hedge Ratio

Article Quant Q&A · Author: Tariq Hamid

Summary

The document asks how to define a spread for pairs trading after estimating a linear relationship between two asset prices. It compares subtracting the fitted intercept and scaling one price by the estimated gradient with omitting the intercept or simply taking the raw price difference. It also shows threshold-based trading examples using a standardized spread, though the example's order quantities and legs are not fully consistent.

The text offers no answer, empirical evidence, or guidance on estimating the relationship, choosing a lookback window, or validating mean reversion. Its useful contribution is identifying modeling choices that affect the spread and its z-score: the intercept shifts the level, while the gradient sets the relative hedge scale. A trader would need further analysis to determine the appropriate specification and translate signals into balanced positions; the question alone does not establish that the proposed thresholds or spread will be profitable.

Key ideas

  • A pairs spread may be formed from a price difference adjusted by a fitted gradient.
  • Including the regression intercept shifts the spread level, while standardizing it compares deviations with its historical distribution.
  • The document raises, but does not resolve, which spread specification is appropriate.
  • Its sample trading rules do not explain how to size both legs consistently.

Tags

Full text
# Pairs trading intercept


# Pairs trading intercept












For a pairs trade, when calculating the zscore should I include the intercept point in the calculation:

```
spread = price2 - (gradient * price1) - intercept
zscore = (spread - average)/standard_deviation
```

or should I exclude the intercept:

```
spread = price2 - (gradient * price1)
zscore = (spread - average)/standard_deviation
```

I then check the zscore and trade accordingly:

```
if zscore > 2.5:
  sell qty2
  buy qty2
elif zscore < -2.5:
  buy qty2
  sell qty1
```

Also, should the spread calculation include the gradient:

```
spread = price2 - (gradient * price1)
```

or

```
spread = price2 - price1
```

?

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.