[R-SIG-Finance] Help with ugarchfit in rgarch library to estimate egarch (or igarch) models

Richard Herron richard.c.herron at gmail.com
Thu May 27 20:21:55 CEST 2010


I am trying to use ugarchfit() in the rgarch library but regardless of
the class of stock.ba (e.g., unclassed, ts, zoo, xts), which is a ts
object of monthly stock returns (single stock) and I would like to fit
an eGARCH model, but I keep getting this error using a new install of
rgarch in R 2.10.1:

> stock.ba.egarch <- ugarchfit(stock.ba, spec)
Error in UseMethod("ugarchfit") :
  no applicable method for 'ugarchfit' applied to an object of class "ts"

Here's the (relevant) code

stock.ba <- window(stock, start=c(1831, 1), end=c(2010, 2))
spec <- ugarchspec(variance.model = list(model = "eGARCH"))
stock.ba.egarch <- ugarchfit(stock.ba, spec)

Thanks!



More information about the R-SIG-Finance mailing list