0
$\begingroup$

I am new to time series modelling and I am trying to build a simple time series model using ARIMA methodology and forecast. I could write an R program to do the same, but I am more interested in writing my own arima(1,1,0) and predict() functions that R provides in Java / C++ / Python. While I can go about reading the theory behind ARIMA modeling and then implementing it, I still face a learning curve there, due to time constraints, I would like to take an approach where I can see a time series data sample, and a write up which walks me through the steps to compute arima() and predict() so that I can implement an algorithm. If someone can point me to a sourcecode / psedocode / step-by-step example via data, it would really be helpful.

$\endgroup$
2
  • 1
    $\begingroup$ Last time I went on the same cruise I found books on ARIMA rather than articles :) $\endgroup$ Commented May 2, 2013 at 22:57
  • $\begingroup$ Well R is open source, so you already have some source code. $\endgroup$ Commented May 3, 2013 at 3:14

3 Answers 3

1
$\begingroup$

Here's an open source ARIMA implementation. It's under GNU license. Not sure if they would mind you learning from it!

It's an ARIMA implementation in C++, windows executable and source available. I think going through it you should be able to learn ARIMA the quick way.

$\endgroup$
8
  • 1
    $\begingroup$ Welcome to CV. Would you mind giving a summary of what's there so readers can decide if it's what they're looking for, & / or in case of linkrot? $\endgroup$ Commented May 3, 2013 at 3:27
  • $\begingroup$ I hope that is sufficient :) $\endgroup$ Commented May 3, 2013 at 3:54
  • $\begingroup$ Thanks Rob, Farhan. If you have any suggestions on books for time series modeling for beginners, which also gives some background on basic concepts in statistics, that would be helpful. @gung - I'll need to cover quite some distance before I can give a decent summary of it. But I will try. $\endgroup$
    – Mavendew
    Commented May 12, 2013 at 19:30
  • $\begingroup$ @Mavadu, my comment was to Farhan, not you. Note that he did provide a summary of what's at the link, as I had asked. If you want to know some books for studying time series, you could read this thread: books-for-self-studying-time-series-analysis (which was easily discoverable by searching the site--you might find more useful info by searching & reading). $\endgroup$ Commented May 12, 2013 at 20:21
  • $\begingroup$ @gung - Thanks I'll also make use of the link above! $\endgroup$ Commented May 12, 2013 at 22:31
2
$\begingroup$

If you're interested in fitting ARIMAs in Python then have a look at the statsmodels implementation. It already includes fitting, in-sample prediction, and forecasting methods. If you really want to write the function yourself then the source code might be useful, just as Farhan's C++ link could be for that language.

$\endgroup$
0
$\begingroup$

There is imo no better material for studying ARIMA models than the textbook "Time series analysis: forecasting and control" by Box, Jenkins, Reinsel, Ljung. Box and Jenkins are major contributors to the development of the ARIMA. Chapters on forecasting and parameter estimation include pretty detailed explanations of how to implement algorithms.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.