When it comes to predicting timeseries with ARMA-GARCH, the conditonal mean is modeled using an ARMA process and the conditional variance with a GARCH process.
I've seen tutorials predicting returns as follows:
from arch import arch_model
from statsmodels.tsa.arima_model import ARIMA
returns = ...
arima_model_fitted = ARIMA(returns, order=(3, 0, 2)).fit(method='mle', trend='nc')
p_ = arima_model_fitted.order[0]
o_ = arima_model_fitted.order[1]
q_ = arima_model_fitted.order[2]
archm = arch_model(arima_model_fitted.resid, p=p_, o=o_, q=q_, dist='StudentsT')
arch_model_fitted = archm.fit()
next_return = arch_model_fitted.forecast(horizon=1).mean['h.1'].iloc[-1]
What I think is peculiar is that the fitted GARCH model is used to predict the next return. Doesn't this predict the residual instead of the return?
I would predict the next return as follows:
mu_pred = arima_model_fitted.forecast()[0]
et_pred = arch_model_fitted.forecast(horizon=1).mean['h.1'].iloc[-1]
# yt = mu + et
next_return = mu_pred + et_pred
I am, however, unsure that this is correct.