raul
data(EuStockMarkets)
dax <- diff(log(EuStockMarkets))[,"DAX"]
dax.garch <- garch(dax) # Fit a GARCH(1,1) to DAX returns
summary(dax.garch) # ARCH effects are filtered. However,
plot(dax.garch) # conditional normality seems to be violated
第三行里garch函数里为什么直接输入dax,dax表示收益率序列,拟和GARCH应该是针对收益率序列的残差来做啊。
检测dax序列不存在自相关。dax=mean(dax)+res
移除样本均值后,应该是对res检测是否存在ARCH效应。如果存在的话,GARCH()函数的参数是否应该是garch(res)?
谢谢。
captain_21
The code is absolutely right. For detail, you can refer to the "HELP" document, here I post part of them:
[If given this numeric vector is used as the initial estimate of the GARCH coefficients. Default initialization is to set the GARCH parameters to slightly positive values and to initialize the intercept such that the unconditional variance of the initial GARCH is equal to the variance of x.]
Or, also you can do such step in <R console>:
library(tseries)
fix(garch)
Then you can find original codes in <R Editor>