# Forecasting time series using ARMA-GARCH in R

I'm using rugarch package to estimate and forecast my time series. First, I estimate an ARMA model:

y <- readRDS("y.rds")
m1.mean.model <- auto.arima(y, allowmean=F )
ar.comp <- arimaorder(m1.mean.model)[1]
ma.comp <- arimaorder(m1.mean.model)[3]


But usually the error terms show typical characteristics of a GARCH process. Subsequently, I fit an ARMA-GARCH(1,1) process, and preform one-step ahead forecasting on test data:

library(rugarch)
model.garch = ugarchspec(mean.model=list(armaOrder=c(ar.comp,ma.comp)),
variance.model=list(garchOrder=c(1,1)),
distribution.model = "std")
model.garch.fit = ugarchfit(data=c(y,y.test), spec=model.garch, out.sample = length(y.test),  solver = 'hybrid' )

modelfor=ugarchforecast(model.garch.fit, data = NULL, n.ahead = 1, n.roll
= length(y.test), out.sample = length(y.test))

results1 <- modelfor@forecast$seriesFor[1,] + modelfor@forecast$sigmaFor[1,]
results2 <- modelfor@forecast$seriesFor[1,] - modelfor@forecast$sigmaFor[1,]

ylim <- c(min(y.test), max(y.test))
plot.ts(y.test , col="blue", ylim=ylim)
par(new=TRUE)
modelfor@forecast$seriesFor[1,] %>% plot.ts(ylim=ylim) par(new=TRUE) plot.ts(results1, col="red", ylim=ylim) par(new=TRUE) plot.ts(results2, col="red", ylim=ylim)  This is where I get confused. Looking at the predictions for the mean (modelfor@forecast$seriesFor, black), they barely move from zero. However, if I add sigma to it, it comes very close. In fact, forecasts of sigma (second plot) show that it is capturing the changing variance. My question is, given that we know forecasts of the variance enter in the equation for mean prediction (for example p.204 of this book), why is it that my forecasts are so poor?

data: y-test.rds, y.rds

• However, if I add sigma to it, it comes very close. What comes very close? given that we know forecasts of the variance enter in the equation for mean prediction (for example p.204 of this book), why is it that my forecasts are so poor? Could you rephrase it, I don't quite get your question. – Richard Hardy Jan 2 '17 at 9:45
• I think I misunderstood how GARCH works. My question was that, given that volatility predictions seem pretty good (e.g. large around point 450, as is observed data, in blue), my point forecasts of ARMA-GARCH should be close to the observed data. However, it seems that point forecasts still are dictated by ARMA, and hence very close to zero, and only the prediction interval, which is captured by GARCH predictions, becomes more accurate. Therefore, my point forecasts, to be measure by RMSE or some other metric, will be still very poor and adding GARCH has not really helped improving it. – Alex Jan 2 '17 at 9:58
• "However, if I add sigma to it, it comes very close." I meant close to observed data, shown in blue. Come to think of it, it just means the 70th percentile prediction interval does capture observed data pretty well. – Alex Jan 2 '17 at 10:01
• Thanks. To me your comments make more sense than the original text. Indeed, you are capturing the variance well. However, the conditional mean is still hard to predict. But this is common in financial time series: point predictions are hardly ever accurate (with or without GARCH), only the volatility can be captured well (with GARCH). – Richard Hardy Jan 2 '17 at 10:23
• What do you think of my answer? – Richard Hardy Mar 26 '17 at 16:37

Obtaining accurate point forecasts for financial time series is notoriously hard. That has to do with the nature of the financial markets; actors look for opportunities to exploit any predictability, and they remove it while they are doing it (change in expected profitability of an asset $\rightarrow$ change in supply/demand $\rightarrow$ change in asset price). This happens very quickly in active markets, so that the predictability does not persist long enough for models to capture it. Thus financial time series often behave like random walks with some heteroskedasticity.