[R-SIG-Finance] Rugarch external regressor estimation
Luca Trapin
luca.trapin at gmail.com
Tue Dec 9 15:44:15 CET 2014
Hi,
I'd like to use "rugarch" package to fit GARCH models with external
regressors. I decided to run a simulation prior to analyze the empirical
data, in order to understand how to set the garch specification correctly.
I generate random samples with "ugarchpath" and then plot the estimates of
the parameters obtained with "ugarchfit". I use EGARCH with a dummy
variable to avoid prolems with the parameter constraints in the
maximization procedure.
Although the estimator for the GARCH parameters is consistent, it seems to
be not consistent when adding the external regressor.
I used the following code:
d <- as.matrix(c(rep(0,2000),rep(1,2000)))
par <- matrix(0,100,5)
for (i in 1:100){
specsim <- ugarchspec(variance.model=list(model="eGARCH",
garchOrder=c(1,1),
external.regressors=d),
mean.model=list(armaOrder=c(0,0), include.mean=FALSE),
fixed.pars=list(omega=-0.15, alpha1=-0.05, beta1=0.95,
gamma1=0.1,vxreg1=0.1))
sim <- ugarchpath(specsim, n.sim=4000)
r <- fitted(sim)
specfit <-
ugarchspec(variance.model=list(model="eGARCH",garchOrder=c(1,1),
external.regressors=d),
mean.model=list(armaOrder=c(0,0),include.mean=F))
fit <- ugarchfit(specfit,r)
par[i,] <- as.matrix(coef(fit))
}
Am I missing something?
Best Regards,
Luca
[[alternative HTML version deleted]]
More information about the R-SIG-Finance
mailing list