检验外汇收益率的正态性
到目前为止,本章的练习已经检验了股票指数收益率和个股收益率的正态性。
为巩固这些概念,您将把类似的方法应用到汇率对数收益率上。数据集 fx_d 包含 2001-2015 年间 EUR/USD、GBP/USD 和 JPY/USD 的日度对数收益率,数据集 fx_m 则包含相应的月度对数收益率。二者都是多变量数据,已加载到您的工作区。
哪一个月度对数收益率序列看起来最接近正态分布?
本练习是课程的一部分
R 中的定量风险管理
练习说明
- 使用合适的绘图函数,对
fx_d中的日度汇率对数收益率序列作图。 - 使用
apply()对fx_d中的每个序列进行 Jarque-Bera 检验。 - 使用相同的绘图函数对
fx_m中的月度对数收益率序列作图,并设置参数type = "h"。 - 使用
apply()对fx_m中的每个序列进行 Jarque-Bera 检验。 - 在
apply()中补全代码,对fx_m中的每个序列拟合一个 Student t 分布并获取参数估计。
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Plot the daily log-return series in fx_d
___(___)
# Apply the Jarque-Bera test to each of the series in fx_d
___(___)
# Plot the monthly log-return series in fx_m
___(___)
# Apply the Jarque-Bera test to each of the series in fx_m
___(___)
# Fit a Student t distribution to each of the series in fx_m
apply(___, ___, function(v){fit.st(v)$par.ests})