Skip to content
Prev 14420 / 15274 Next

rugarch robust covariance matrix definition

Curtis,

You've written a very scathing critique of fGarch in your blog:

"I?m leaving this post up though as a warning to others to avoid fGarch 
in the future" which I believe is both unjust and unwarranted.

I suggest you read this blog post on parameter uncertainty and data size:

http://www.unstarched.net/2012/12/26/garch-parameter-uncertainty-and-data-size/

GARCH models require a reasonable amount of data to properly estimate
the persistence in a series, so 100 data points is unlikely to be enough 
(until recently rugarch did not allow for anything less than this but
had been removed at the request of a user).

With regards to the robust standard errors, install the development 
version from bitbucket:

devtools::install_bitbucket("alexiosg/rugarch")

And run the demo code below:

########################################################
library(rugarch)
library(xts)
data(sp500ret)

spx<-xts(as.numeric(sp500ret[,1]), as.Date(rownames(sp500ret)))
spec<-ugarchspec()

fit<-ugarchfit(spec, spx, fit.control=list(scale=1))

A=fit at fit$A
n = fit at model$modeldata$T
B = fit at fit$B
Ainv = try( solve(A), silent = TRUE )
vcv=(Ainv%*%B%*%Ainv)/n
all.equal(vcv,vcov(fit, robust=TRUE))

########################################################

The routine to calculate A and B can be found in robustvcv function
under the file rugarch-numderiv.R

Both myself and the late Diethelm Wurtz benchmarked our estimation codes 
with numerous other commercial and open source packages and found them
to perform robustly on a number of cases (but certainly not every corner
case). If you feel let down by fGarch or rugarch, then I suggest you try 
and see how other packages perform before trashing them.


-Alexios
On 11/14/2017 2:30 PM, Curtis Miller wrote: