Skip to content
All library documents

OLS and Total Least Squares for Hedge Ratio Estimation

Code Stratmill research code

Summary

This module describes two ways to estimate hedge ratios from security price data. Ordinary least squares (OLS) treats one selected asset as the dependent variable and fits coefficients for the remaining assets, optionally including an intercept. It returns the fitted coefficients, input series, and residuals, which can be used to examine how closely the linear relationship tracks observed prices.

Total least squares (TLS) uses orthogonal regression, accounting for deviations in both the dependent and explanatory variables. It also supports an optional intercept and returns coefficients and residuals. The document provides implementation details but no empirical comparison, performance evidence, or guidance on selecting assets. OLS and TLS rely on a linear relationship, and estimates from price levels alone do not establish that a spread is stationary or suitable for a trading strategy. Users need to assess model assumptions and hedge stability on their own data.

Key ideas

  • OLS estimates hedge coefficients by minimizing errors in the dependent variable.
  • TLS orthogonal regression accounts for deviations across the modeled variables.
  • Both methods can fit a model with or without an intercept.
  • Returned residuals can be inspected as candidate spread series, but the code gives no evidence of tradability.

Tags

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