开始使用免费开始使用

将 GARCH 模型应用于加密货币

金融市场对正负面新闻冲击的反应往往并不相同。近几年加密货币市场的大幅波动就是一个典型例子。

在本练习中,您将分别在 Python 中实现 GJR-GARCH 和 EGARCH 模型,它们常用于刻画波动率对冲击的非对称响应。您将使用加密货币数据集 bitcoin_data,其中包含两列:"Close" 收盘价和 "Return" 收益率。

数据集 bitcoin_data 已为您预加载,且 "Close" 列中的历史价格已绘图展示。

本练习是课程的一部分

Python 中的 GARCH 模型

查看课程

交互式实操练习

通过完成这段示例代码来试试这个练习。

# Specify model assumptions
gjr_gm = arch_model(bitcoin_data['Return'], p = 1, q = 1, o = ____, vol = 'GARCH', dist = 't')

# Fit the model
gjrgm_result = gjr_gm.fit(disp = 'off')

# Print model fitting summary
print(____.____())
编辑并运行代码