Skip to content

Help with ugarchfit in rgarch library to estimate egarch (or igarch) models

2 messages · Richard Herron, Alexios Ghalanos

#
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:
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!
#
Hi,
Try:
stock.ba.egarch <- ugarchfit(spec, stock.ba)
else make sure to pass the arguments named.

Regards,
Alexios Ghalanos

Sent from my iPhone

On May 27, 2010, at 9:21 PM, Richard Herron
<richard.c.herron at gmail.com> wrote: