验证 GARCH 模型假设

Python 中的 GARCH 模型

Chelsea Yang

Data Science Instructor

可视化检查

原始收益数据

标准化残差

Python 中的 GARCH 模型

自相关

  • 描述变量与其滞后值的相关性

  • 标准化残差存在自相关 ⇒ 模型可能不可靠

检测自相关:

  • ACF 图
  • Ljung-Box
Python 中的 GARCH 模型

ACF 图

  • ACF:自相关函数
  • ACF 图:按滞后展示自相关的可视化

ACF 图

图中红色区域为置信区间(alpha = 5%)

Python 中的 GARCH 模型

Python 中的 ACF 图

from statsmodels.graphics.tsaplots import plot_acf

plot_acf(my_data, alpha = 0.05)
Python 中的 GARCH 模型

Ljung-Box 检验

  • 检验时间序列一组自相关是否显著偏离 0
  • H0:数据相互独立分布
  • P 值 < 5%:模型不可靠
Python 中的 GARCH 模型

Ljung-Box 检验(Python)

# 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 模型

让我们练习吧!

Python 中的 GARCH 模型

Preparing Video For Download...