[R-SIG-Finance] rugarch robust covariance matrix definition

alexios galanos alexios at 4dscape.com
Wed Nov 15 03:35:50 CET 2017


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:
> Hello all,
> 
> I have a question about the robust standard errors computed by rugarch.
> 
> Assume that an rugarch fit was computed and stored in fit, and that the
> covariance matrix was extracted via vcov(fit, robust = TRUE); call this
> V. Then suppose we get the Hessian matrix via fit at fit$hessian; call this H.
> 
> In fGarch standard errors were computed using the Eicker-White sandwich
> estimator, V = H^{-1} G^T G H^{-1}. I am particularly interesting in
> extracting G^T G, if not G itself. (I have my reasons.) It is possible
> to solve this equation: H V H = G^T G.
> 
> What I want to know is if vcov(fit, robust = TRUE) returns this sandwich
> estimator, like in fGarch; the documentation does not say how the robust
> standard errors are computed.
> 
> If this is not the case, anyone know how to get G?
> 
> Curtis
> 
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
>



More information about the R-SIG-Finance mailing list