Decomposing Portfolio Variance into Asset Risk Contributions
Summary
The document gives a general method for assigning portfolio variance to individual assets from a covariance matrix and weight vector. Total variance is the quadratic form of weights and covariance. For each asset, its variance contribution is its weight multiplied by the covariance-weighted exposure across all assets, equivalently the weight times the corresponding row of the covariance matrix dotted with the full weight vector.
Summing these contributions recovers total portfolio variance, so dividing each contribution by total variance gives percentage shares that sum to one. The answer verifies the method against a two-asset example, including the contribution of the covariance term to each asset’s allocation. It identifies risk-contribution literature as references. The allocation is a mathematical decomposition under this definition; with negative weights or hedging relationships, individual contributions can be negative, so percentages need not each lie between zero and one.
Key ideas
- Portfolio variance is the weight vector multiplied through the covariance matrix as a quadratic form.
- An asset’s variance contribution equals its weight times its covariance-weighted exposure to the portfolio.
- The contributions sum to total portfolio variance by construction.
- Dividing each contribution by total variance gives shares that sum to one, though individual shares can be negative.
Tags
Full text
# Variance attribution calculation from a covariance matrix
# Variance attribution calculation from a covariance matrix
Say I have a portfolio with two assets with weights $(x, y)$, and the covariance matrix of the two asset is $((a, r)(r, b))$. Then the total portfolio variance would be $x^2a+2xyr+y^2b$. It is easy to get that the percentage of the variance due to asset $x$ is $\frac{x^2a+xyr}{x^2a+2xyr+y^2b}$. I wonder in the n-dimensions cases, how to calculate the variance percentage for each asset mathematically based on the covariance matrix?
## Answer by nbbo2 (score 6, accepted)
https://quant.stackexchange.com/a/54038
Suppose the covariance matrix is $V$ (which is n by n) and the weights are $w$ (of length n).
Then the Portfolio Variance is $V_p = w^T V w$
and the Risk Contribution (in terms of variance) of asset $k$ is
$RC_k=w_k \sum_j V[k,j]w_j$
in words this is "the weight of asset k times the inner product of the k-th row of $V$ and the weight vector". (Sometimes the "inner product of ..." just mentioned is given the name the Marginal Risk Contribution of asset $k$, which leads to the compact expression $RC_k=w_k MRC_k$).
We then have the "decomposition property" that $V_p=\sum_k RC_k$ or in percentage terms
$$\sum_k \frac{RC_k}{V_p}=1$$
If we apply this to the two by two case
$V=\begin{bmatrix} a & r \\ r & b \\ \end{bmatrix}$
and $w=\begin{bmatrix}x \\ y \end{bmatrix}$
we get that the total variance of the portfolio is $V_p=a x^2+2 r x y + b y^2$
The variance contribution of the first asset is $RC_1=x(ax+ry)$
and the percentage contribution is the ratio of these two (the latter divided by the former). This agrees with your result.
Two good references for these results are
Edward Qian: On the Financial Interpretation of Risk Contribution: Risk Budgets Do Add Up (2005)
S. Maillard, T. Roncalli: On the properties of equally-weighted risk contributions portfolios (2009)
also often cited is
D Tasche: Capital Allocation to Business Units and Sub-Portfolios: the Euler Principle (2008)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.