Resolving Collinear Factors in Portfolio PnL Attribution
Summary
This note explains how redundant factor exposures make ordinary least squares attribution underdetermined. In its example, every Japanese stock has identical exposure to both a Japan country factor and a JPY currency factor, so the two columns of the exposure matrix are the same and the factor returns cannot be uniquely separated from the portfolio returns.
The proposed remedy is ridge regularization: add a penalty on the squared size of factor returns, making the system invertible, or use the Moore–Penrose pseudoinverse as the penalty tends to zero. For four equally weighted stocks, the example shows that the resulting factor-mimicking portfolios are identical and each receives half the total weight. This illustrates that the data identify the combined exposure but cannot distinguish the two factors’ contributions. The method stabilizes a solution; it does not create information that separates perfectly collinear factors, so interpretation still depends on model design or additional data.
Key ideas
- Identical exposure columns make separate factor contributions unidentifiable from the observed returns.
- Ridge regularization adds an L2 penalty and yields an invertible system for the factor-return estimate.
- The zero-penalty limit is expressed through the Moore–Penrose pseudoinverse.
- With duplicate factors, the example assigns identical factor-mimicking portfolios and splits their combined weight.
Tags
Full text
# How to attribute PnL to factors in a multi factor model
# How to attribute PnL to factors in a multi factor model
I have a multi factor model and I am trying to decompose PnL of a given portfolio into different factors. This theory makes sense.
But lets consider a portfolio of $n$ ($n$ is same as no of factors in our model) stocks from a particular country (lets say Japan). Assume that all the stocks have exposure to currency JPY.
The multifactor model includes Japan and JPY factors as 2 separate factors. Also assume that the portfolio is equi-weighted among all the stocks so $W$ is basically an identity matrix, $W=I$.
Now $X^TWX$ is effectively $X^TX$. $X$ would have two columns filled with 1 as the exposure of all stocks to factors JPY and Japan is going to be 1. But due to this $\text{det}(X) = 0$ and so $\text{det}(X^TX)=0$. So, $X^TWX$ is not invertible.
How is this solved in multi factor modelling for such cases?
## Answer by Chris Taylor (score 1)
https://quant.stackexchange.com/a/81187
You can add a small penalty term which penalizes the L2 norm of factor returns. So instead of solving
$$ \min_f || r - Xf||_2^2 $$
you solve
$$ \min_f ||r-Xf||_2^2 + \lambda ||f||_2^2 $$
which has the solution (assuming unit weights)
$$ \hat{f} = (X^TX + \lambda I)^{-1}X^T r $$
You can make $\lambda$ as small as you like, and $X^TX+\lambda I$ will always be invertible even when $X$ contains linearly dependent factors. The limit as $\lambda$ goes to zero is the Moore-Penrose pseudo-inverse of $X^TX$ i.e
$$ \hat{f} = (X^T X)^+ X^T r $$
In the specific case you discussed, where every stock has unit exposure to a "Japan" factor and also to a "JPY" factor, your matrix $X$ looks like (for the case of 4 stocks)
$$ X = \left( \begin{array} &1 & 1 \\ 1 & 1 \\ 1 & 1 \\ 1 & 1 \end{array} \right) $$
and the factor-mimicking portfolios are
$$ (X^TX)^+ X^T = \left( \begin{array} &.125 & .125 & .125 & .125\\ .125 & .125 & .125 & .125 \\ \end{array} \right) $$
i.e the two factor-mimicking portfolios are identical, and each has a total weight of $0.5$. If instead you had a single factor i.e. just "Japan" or just "JPY" but not both, then the factor-mimicking portfolio would have a weight of 0.25 in each stock, with a total weight of 1.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.