Using ARMA in cronos

Oct 5, 2009 at 9:45 AM

Hi,

I am a research student in university and I have chosen a project using ARMA models to forecast network traffic. I plan to well used source code available in cronos and build an application on top of this but using the ARMA logic code from cronos. Can anyone give me idea which part of code or which section should I extract and grab? Or which part of code should my new project building on top of it refer to? Secondly, I tried using cronos few days already to figure out how it works but so far I am quite confused with all data being shown and forecast. Any better guide on this? or a better UserGuide?

I appreciate all idea and help from everyone. Thanks.

Coordinator
Oct 7, 2009 at 7:20 PM

There seem to be two separate questions here:

(1) How do you use ARMA models within Cronos?

For this, you really should work through the tutorial in the User's Guide.  It makes it fairly clear how to fit and use ARMA models for forecasting, and many users have managed to work it out using the existing version of the User's Guide.  The procedure is really no  more complicated (indeed I would argue that it is simpler) than it is using R or any other standard statistics package for analysis.  If you then have more specific questions about the details, feel free to post them here.

(2) How do you build a new application using code from Cronos?

If you are developing in C++ or some language other than C#, then you will need to pull out all the appropriate code from the source in the ABMath library (look for the ARMAModel class).  This is a non-trivial procedure and I'm afraid I don't have time to help people out with this.  In general, I think it would be more productive simply to read a good time series book and code up the algorithm yourself rather than transplanting bits and pieces from somewhere else.  Otherwise the risk of introducing bugs is high.

If you are developing in the .NET framework (C# etc.), then you can simply use the ABMath library.  It contains an ARMAModel class that you can use.  For example, to create an ARMA(1,1) model, you can then include code like the following

(this defines a standard ARMA(1,1) model with Phi(1)=0.6, Theta(1)=-0.65, Mu=0, and Sigma=0.114) 

<font size="2" color="#008000"><font size="2" color="#008000">

            var arPoly = new Polynomial(new[] { 1, -0.6 });
            var maPoly = new Polynomial(new[] { 1, -0.65 });
            var model1 = new ARMAModel(1, 1);
            model1.SetARPolynomial(arPoly);
            model1.SetMAPolynomial(maPoly);
            model1.Mu = 0; // mean
            model1.Sigma = 0.114; // sigma
 
</font></font><font size="2" color="#008000">
</font>

Jan 28, 2010 at 3:05 PM

Hi Coordinator,

Happy day, I appreciate your reply for previous post. I am still undergoing my piece of software development after I done a research paper forecast network traffic using CRONOS as main tool. After all I got all my result based on using CRONOS ! Due to the nature of network traffic, I got to build own interface with ABMath library as back end. My question is can you explain further on the procedure of function calling? I seem like missing calling few function after I build ARMA(1,0), calling cube parameter, log likelihood, build forecast. I need help further explaining the sequence of calling function. Another question would be the sampling data type which is in Vector is not compatible with the data type I am using which is List. Anyway for me to grab to Vector data and pass it back as list? I appreciate any help and answer. Thank you very much.

Feb 4, 2010 at 8:14 AM

Sorry I am not kind of Math guy. I have seen through functions in details way but the result i am getting still not the correct one. Here is my specific question which I would like to ask. I have a set of log return data, and I have refer my class file to ABMath dll.

What is the sequence of function should I call after I create ARMA(1,0) in order to get the best loglikihood and forecast?

 

 

 

Coordinator
Feb 19, 2010 at 9:14 PM

I just added sample code to the nunit tests in the project.  The code illustrates how to specify models, how to simulate from a model, how to fit a model to existing data, and how to get forecasts.

You should be able to download the latest source, and have a look in the project ABMath.Tests, in the file ModelFrameWork\Models\ARMAModelTest.cs.  Look specifically at the method named "FittingAndForecastingTest".  You should be able to adapt the code there for your purposes.  I'm not sure whether you are familiar with the unit testing framework, but when reading this code, keep in mind that fields of the class are initialized in the "SetUp" method before "FittingAndForecastingTest" is called.

Let me know if you have more questions.

Feb 24, 2010 at 7:36 AM
Edited Mar 14, 2010 at 7:58 AM

 

Hi. 

I'm doing the similar project but i'm also using the differencing function. I'm not really good at the maths, so please bear with me.

Assume my data is just a simple network traffic of a PC, which type of differencing do i need to activate inside the library.

I saw the differencing for multivariate , univariate and longitudinal time series.

I only know that i must activate the part for the univariate time series, but do i need to activate the longitudinal time series too?

Please help.

 

Just another side question that i need some verification. The Cronos application will put each rows of data of the table and put it in any date and each date will contains the data for one cell. When the TimeSeriesBase.cs call the Count function, it actually counting the number of of date that contains data that was stored in a List. Please verify my statement