Get Started

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”

View Course

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)

This exercise is part of the course

Introduction to Portfolio Risk Management in Python

IntermediateSkill Level
4.5+
11 reviews

Evaluate portfolio risk and returns, construct market-cap weighted equity portfolios and learn how to forecast and hedge market risk via scenario generation.

Learn about the fundamentals of investment risk and financial return distributions.

Exercise 1: Financial returnsExercise 2: Financial timeseries dataExercise 3: Calculating financial returnsExercise 4: Return distributionsExercise 5: Mean, variance, and normal distributionExercise 6: First moment: MuExercise 7: Second moment: VarianceExercise 8: Annualizing variance
Exercise 9: Skewness and kurtosisExercise 10: Third moment: SkewnessExercise 11: Fourth moment: KurtosisExercise 12: Statistical tests for normality

What is DataCamp?

Learn the data skills you need online at your own pace—from non-coding essentials to data science and machine learning.

Start Learning for Free