Skip to content

number of observations - rugarch

2 messages · Carolina Magda Roma, Patrick Burns

#
Dear all,

First I want to say thanks for the beautiful rugarch package!

I am trying to replicate some results and I would like to know if there is
any adjustment that I can do to run the egarch model with external
regressors using less than 100 observations. I tried to run my model but
returns the message error below:

library(rugarch)
library(xts)
data(sp500ret)
spx<-xts(sp500ret, as.Date(rownames(sp500ret)))
xreg<-xts(rnorm(nrow(spx)), index(spx))
colnames(xreg)<-"xreg"
xreg = lag(xreg,1)
inputs<-na.omit(cbind(spx, xreg, join="left"))

egarch.spec = ugarchspec(variance.model = list(model = 'eGARCH', garchOrder
= c(1, 1)), mean.model = list(armaOrder = c(0, 0), include.mean = TRUE,

    external.regressors= inputs[1:60,2]), distribution.model = 'sged')
egarch.fit = ugarchfit(egarch.spec, inputs[1:60,1])
egarch.fcst = ugarchforecast(egarch.fit, n.ahead=1)

Error in .egarchfit(spec = spec, data = data, out.sample = out.sample,  :

ugarchfit-->error: function requires at least 100 data
 points to run


Thanks a lot for any help!

Carol Silva
#
Rather than answer the question, I'll talk past it.

I'm not convinced that it's worthwhile to worry about a garch model with 
less than 100 observations.  See:

http://www.portfolioprobe.com/2012/09/17/variability-of-garch-estimates/

and the blog post that is referenced in the update.

Good luck, Carolina, in any case.

Pat
On 15/10/2016 14:13, Carolina Magda Roma wrote: