I've been conducting some tests in the R package rugarch, and particularly the multispec()/multifit() functions. I found some errors in the output of these functions, and I can't figure out why (maybe it's my fault !). Here I don't provide directly reproducible example as the errors are only in the output and not really in the type of data, but I can if needed.
I've fitted a GARCH model to several series with very basic commands, and I basically obtain an univariate GARCH model applied to several series. The command is like that :
spec<-ugarchspec(variance.model=list(model="eGARCH",
garchOrder=c(1,1), external.regressors=as.matrix(ext)),
mean.model=list(armaOrder=c(0,0), include.mean=T),
distribution.model="sstd")
fit<-ugarchfit(spec, returns1[,1) #only for one series
mspec = multispec( replicate(spec, n = 3) )
fitlist = multifit(multispec = mspec, data = returns[,1:3]) #applied on three series
Two problems arise here.
1 - Results are different while the model is the same
The coefficients are different for the common series in fit and fitlist, which can't be the case. In fit, I obtain these coefficients:
Estimate
mu 0.084729
omega 0.065768
alpha1 -0.410989
beta1 0.868151
gamma1 -2.195101
vxreg1 -0.052592
skew 1.045669
shape 2.054839
and in fitlist, for the first column I obtain these coefficients :
Optimal Parameters:
Estimate
mu 0.00321
omega -2.14288
alpha1 1.90533
beta1 0.28411
gamma1 0.87675
vxreg1 0.03007
skew 1.01694
shape 2.01000
2 - Results in output are different from the results displayed
When I get in the fitted GARCH object with View(fitlist)
View(fitlist).
However, when I type fitlist@fit[[1]]@fit[["coef"]] which is supposed to extract these coefficients, I obtain this :
mu omega alpha1 beta1 gamma1 vxreg1 skew
0.003210617 -2.142881027 1.905325760 0.284106931 0.876747643 0.030068255 1.016941148
shape
2.010000000
which does not correspond to the results in the screenshot. Is it normal ? Do I miss something ?
If anyone has a potential answer I'll be happy to hear it !