Skip to content
All library documents

Pairs Trading with Regression Residuals and Rolling Z-Scores

Article BigQuant

Summary

This example describes a two-stock pairs strategy based on the assumed long-term relationship between securities. It regresses one stock's price on the other's, then standardizes the regression residual using its recent mean and standard deviation. When the resulting z-score crosses either +1 or -1, the strategy sells one stock and commits the portfolio to the other, expecting the relative price relationship to revert. The example names two Chinese bank stocks and outlines a backtest workflow using adjusted closing prices, missing-data removal, daily signal updates, and transaction cost and slippage settings.

The author reports a backtest with 12.4% annualized return and an 18-point maximum drawdown, describing trading as infrequent. The document does not provide enough detail to assess the test's robustness, including the precise date range, whether the pair is formally cointegrated, or performance after costs. Its residual notation and description of the intercept are also unclear, so the signal calculation should be checked before implementation.

Key ideas

  • The strategy models one stock's price as a regression relationship with another stock's price.
  • A rolling z-score of the regression residual provides the relative-value trading signal.
  • The example switches entirely between two stocks when the z-score crosses either positive or negative one.
  • The backtest workflow includes adjusted prices, missing-data handling, slippage, and fees.
  • The reported performance is not accompanied by enough detail to judge robustness or out-of-sample behavior.

Tags

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