ARMA Models for Trading, Part IV
Posted by The Average Investor on May 31, 2011
All posts in this series were combined into a single, extended tutorial and posted on my new blog.
The last post promised to show some back testing results for the ARMA techniques. I decided to use the S&P 500 index for this purpose.
What really impresses me in the above char it the staggering performance of this approach during the financial crisis. As if it was feeding on the increased market volatility! This fact is also illustrated by the side by side annual comparisons, which I usually use to get an idea of the long term performance.
| Year | ARMA | Buy and Hold |
|---|---|---|
| 2001 | -25.80% | -13.04% |
| 2002 | 7.14% | -23.37% |
| 2003 | 28.04% | 26.38% |
| 2004 | 13.66% | 8.99% |
| 2005 | 8.59% | 3.00% |
| 2006 | 17.26% | 13.62% |
| 2007 | 1.85% | 3.53% |
| 2008 | 100.96% | -38.49% |
| 2009 | 9.75% | 23.45 |
| 2010 | 16.82% | 12.78 |
Both systems performed similarly during the 2000/2002 recession, however, there is a stark difference in the performance during the 2008/2009 crisis. While buy and hold was losing money, the ARMA method registered it’s best year ever.
Let’s close with the answers to some obvious questions:
Why did I show only the performance of the last 10 years?
Believe it or not this is a very expensive computation. In fact, I have assembled a powerful i7 CPU machine just to be able to back test and trade these models. Almost 2 full days were necessary to compute the ARMA index for the past 10 years! I will consider publishing back testing for previous years, however, since S&P 500 is not a primary instrument for my trading, that’s not too likely to happen.
What parameters I used to compute the ARMA index?
The code is close to the code I have published in previous posts. I have used the fGarch package and my code always picked a GARCH(1,1) model. For the ARMA part, my code used all models between (0,0,1,1) and (5,5,1,1). I used 500 days of history. I mostly used the skewed Generalized Normal Distribution, specified by the cond.dist=”sged” parameter of garchFit, however, I obtained similar results using cond.dist=”sstd”.
It has become a lengthy and time-consuming post, so I will stop here. If I ever decide to do another post on this topic – I would likely discuss the obstacles I encountered while trading these models on a daily basis …

anthony meagher said
Hi,
Thanks for the posts they were very interesting as a newbie to R and to investment. I would be very interested if you had time to outline the problems you encountered using these methods day-by-day in real trades.
Thanks,
Anthony
Gary said
Hi there,
Nice Post, Thanks.
You might use GPU to decrease your computing process time.
There is a R package for that purpose.
http://cran.r-project.org/web/packages/gputools/index.html
http://brainarray.mbni.med.umich.edu/brainarray/rgpgpu/
Gary
Hasan Diwan said
Perhaps your source code would be useful, if at all possible?
The Average Investor said
@Hasan: I doubt it could be useful, but I will consider it. All the ideas with some examples are in the posts, so I don’t think it’s too much to put everything together. If I just post the source, then it will require more explanations and examples …
ARMA Models for Trading, Part VI « The Average Investor's Blog said
[...] the fourth posting in this series, we saw the performance comparison between the ARMA strategy and buy-and-hold over [...]
Yet another reason to avoid loops in R « The Average Investor's Blog said
[...] some previous posts I have mentioned my struggles with the performance of the computations needed to implement the ARMA [...]
nijkamp said
w.r.t. “I would likely discuss the obstacles I encountered while trading these models on a daily basis” – would be nice if you could share your story with us
The Average Investor said
There are some updates coming in this series once I get back from vacation. Hope I don’t miss too much ARMA (or any) upside.