# Portfolio Variance

Portfolio variance measures the dispersion of average returns of a portfolio from its mean. It tells us about the total risk of the portfolio. It is calculated based on the individual variances of the portfolio investments and their mutual correlation.

Variance of an individual investment is calculated using the following steps:

• Calculate the arithmetic mean (i.e. average) of the asset returns
• Find out difference between each return value from the mean and square it
• Sum all the squared deviations and divided it by total number of observations

Let’s say an investment generated a return of 2%, 3%, 4% in three months. The arithmetic mean of returns equals 3%:

$$\mu=\frac{2\%+3\%+4\%}{3}=3\%$$

The sum of squared deviations is 0.02%:

$$Sum\ of\ Squared\ Deviations\\={(2\%-3\%)}^2+{(3\%-3\%)}^2+{(4\%-3\%)}^2\\=0.02\%$$

The variance of individual investment equals 0.0067%

$$\sigma^2=\frac{0.02\%}{3}=0.0067\%$$

In case of a portfolio, we need to work out the variance using the individual variance of each investment. However, because different investments have less than perfect correlation, we must account for the covariances between different investments. The variance of a portfolio is generally less than the weighted average of the variance of individual investments due to their less than perfect correlation.

## Formula

In case of a two-asset portfolio, we can work out portfolio variance as follows:

$${\sigma_p}^2={w_1}^2{\sigma_1}^2+{w_2}^2{\sigma_2}^2+2\times w_1w_2\times Covariance(1,2)$$

Where w1 is weight of first asset, w2 is weight of second asset, σ12 is variance of first asset and σ22 is variance of second asset and Covariance(1,2) shows covariance of the two assets. Since covariance equals the product of correlation coefficient and standard deviation of each asset, we can rewrite the above equation as follows:

$${\sigma_p}^2={w_1}^2{\sigma_1}^2+{w_2}^2{\sigma_2}^2+2w_1w_2\sigma_1\sigma_2\rho$$

ρ is the correlation coefficient of returns of first and second asset.

For a three-asset portfolio, the variance formula is as follows:

$${\sigma_p}^2=\\{w_1}^2{\sigma_1}^2+{w_2}^2{\sigma_2}^2+{w_3}^2{\sigma_3}^2\\+2{\times w}_1w_2\sigma_1\sigma_2\rho_{1,2}\\+2\times w_1w_3\sigma_1\sigma_3\rho_{1,3}\\+2\times w_2w_3\sigma_2\sigma_3\rho_{2,3}$$

Similarly, we can create a function for a portfolio with n number of assets where there are n number of terms of products of squared asset weighted and variances and n(n-1)/2 number of covariance terms.

A better way is to variance-covariance matrix to find portfolio variance.

## Example

Illustrate diversification benefits in a portfolio of three investments, a stock A, a bond B and a real estate asset C. The assets weights are 20%, 35% and 45% respectively, their standard deviations are 2.3%, 3.5% and 4%, the correlation coefficient between A and B is 0.6, between A and C is 0.8 and between B and C is 0.5:

We need to work out the variance of the portfolio as follows:

$${\sigma_p}^2={20\%}^2\times{2.3\%}^2+{35\%}^2\times{3.5\%}^2+{45\%}^2\times{4\%}^2\\+2\times20\%\times35\%\times2.3\%\times3.5\%\times0.6\\+2\times20\%\times45\%\times2.3\%\times4\%\times0.8\\+2\times35\%\times45\%\times3.5\%\times4\%\times0.5\\=0.0916%$$

The volatility is best measured using standard deviation which can be calculated as follows:

$$\sigma_p=\sqrt{{\sigma_p}^2}=\sqrt{0.0916\%}=3.03\%$$

If the assets had perfect correlation and they move together, the portfolio variance and standard deviation would have been 0.1215% and 3.49%. But since different assets rarely have perfect collection diversification is useful. A good test to see if addition of an asset will result in diversification benefit or not is to compare the Sharpe ratio before addition and after addition.