Login
Login

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

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

#2230
haksunli
Keymaster

#1.
The function/method to do it is: [tt:1bz7t0a4]GARCHModel.sigma2[/tt:1bz7t0a4].

#2.
You are talking two things here as there are two ways to do the fitting/forecast.

First, the matlab way: you assume a particular form of ARMA-GARCH model for the data set and the run MLE for the estimation.

Second, here is what we/SuanShu suggests:

  1. etermine the lags (p and q) of the ARMA process and fit an ARMA(p, q) model. This is done by the usual ARMA fitting procedure., e.g., [tt:1bz7t0a4]ConditionalSumOfSquares[/tt:1bz7t0a4]
  2. Select a suitable set of orders (P, Q) for the GARCH process. We can do this by looking at the PACF and ACF of the squared residuals and possibly use Ljung-Box test.
  3. Fit a pure GARCH(P, Q) model to the residuals using conditional MLE.
  4. Diagnostic checks.

You can do all steps 1 – 4 in SuanShu by calling the appropriate classes.

These two approaches make different assumptions and therefore will give different estimator values. On the other hand, in either case, we predict the conditional mean and conditional variance separately using first the ARMA equation for [tt:1bz7t0a4]MeanForecast[/tt:1bz7t0a4] and then the GARCH equation for [tt:1bz7t0a4]SigmaForecast[/tt:1bz7t0a4].

Below are the examples for both approaches.

One Step approach (in Matlab)
http://www.mathworks.com/help/econ/garchpred.html

Two steps approach (in R)
http://www.stat.berkeley.edu/~gido/Lab12