使用R(rugarch和fGarch包)的GARCH模型中参数估计的不同意义



我一直在使用两个包fGarch和rugarch来将GARCH(1,1)模型拟合到我的汇率时间序列中,该序列由3980个日对数回报组成。

fx_rates <- data.frame(read.csv("WMCOFixingsTimeSeries.csv", header=T, sep=";", stringsAsFactors=FALSE))
#data series
EURUSD <- ts(diff(log(fx_rates$EURUSD), lag=1), frequency=1)
#GARCH(1,1)
library(timeSeries)
library(fGarch)
x <- EURUSD
fit <- garchFit(~garch(1,1), data=x, cond.dist="std", trace=F, include.mean=F)
fit@fit$matcoef
library(rugarch)
spec <- ugarchspec(variance.model = list(model = "sGARCH", garchOrder = c(1, 1)),
               mean.model=list(armaOrder=c(0,0), include.mean=F), distribution.model="std")
gfit <- ugarchfit(spec, x, solver="hybrid", fit.control=list(stationarity=0))
gfit@fit$matcoef

两个模型显示如下结果:

fGarch:

fit@fit$matcoef 
         Estimate   Std. Error    t value     Pr(>|t|) 
omega  1.372270e-07 6.206406e-08   2.211054 2.703207e-02 
alpha1 2.695012e-02 3.681467e-03   7.320484 2.471356e-13 
beta1  9.697648e-01 3.961845e-03 244.776060 0.000000e+00 
shape  8.969562e+00 1.264957e+00   7.090804 1.333378e-12

rugarch:

gfit@fit$matcoef
           Estimate   Std. Error     t value     Pr(>|t|)
omega  1.346631e-07 3.664294e-07   0.3675008 7.132455e-01
alpha1 2.638156e-02 2.364896e-03  11.1554837 0.000000e+00
beta1  9.703710e-01 1.999087e-03 485.4070764 0.000000e+00
shape  8.951322e+00 1.671404e+00   5.3555696 8.528729e-08

我找到了一个线程http://r.789695.n4.nabble.com/Comparison-between-rugarch-and-fGarch-td4683770.html关于为什么估计不相同,但是我无法找出标准误差的巨大差异,因此通过ω的不同意义。差异不是由平稳性约束引起的,因为ω仍然不显著。有人知道如何计算估计参数的标准误差(,和)吗?

H为Hessian, G为梯度,设C = H^-1 (G^T * G) H^-1H的逆乘以矩阵G转置与G的结果,再乘以H的逆。标准误差系数是sqrt(diag(C)),即对角线项的平方根。您可以通过仔细阅读fGarch:::.garchFit:

的代码来了解这一点
# Standard Errors and t-Values:
if (DEBUG) print("Standard Errors and t-Values ...")
fit$cvar <-
    if (robust.cvar)
        (solve(fit$hessian) %*% (t(fit$gradient) %*% fit$gradient) %*%
         solve(fit$hessian))
    else
        - solve(fit$hessian)
fit$se.coef = sqrt(diag(fit$cvar))
fit$tval = fit$coef/fit$se.coef
fit$matcoef = cbind(fit$coef, fit$se.coef,

相关内容

  • 没有找到相关文章

最新更新