stock.ba
is a ts
object of monthly stock returns and I would like to fit an eGARCH model, but I keep getting this error using a new download 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!