1. Learn
  2. /
  3. Courses
  4. /
  5. GARCH Models in Python

Exercise

Calculate volatility

In this exercise, you will practice how to compute and convert volatility of price returns in Python.

Firstly, you will compute the daily volatility as the standard deviation of price returns. Then convert the daily volatility to monthly and annual volatility.

S&P 500 time series has been preloaded in sp_data, and the percentage price return is stored in the ’Return’ column.

Instructions 1/2

undefined XP
    1
    2
  • Plot the 'Return' column in sp_data.
  • Calculate the standard deviation of 'Return' data.