The Average Investor's Blog

A software developer view on the markets

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.

ARMA vs Buy and Hold

ARMA vs Buy and Hold

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 …


9 Responses to “ARMA Models for Trading, Part IV”

  1. anthony meagher said

    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.

  2. 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.


  3. Perhaps your source code would be useful, if at all possible?

    • @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 …

  4. […] the fourth posting in this series, we saw the performance comparison between the ARMA strategy and buy-and-hold over […]

  5. […] some previous posts I have mentioned my struggles with the performance of the computations needed to implement the ARMA […]

  6. 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

  7. I’ll immediately snatch your rss as I can’t find yoour emjail subscription
    hyperlink or newsletter service. Do you have any?

    Please permit me recognize so that I may subscribe.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: