Calculating Portfolio Variance from Asset Weights and Covariances
Summary
The document explains how to calculate the variance of a portfolio made from any number of random asset returns. It expresses portfolio variance as the sum of each weighted asset’s variance and the pairwise covariance contributions, with each term scaled by the relevant portfolio weights. Portfolio volatility is the square root of this variance.
The result applies beyond two assets and does not rely on any assumptions about the return distributions. The document gives the general mathematical identity but does not discuss how to estimate the individual variances or covariances from data, or how estimation error may affect a practical portfolio. It addresses variance as the chosen measure of volatility and assumes the portfolio return is a linear combination of the component returns.
Key ideas
- Portfolio variance can be calculated for any number of assets using their variances and pairwise covariances.
- Each asset’s variance contribution is scaled by the square of its portfolio weight.
- Each covariance contribution is scaled by the product of the two assets’ weights.
- The formula does not require distributional assumptions, though practical use still requires estimates of the inputs.
Tags
Full text
# Solving for volatility of a portfolio via its components
# Solving for volatility of a portfolio via its components
I have only been able to find the calculation for computing volatility for two assets, and I don't believe one can solve for covariance of $n$ assets where $n>2$ . Is there a method for solving for a portfolio's volatility through it's components purely mathematically? I can always solve via simulation but mathematically would be more precise.
## Answer by Richard Hardy (score 2, accepted)
https://quant.stackexchange.com/a/29964
> Is there a method for solving for a portfolio's volatility through it's components purely mathematically?
Take variance as a measure of volatility. Let $X_1,\dotsc,X_n$ be a set of random variables (e.g. asset returns). Let $a_1,\dotsc,a_n$ be a corresponding set of weights (e.g. portfolio weights). Then the variance of the linear combination of the random variables (the volatility of the portfolio) is
$$ \begin{aligned} \text{Var}\left(\sum_{i=1}^n a_i X_i\right) &= \sum_{i=1}^n \text{Var}(a_i X_i)+\sum_{i=1}^n \sum_{j=1}^n \text{Cov}(a_i X_i,a_j X_j) \\ &= \sum_{i=1}^n a_i^2 \text{Var}(X_i)+\sum_{i=1}^n \sum_{j=1}^n a_i a_j \text{Cov}(X_i,X_j). \\ \end{aligned} $$
This works for $n=2,3,\dotsc$, so not only for $n=2$. (Also, it is a very general result. It does not require any distributional assumptions.)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.