# 4 – L3 04 Portfolio Variance V2

Now, let’s calculate a metric of the total risk inherent to the portfolio. We’ll measure risk with volatility or more specifically with the variance, the square of the volatility. Let’s review the formula for the variance of one asset. This is a slightly different formula for variance than we’ve seen before, but it’s similar in spirit. Instead of just summing the squared difference between each observation and the mean and dividing by n, we multiply the squared difference by the probability of that value occurring and sum those. The formula will be the same as dividing by n, if the probability of each scenario occurring is the same. So, now let’s calculate the variance of the portfolio. This takes just a few simple steps, but for now we will skip ahead to the answer. You’ll find the full derivation given as text on this page. We find that the portfolio variance equals the squared of weights times each asset’s variance, plus a term that includes the covariance of the assets multiplied by each weight. Remember that the covariance is a measure of the joint variability of two random variables. When stock A is above its average, if stock B is also above its average, they are varying together or covarying, so they have a positive covariance. This covariance term turns out to be very important. It basically underlies the benefit of diversification. Remember that the covariance is just the correlation between the two variables times each of their standard deviations. We know that the correlation coefficient takes values between minus one and one, where minus one means the variables are perfectly anti-correlated, and one means that they are perfectly correlated. Both correlation and covariance are measures of how much two variables vary together. With this knowledge, we can rewrite the portfolio variance in terms of the correlation. Let’s see what happens to the variance of our two-asset portfolio when the correlation between stock A and stock B is one. In that case, the expression to the right of the equal sign is a perfect square, and the portfolio standard deviation is just a weighted average of the standard deviations of the individual stocks. In all other cases, the correlation coefficient is less than one. So the portfolio standard deviation is less than the weighted average of the individual standard deviations. How about when the correlation between stock A and B is minus one? In that case, the portfolio variance reduces to the weighted difference between the two standard deviations squared and the portfolio standard deviation becomes the absolute weighted difference between the individual standard deviations. In the case when the correlation is minus one, we can get a perfectly hedged portfolio by solving this equation. If we plug in the relation that the weights x_A and x_B sum to one, we get that x_A equals Sigma B divided by Sigma A plus Sigma B. These weights drive the portfolio variance to zero. However, in reality, since every asset is affected by systematic risk, the correlation between two assets will never reach minus one.