[R-SIG-Finance] Creating regression tables for objects returned from ugarchfit

Philipp Reich philipp.reich at gmx.net
Wed Jun 29 22:34:14 CEST 2016

Hi R-users,

I have not been working a lot with R before so this might be basic.
However, I have been using the fGarch package to estimate Garch-type models and I always used stargazer in order to create an output table. E.g.

d <- read.dta("dataSet.dta");
R = d$GDAX_r;
FGarch01 <- garchFit(data=R, cond.dist="std")
stargazer(fit01, out="models.txt“)

Now I am trying to fit models with exogenous regressors, e.g.

# import data
d <- read.dta("dataSet.dta");

# create data to work with
R = d$GDAX_r;
RK = d$GDAX_rk;
VDAX = d$VDAX_c/sqrt(225);
l1_r = R[2:2676];
l1_rk = RK[2:2676];
l1_vdax = VDAX[2:2676]/sqrt(225);
r = R[1:2675];
rk = RK[1:2675];
vdax = VDAX[1:2675]/sqrt(225);
exVar = cbind(l1_rk, l1_vdax)

# 3. model
spec03 <- ugarchspec(variance.model=list(model="sGARCH",garchOrder=c(1,1), external.regressors=exVar),mean.model=list(arfima=FALSE, armaOrder=c(0,0), include.mean=TRUE),distribution="ged", fixed.pars=list( vxreg2=0))
fit03 <- ugarchfit(spec03, r, solver="nlminb", fit.control = list(stationarity = 1))

stargazer(fit03, out="models.txt")

When I try to apply stargazer to the object returned from ugarchfit I get the following error message. 
Error in objects[[i]]$zelig.call : 
  $ operator not defined for this S4 class

The question to you guys is: Did I do something wrong when using stargazer? Are there other methods for creating regression tables when using rugarch? 
If so please share that information with me
Thank you very much for helping me,


	[[alternative HTML version deleted]]

More information about the R-SIG-Finance mailing list