Annualizing variance
You can't annualize the variance in the same way that you annualized the mean.
In this case, you will need to multiply \( \sigma \) by the square root of the number of trading days in a year. There are typically 252 trading days in a calendar year. Let's assume this is the case for this exercise.
This will get you the annualized volatility, but to get annualized variance, you'll need to square the annualized volatility just like you did for the daily calculation.
sigma_daily
from the previous exercise is available in your workspace, and numpy
is imported as np
.
This is a part of the course
“Introduction to Portfolio Risk Management in Python”
Exercise instructions
- Annualize
sigma_daily
by multiplying by the square root of 252 (the number of trading days in a years). - Once again, square
sigma_annualized
to derive the annualized variance.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Annualize the standard deviation
sigma_annualized = sigma_daily*____
print(sigma_annualized)
# Calculate the annualized variance
variance_annualized = ____
print(variance_annualized)