GARCH Models in Python
Chelsea Yang
Data Science Instructor
Describe the correlation of a variable with itself given a time lag
Existence of autocorrelation in the standardized residuals indicates the model may not be sound
To detect autocorrelation:
Red area in the plot indicates the confidence level (alpha = 5%)
from statsmodels.graphics.tsaplots import plot_acf
plot_acf(my_data, alpha = 0.05)
# Import the Python module
from statsmodels.stats.diagnostic import acorr_ljungbox
# Perform the Ljung-Box test
lb_test = acorr_ljungbox(std_resid , lags = 10)
# Check p-values
print('P-values are: ', lb_test[1])
GARCH Models in Python