Thank you very much for the quick response, much appreciated 🙂
I am trying to use ARMA (or ARIMA) and GARCH to create a model on a log return time series.
I would like to find the optimal values of the AR & MA parameters by creating various
combinations of AR & MA and grading them via the AIC (you can think of it as a brute force
like grid search, so for example for a particular series ARMA(2,1) is the best model).
Afterwards, I would like to take the residual from the ARMA and apply it to GARCH (probably GARCH(1,1))
and get a prediction (for the variance and also the mean).
I did not see a way to get the residual series from ARMA or ARIMA – do you provide such a functionality.
In Matlab this can be done using a combined ARMA/GARCH model (I do not need to get the residuals from ARMA,
only get the optimal AR & MA coefficients), here is what I do in Matlab :
I am using the ‘arima’ function to find the best arima parameters (I use the log likelyhood as the AIC)
then I build a ‘garchset’ object :
spec = garchset(‘R’, p, ‘M’, q, ‘P’, 1, ‘Q’, 1);
where p & q – are the best AR & MA from ARIMA,
and the rest are for GARCH(1,1), and then I use
‘garchfit’ and ‘garchpred’ to fit a GARCH and get a prediction
for the variance and the mean
Could you please let me know if this be done using your library.
Also, I tried the following code
(series is a double containing the log return series)
ARMAFitting fitting = new ConditionalSumOfSquares(series, 1, 0, 1);<br />
ARIMAModel arimaModel = fitting.getModel();<br />
double AIC = fitting.AIC();<br />
IntTimeTimeSeries xt = new SimpleTimeSeries(series);<br />
ARIMAForecast arimaForecast = new ARIMAForecast(xt, arimaModel);<br />
ARIMAForecast.Forecast forecast = arimaForecast.next();<br />
When I run the code it gets stuck on the last line – arimaForecast.next(), and finally after several minutes
an exception pops us saying ‘order’ must be positive : 0′
Could you please advise what can be done.