Every Quant

Residual

Short answer

A residual is the part of an observed value that a model does not explain: the actual value minus the fitted value. In pairs trading and statistical arbitrage, it is the part of a stock's price move left after removing market, sector or partner-stock effects.

Statistical models split data into an explained part and a leftover part. In a regression of a stock on its partner, the residual is how far the stock sits from where the relationship says it should be. If the relationship is stable, residuals should wander around a constant level and not trend away. Residuals that keep growing suggest the model is wrong or the relationship has changed.

How it is used in strategy design and testing

In strategy design, residuals are the raw material of relative-value trading. Designers regress each asset on its partner or on a set of factors, then study whether the residual tends to revert. The size of a residual is often expressed as a z-score, and the speed of reversion by how quickly gaps tend to shrink. The choice of model, estimation period and factors all shape which residuals appear.

In testing, residuals must come from models fitted only on past data and re-estimated as time moves forward. Testers check residuals for stationarity rather than assuming it, and watch for structural breaks such as mergers or business changes. Fitting the model on the whole sample makes residuals look more stable than they were in real time.

Common mistakes

  • Fitting on the full sample. In-sample residuals look cleaner than those a trader would have seen.
  • Assuming residuals revert. Without a stable relationship, a residual can drift indefinitely.
  • Ignoring model choice. Different factor sets produce different residuals and different trades.
  • Overlooking breaks. Corporate events can permanently change a relationship.

Where the term comes from

Avellaneda and Lee studied statistical arbitrage built on the residuals of stocks after removing factor exposures.

Education only. Not investment advice.

Questions people ask

What is a residual in statistics?

It is the difference between an observed value and the value a model predicts.

How are residuals used in pairs trading?

The residual from regressing a stock on its partner measures how far the pair has moved from its usual relationship.

Why should residuals be stationary?

A stationary residual tends to return to its mean. If it is not stationary, there is no reason to expect a gap to close.

What is a residual in factor models?

It is the part of an asset's price change not explained by market or factor moves, sometimes called the idiosyncratic part.

Papers

Written and checked by the Every Quant research team · Updated . How we write and check entries: methods.