18.4.2 美元对欧元汇率日对数收益率ARCH效应的检验
其它金融时间序列也存在ARCH效应。
考虑美元对欧元汇率日对数收益率,
从1999-01-04到2010-08-20。
读入数据:
d.useu <- read_table(
"d-useu9910.txt",
col_types=cols(.default=col_double())
)
str(d.useu)
## spc_tbl_ [2,930 × 4] (S3: spec_tbl_df/tbl_df/tbl/data.frame)
## $ year: num [1:2930] 1999 1999 1999 1999 1999 ...
## $ mon : num [1:2930] 1 1 1 1 1 1 1 1 1 1 ...
## $ day : num [1:2930] 4 5 6 7 8 11 12 13 14 15 ...
## $ rate: num [1:2930] 1.18 1.18 1.16 1.17 1.16 ...
## - attr(*, "spec")=
## .. cols(
## .. .default = col_double(),
## .. year = col_double(),
## .. mon = col_double(),
## .. day = col_double(),
## .. rate = col_double()
## .. )
共2930个观测。
保存成xts,
计算对数收益率:
xts.useu <- with(d.useu, xts(rate, make_date(year, mon, day)))
xts.useu.lnrtn <- diff(log(xts.useu))[-1,]
eu <- c(coredata(xts.useu.lnrtn))
对数收益率的时间序列图:
plot(xts.useu.lnrtn, main="",
major.ticks="years", minor.ticks=NULL,
grid.ticks.on="years",
format.labels="%Y")
图18.5: 美元对欧元汇率日对数收益率
此序列有波动率聚集现象,
在2008年下半年和2009年上半年有较高的波动率。
作ACF图:
forecast::Acf(eu, main="")
图18.6: 美元对欧元汇率日对数收益率的ACF
基本符合白噪声的ACF表现。
作Ljung-Box白噪声检验:
Box.test(eu, lag=20, type="Ljung")
##
## Box-Ljung test
##
## data: eu
## X-squared = 30.585, df = 20, p-value = 0.06091
在0.05水平下可以承认对数收益率为白噪声列。
检验对数收益率均值是否等于零:
t.test(eu)
##
## One Sample t-test
##
## data: eu
## t = 0.20217, df = 2928, p-value = 0.8398
## alternative hypothesis: true mean is not equal to 0
## 95 percent confidence interval:
## -0.0002122342 0.0002610303
## sample estimates:
## mean of x
## 2.439805e-05
结果说明对数收益率均值为零。
所以\(r_t\)的均值方程为\(r_t = a_t\)(\(\mu_t=0\))。
对\(r_t^2\)作ACF图:
forecast::Acf(eu^2, main="")
图18.7: 美元对欧元汇率日对数收益率平方的ACF
此ACF明显非白噪声,
且不像是低阶MA。
对\(r_t^2\)作PACF图:
pacf(eu^2, main="")
图18.8: 美元对欧元汇率日对数收益率平方的PACF
此PACF表现不像是低阶的AR。
对\(r_t^2\)作Ljung-Box白噪声检验:
Box.test(eu^2, lag=20, type="Ljung")
##
## Box-Ljung test
##
## data: eu^2
## X-squared = 661.45, df = 20, p-value < 2.2e-16
检验结果拒绝白噪声假设,
说明汇率的日对数收益率有ARCH效应。
对\(r_t^2\)序列作Engle的拉格朗日乘子法检验:
archTest(eu, m=20)
##
## Call:
## lm(formula = atsq ~ xmat)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.229e-04 -3.369e-05 -1.949e-05 9.360e-06 2.100e-03
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.281e-05 2.535e-06 5.054 4.60e-07 ***
## xmat1 -3.022e-02 1.858e-02 -1.626 0.103966
## xmat2 9.441e-02 1.859e-02 5.080 4.02e-07 ***
## xmat3 -1.226e-02 1.867e-02 -0.657 0.511513
## xmat4 5.309e-02 1.864e-02 2.848 0.004428 **
## xmat5 2.668e-03 1.864e-02 0.143 0.886202
## xmat6 7.200e-02 1.862e-02 3.868 0.000112 ***
## xmat7 5.625e-02 1.866e-02 3.015 0.002594 **
## xmat8 -1.599e-03 1.869e-02 -0.086 0.931828
## xmat9 6.060e-02 1.867e-02 3.245 0.001188 **
## xmat10 2.794e-02 1.867e-02 1.497 0.134592
## xmat11 6.413e-02 1.867e-02 3.435 0.000602 ***
## xmat12 4.020e-02 1.867e-02 2.153 0.031439 *
## xmat13 4.375e-02 1.869e-02 2.341 0.019299 *
## xmat14 2.900e-02 1.867e-02 1.553 0.120458
## xmat15 4.927e-02 1.863e-02 2.645 0.008222 **
## xmat16 5.349e-02 1.865e-02 2.868 0.004163 **
## xmat17 5.702e-02 1.865e-02 3.058 0.002251 **
## xmat18 1.873e-03 1.868e-02 0.100 0.920136
## xmat19 -1.836e-02 1.859e-02 -0.987 0.323583
## xmat20 5.844e-02 1.859e-02 3.144 0.001683 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 8.483e-05 on 2888 degrees of freedom
## Multiple R-squared: 0.09265, Adjusted R-squared: 0.08636
## F-statistic: 14.74 on 20 and 2888 DF, p-value: < 2.2e-16
结果说明有显著的ARCH效应。