Python 中的 GARCH 模型
Chelsea Yang
Data Science Instructor


描述变量与其滞后值的相关性
标准化残差存在自相关 ⇒ 模型可能不可靠
检测自相关:

图中红色区域为置信区间(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])
Python 中的 GARCH 模型