I am estimating a GARCH(1,1) with external regressors and the package
rugarch allows me to do it easily.
However, to compute QMLE robust standard errors, I need the outer product of the gradient, and therefore, the gradient itself. The code is the following:
uspecSerie1 <- ugarchspec( variance.model = list(model = "sGARCH",garchOrder = c(1,1), external.regressors=as.matrix(Exo) ), mean.model = list(armaOrder = c(5,4), include.mean = F), distribution.model = "norm") fit.garchSerie1 <- ugarchfit(spec = uspecSerie1, data = logretSerie1)
ugarchfit does not compute the gradient. I tried many things, for example, with the package
NumDeriv I tried the following:
grad(ugarchfit, x=fit.garchSerie1@fit$coef, spec = uspecSerie1, data = logretSerie1)
but it does not give results.
Can anyone help me computing the gradient for this object? Thanks