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
  • $\begingroup$ Last time I went on the same cruise I found books on ARIMA rather than articles :) $\endgroup$ – Farhan Ahmed May 2 '13 at 22:57
  • $\begingroup$ Well R is open source, so you already have some source code. $\endgroup$ – Rob Hyndman May 3 '13 at 3:14
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$ – gung - Reinstate Monica May 3 '13 at 3:27
  • $\begingroup$ I hope that is sufficient :) $\endgroup$ – Farhan Ahmed May 3 '13 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 May 12 '13 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$ – gung - Reinstate Monica May 12 '13 at 20:21
  • $\begingroup$ @gung - Thanks I'll also make use of the link above! $\endgroup$ – Farhan Ahmed May 12 '13 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$

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