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

#2224
haksunli
Keymaster

Hello Itay,

In SuanShu, you need to do the procedure step by step. In other words, you need to

  1. fit an ARMA model to your time series
  2. compute the residuals
  3. fit a GARCH model to the residuals

There is no one command to do it as SuanShu is a programming library (of components).

Here is a sample code that I would do it:

The same example is found here:
http://www.numericalmethod.com/trac/numericalmethod/browser/public/Examples/src/com/numericalmethod/suanshu/examples/LinearTimeSeries.java

I got the following output:

Example fitting an ARMA and then GARCH on residuals
the ARMA(1,1) model: xt = -0.36115827438444137 + (1.0*X_{t-1}+0.3885927300077173*X_{t-2}) + (1.0*e_{t-1}+-0.18262679464688403*e_{t-2}) + e_t; var(e_t) = 0.595852, d = 0
the GARCH(1,1) model: 0.01782245936465693+ 0.003111 * e_{t-1}+ 0.874147 * h_{t-1}

Note: there is bug in the C# version to prevent [tt:31vhlzuf]arma.toString()[/tt:31vhlzuf] from working properly. We fixed it for the future releases.