Re: Question about ARMA in new C# version of Suanshu

Home 21090308 Forums Re: Question about ARMA in new C# version of Suanshu


Hello Mr. Li,

Thank you very much for your detailed answer,
I appreciate your help very much.

I will split my answer to several points for clarity :

Regarding the exception, I did copy/paste the exact message,
I suspect that in the message

‘order’ must be positive : 0′

‘order’ is also a parameter, maybe you could look for the string ‘must be positive’ to find its origin in the code.

Regarding the great code you sent, I ran it, the line

ARMAForecastOneStep xt_hat = new ARMAForecastOneStep(x, arma);

took 65 seconds to execute on my laptop (Intel core i3),

which seems very long, do you have any experience as to why
it takes so long.

Also regarding the code, after producing the garch model,
could you please explain how to get a prediction/forecast for the next
point/value in the series.

This is a question I thought for quite a while –

When using garch on a log return series, you would
be able to get a forecast for the next value of the volatility
of the log return series.

If instead, you create a volatility series of the log return series
(for example – running standard deviation of some length), and
use the garch on it, you would get a forecast for the volatility of
the volatility series (vol of vol).

Please correct me if I am wrong until here.

Now, I saw in matlab (and also in R – using ‘garchFit’), that there is
a possibility of a mix/combined model of both ARMA & GARCH
(I speculate that to use it properly to forecast the next value in a log return series,
I should use the log return series in ARMA, use the residuals from ARMA in GARCH
and then get a forecast.

The forecast (output) of the combined model includes 2 values
(both in matlab & R), a SigmaForecast and MeanForecast.
and I am using the mean forecast as a prediction for the next value in the log return series.

I have a little problem understanding what this value represents in this context when I combine
ARMA with GARCH, maybe you could clarify that.

Thank you very much,