GJR GARCH 模型的估计
与其他 GARCH 模型一样,GJR GARCH 模型用于预测波动率。现在我们用该模型预测 Microsoft 在 1999 年至 2017 年期间的日度收益率的波动率。
这些收益率已在控制台中以变量 msftret 提供。我们已为您计算了标准 GARCH 的波动率预测,保存在对象 sgarchvol 中。
本练习是课程的一部分
在 R 中构建 GARCH 模型
练习说明
- 指定带偏度的 student t 分布的 GJR GARCH 模型。
- 估计该模型。
- 将 GJR GARCH 的波动率与
sgarchvol进行比较。
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Specify the GJR GARCH model
garchspec <- ___(mean.model = list(armaOrder = c(0,0)),
___ = list(model = ___),
___ = ___)
# Estimate the model and compute volatility
gjrgarchfit <- ___(data = ___, spec = ___)
gjrgarchvol <- ___(___)
# Compare volatility
plotvol <- plot(abs(msftret), col = "grey")
plotvol <- addSeries(___, col = "red", on=1)
plotvol <- addSeries(sgarchvol, col = "blue", on=1)
plotvol