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

Exercise

ACF plot

If a GARCH model is doing a good job, the standardized residuals should not exhibit autocorrelations. In this exercise, you will practice using an ACF plot to detect autocorrelations in the data.

The coefficient of correlation between two values in a time series is called the autocorrelation function (ACF), and an ACF plot is a visual representation of correlations between different lags. There are pre-defined functions in Python statsmodels packages that enable you to generate ACF plots easily.

A GARCH model has been fitted with the S&P 500 return data, and its standardized residuals have been calculated and saved in std_resid. The matplotlib.pyplot has been imported as plt.

Instructions

100 XP
  • Import the module needed for ACF plots from the statsmodels package.
  • Plot the GARCH model standardized residuals saved in std_resid.
  • Generate an ACF plot of the standardized residuals, and set the confidence level to 0.05.