Solved – GARCH(1,1) fails to converge in “rugarch” in R

garchr

My code is very simpe

require(rugarch)
require(quantmod)
    #Daily GARCH(1,1)
    date_from = c("1996-01-01", "2000-01-02", "2004-01-03", "2008-01-04", "2012-01-05")
    date_to = c("2000-01-01", "2004-01-02", "2008-01-03", "2012-01-04", "2016-08-20")
    forex = vector(mode = 'list', length = 5)
    for (i in 1:5) {
      getSymbols("EUR/AUD", src="oanda", from = date_from[i], to = date_to[i])
      forex[[i]] = EURAUD
    }
    EURAUD = Reduce(rbind,forex)
    EURAUD$DEURAUD <- diff(log(EURAUD$EUR.AUD))
    spec7 = ugarchspec(variance.model = list(model = "sGARCH", garchOrder = c(1,1)),
                       mean.model = list(armaOrder = c(0,0), include.mean = TRUE))
    roll_7 = ugarchroll(spec7, EURAUD[,2], forecast.length = 1500, refit.every = 50, windows.size = 1500, refit.window = 'moving', solver = 'hybrid', calculate.VaR = FALSE, keep.coef = FALSE)

Unfortunately it fails to converge. What are my alternatives? The standard GARCH(1,1) is crucial as it is proven by Hanen and Lunde (2005) that provides the most accurate forecasts and I nee as a benchmark model for my thesis.

Best Answer

Assuming a GARCH model is sensible for your data (daily log-returns on currency exchange rates), here are some possible solutions:

  • Try different starting values. Most of the times this should do the job.
  • Add a negligible amount of noise to the original data (enough to get the solver unstuck but still not affecting the parameter estimates noticeably). Either do this once or perhaps multiple times and average over the outcomes.
  • Try a different model: GARCH(1,1) with variance targetting, GARCH(1,1) with a different conditional distribution (e.g. Student-$t$ in place of Normal) -- if this is still a satisfactory benchmark for you.