Saturday, April 7, 2012

SPY RSI Trading System

Here is a backtest on a daily mean-reversion trading system inspired by this post.  The rules use a simple countertrend-based system using the RSI and SMA.  The goal is essentially is to buy the dips in an up market and sell the spikes in a bear market.  First, we have a 200-day SMA average as a filter to determine if we are in a bull or bear market.  If the price is above the 200-day SMA we use "bull market rules" and vise-versa.

The bull-market rules are buy at the close if the 4-day RSI is below 35 and close the position if it is above 55.  The bear-market rules are that you go short if the 4-day RSI is above 80 and close the position if it is below 50.  I included transaction costs of 0.01% per trade to make it slightly more realistic.  The data set is from 01/02/2001 to 04/05/2012.


It is interesting to note that most of the over-performance is post-2008.  This is likely because the system managed to avoid a big losses during the crises.  Some additional stats: Sharpe ratio of 1.036 and max drawdown of 9.89%, so it would not be unreasonable to lever this up a bit if one wanted to be slightly more aggressive.  The downside of this strategy is that I picked some slightly optimized in-sample parameters which probably makes the performance over-optimistic.  Second, this strategy seems to do well in choppy markets, which could be abating in the near-term.



No comments:

Post a Comment