开始使用免费开始使用

根据对数似然选出最佳模型

在本练习中,您将练习使用对数似然来选择拟合效果最好的模型。

GARCH 模型使用极大似然法估计参数。一般来说,对数似然越大,模型越好,因为这意味着观测到当前数据的概率更大。

已经基于 S&P 500 的收益率数据定义并拟合了两个具有不同分布假设的 GARCH 模型。正态分布 GARCH 保存在 normal_result 中,偏斜的 Student t 分布 GARCH 保存在 skewt_result 中。

本练习是课程的一部分

Python 中的 GARCH 模型

查看课程

交互式实操练习

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

# Print normal GARCH model summary
print(____.____())
# Print skewed GARCH model summary
print(____.____())

# Print the log-likelihood of normal GARCH
print('Log-likelihood of normal GARCH :', ____.____)
# Print the log-likelihood of skewt GARCH
print('Log-likelihood of skewt GARCH :', ____.____)
编辑并运行代码