Skip to content
All library documents

Solving Factor Model Residuals with a Projection Matrix

Article Quant Q&A · Author: npp1993

Summary

The document explains how to recover residual returns when factor loadings and asset returns are known. It treats the factor model as a linear regression: loadings form the design matrix, factor realizations are the regression coefficients, and returns are the observed response. The coefficients are estimated by ordinary least squares, then fitted returns are subtracted from observed returns to obtain residuals.

This gives the residual-maker expression using the identity matrix minus the projection onto the column space of the loading matrix. The explanation assumes the loading matrix has full column rank so its cross-product is invertible. It offers no empirical examples or discussion of alternative estimators, constraints, or how latent factors themselves are obtained; its scope is the algebra of residual calculation under ordinary least squares.

Key ideas

  • Treat the factor loadings as the regression design matrix and returns as the response vector.
  • Estimate factor realizations by ordinary least squares when the loadings and returns are known.
  • Residuals equal observed returns minus their fitted values.
  • The projection formula requires the loading matrix cross-product to be invertible.

Tags

Full text
# Help understanding factor modeling, solving for residuals


# Help understanding factor modeling, solving for residuals












I am trying to understand and implement a factor model, and I think I might be having some issues. I am trying to solve for the residuals in the equation:

$$ R_{i} = \sum_{A=1}^{K}\beta_{iA} f_{A} + \epsilon_{i} $$

where R is an N x 1 (i = 1, ..., N) matrix, and there are K latent factors. I know the values inside the B (factor loadings) matrix and R (returns) matrices beforehand.

My understanding is that this equation gives the values the residuals matrix:

$$ \epsilon = (I_{N} - H)R $$ $$ H = \beta(\beta'\beta)^{-1}\beta' $$

Is this correct way to solve for the residuals?

## Answer by M. Jeunesse (score 1, accepted)

https://quant.stackexchange.com/a/26409

You see $(Y,X)$, you want a relation ship between $X$ and $Y$.

You will assume Linear regression

I.e you assume it exists $\beta$ such that $Y=X\beta + \epsilon$ and you want to find $\beta$.

Solution: $\hat{\beta}=(X'X)^{-1}X'Y$ and $\epsilon = Y-\hat{Y}=Y-X\hat{\beta}=(I-X(X'X)^{-1}X')Y$

So if you apply to your case :

$X\to B$

$\beta \to f$

$Y\to R$

$\epsilon \to \epsilon$

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.