Home 2015 › Forums › Numerical Method › Statistics › About SuanShu API
Tagged: SuanShu JAVA
This topic contains 6 replies, has 2 voices, and was last updated by Ryu 1 month, 2 weeks ago.

AuthorPosts

20161115 at 2:22 pm #5611
I wanna forecast a value by fitting an ARIMA model based on a time series of historical records. I’ve used the trial SuanShu 3.4.0 API. With this trial API, could I train ARMA model parameters and predict the next term value? Does the offical version of SuanShu provide some simple examples or user manual about ARIMA mode. I am new with Suanshu and any advise or help will be appreciated. Thank you.
20161116 at 5:06 pm #5612The full version of SS has classes to estimate ARMA models. Please see these examples.
But the free version does not allow using the statistical API. You may request a full one month trial license by emailing info [a t] nm [d o t] sg
20161122 at 10:33 pm #5613Thank you for your response.
In ARMA modeling, the first step is to identify the model (i.e., the values of p for AR and q for MA) by looking at plots of the ACF and PACF. Is it possible to realize this step by SuanShu API (without figuring out these two plots)?20161124 at 2:49 pm #5614Here is what we/SuanShu suggests:
1.
Determine 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.,ConditionalSumOfSquares
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 LjungBox 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.
See this for more information:
20170306 at 3:21 am #5638Thank you for your guidance. After reviewing the discussions shown in the C# topics, it helps me a lot, even if I purchased SuanShu JAVA version. I have a question about how to determine suitable p lags for AR model and q lags for MA model by SuanShu. In principle, the first step of modeling ARMA is to identify p and q lags by looking at “plots” of the ACF and PACF. Does this step correspond to STEP 2 (or STEP 1) you mentioned? In SuanShu, should we plot ACF and PACF to determine suitable p for AR model and q for MA model?
20170314 at 2:53 am #5639Hello,
I think I got a solution to my previous question. I follow the following reference.
https://www.quantstart.com/articles/AutoregressiveMovingAverageARMApqModelsforTimeSeriesAnalysisPart3Choosing the Best ARMA(p,q) Model
In order to determine which order p,q of the ARMA model is appropriate for a series, we need to use the AIC (or BIC) across a subset of values for p,q, and then apply the LjungBox test to determine if a good fit has been achieved, for particular values of p,q.
To show this method we are going to firstly simulate a particular ARMA(p,q) process. We will then loop over all pairwise values of p∈{0,1,2,3,4} and q∈{0,1,2,3,4} and calculate the AIC. We will select the model with the lowest AIC and then run a LjungBox test on the residuals to determine if we have achieved a good fit.
We will now create an object final to store the best model fit and lowest AIC value. We loop over the various p,q combinations and use the current object to store the fit of an ARMA(i,j) model, for the looping variables i and j.
If the current AIC is less than any previously calculated AIC we set the final AIC to this current value and select that order.
20170314 at 8:50 am #5640Yes. Alternatively, you may use this class which automates the trial loop.

AuthorPosts
You must be logged in to reply to this topic.
Recent Comments