Session Ready
Exercise

Standard deviation versus variance

Let's talk about the difference between variance and standard deviation. From the video you already know that the standard deviation \(\sigma\) is simply the square root of the variance. Both measures are used in practice to calculate market or stock volatility. Why should you use one or the other?

In the variance calculation we square the weights and the variances. Because of this squaring, the variance is no longer in the same unit of measurement as the original data. Taking the root of the variance means the standard deviation is restored to the original unit of measure and therefore much easier to interpret.

Let's calculate the standard deviation. Available are the weights and the cov_matrix from the previous exercise.

Instructions
100 XP
  • Re-create the calculation of the portfolio variance using weights and the cov_matrix. This time, take the square root of the whole calculation, to obtain the standard deviation instead.
  • Print the standard deviation, the same way we did for the portfolio variance.