# How is the standard deviation and variance of a two-asset portfolio calculated?

Banking & FinanceFinance ManagementGrowth & Empowerment

#### Ethical Hacking & Cyber Security Online Training

36 Lectures 5 hours

#### Machine Learning & BIG Data Analytics: Microsoft AZURE

46 Lectures 3.5 hours

#### Advance Big Data Analytics using Hive & Sqoop

Best Seller

50 Lectures 4 hours

Portfolio standard deviation is the general standard deviation of a portfolio of investments of more than one asset. It shows the total risk of the portfolio and is important data in the calculation of the Sharpe ratio.

It is a well-known principle of finance that "more the diversification, less is the risk." It is true unless there is a perfect and well-established correlation between the returns on the portfolio investments. To achieve the highest benefits of diversification, the standard deviation of a portfolio of investments should be lower than the general weighted average of each standard deviation of the individual investments.

In other words, portfolio variance is a statistical measure that shows the degree of spread of datasets of a portfolio. It is a very important concept in modern investment theory. The statistical measure by itself may not provide significant insights, but the standard deviation of the portfolio using portfolio variance can be calculated using it.

The calculation of portfolio variance considers not only the inherent risk of individual assets but also considers the correlation between each pair of assets in the portfolio. Thus, the statistical variance analyzes in which directions the assets will move? The golden rule of portfolio diversification is to select two assets with a low or negative correlation with each other.

## Formula for Portfolio Variance

The variance for a portfolio of two assets can be calculated with the formula −

$$\mathrm{Portfolio\:Variance = (𝑤_{1})^{2}(σ_{1})^{2} + (𝑤_{2})^{2}(σ_{2})^{2} + 2\:𝑤_{1}𝑤_{2}\:Cov_{1,2}}$$

Where −

• $𝑤_{𝑖}$ – the weight of the ith asset

• $(σi)^{2}$ – the variance of the ith asset

• $Cov_{1,2}$– the covariance between assets 1 and 2

One thing to note here is that covariance and correlation are mathematically related. The relationship is usually expressed in the following way −

$$\mathrm{ρ_{1,2}=\frac{Cov_{1,2}}{σ_{1}σ_{2}}}$$

Where −

• $ρ_{1,2}$ – the correlation between assets 1 and 2

• $Cov_{1,2}$ – the covariance between assets 1 and 2

• $σ_{1}$ – the standard deviation of asset 1

• $σ_{2}$ – the standard deviation of asset 2

Knowing the relationship between covariance and correlation, we can now rewrite the formula for the portfolio variance as shown below −

$$\mathrm{Portfolio\:Variance = (𝑤_{1})^{2}(σ_{1})^{2} + (𝑤_{2})^{2}(σ_{2})^{2} + 2\:𝑤_{1}𝑤_{2}\:Cov_{1,2}}$$

The standard deviation of the portfolio variance is given by the square root of the variance.

$$\mathrm{Portfolio\:SD =\sqrt{(𝑤_{1})^{2}(σ_{1})^{2} + (𝑤_{2})^{2}(σ_{2})^{2} + 2\:𝑤_{1}𝑤_{2}\:Cov_{1,2}}}$$

In the calculation of the variance for a portfolio that consists of multiple assets, one should calculate the factor $(2\:𝑤_{1}𝑤_{2}\:Cov_{1,2})$ or $(2\:𝑤_{1}𝑤_{2}\:ρ_{𝑖,𝑗}σ_{𝑖}σ_{𝑗})$for each pair of assets in the portfolio.