Sunday, January 03, 2010

S&P 500 Dual Moving Average Trend Following System

I am planning on covering more trend following systems and strategies in the future. This one is a basic one that basically anyone can use if they have a small or large account. If you are a trader, you have likely heard of the golden cross, 50 day sma 200 day sma cross. The idea is to be long when the 50 day sma crosses above the 200 day sam and short when the 50 day crosses below the 200 day sma. Stock market pundits believe this is an important cross that is an indicator of bullishness in a market. While they may be right, I wanted to figure out what the market really said.

The rules are just like the golden cross. Go long when the short moving average crosses above the long moving average and short when the short moving average crosses below the long moving average. The following tables are gradient filled to visualize the effects of changing parameters. Short moving average is on top and long moving average is on the side. I have included MAR (Compound Annual Growth Rate (CAGR)/Max Drawdown), Sharpe Ratio, & CAGR as studies.

These tests were applied over the past 10 years using the S&P futures contract.


MAR




Sharpe




CAGR




The results are interesting. For pure Sharpe ratio followers, the area between about 70 days out crossed with up to 250 days out appears to be the least "risky" to traders. This is slightly farther out than the 50/200 sma and I would concur given that I use the 75 sma for much of my trading. The longer moving averages don't get stopped out quite as often and establish some very long trends (The less work I have to do the better).

Using MAR would suggest that you use the 400-450 sma as the longer average with the 30-50 sma. This is also not surprising from the prior research that I've conducted. Applying the 350-400 sma across the entire market history of the S&P 500 would be a good exercise for beginning traders.

Using CAGR as your measuring stick would suggest that across most parameters, you would make money and usually annualize at between 20-45%. Sticking to the system wins no matter what the parameter. However, remembering that humans are humans, the volatility component is not measured and once you get out to very long moving averages, it becomes more and more difficult emotionally to trade because you see the huge rises and falls in equity thinking that you could have caught part of that trade.

After creating these graphs I ran an optimization and used the 25/270 cross. The resulting equity curve is below:



CAGR: 20.5%
MAR: .81
Sharpe: 1.08
Max Drawdown: 25.4%
Longest Drawdown: 10.8 months
Trades: 7

If you are a busy professional trading on the side for your retirement account or for extra income, this is an easy to follow, profitable system with a pretty good track record. With only 7 trades over the past 10 years, you spend more time doing things you want to do rather than doing stock research. This is a good thing unless you absolutely love poring over technical and fundamental analysis every day. While I enjoy trading research, I just don't care for spending countless hours every day. I have automated most of my trading decisions and enter them in the morning before the open. My routine is this:

1. Open my decision making excel file with all algorithms encoded in VBA
2. Download all data (encoded in VBA)
3. Run algorithms across the portfolio
4. Enter the trades generated

Total time... 2 minutes. Lovely. I get to enjoy my coffee. There's something to be said about this for peace of mind and quality of life.

No comments: