Saturday, March 08, 2014

RSI Analysis

RSI Analysis

On Ed's Talking Stock, the moderator (Ed) publishes the RSI index everyday.  Now I would not know the RSI Index (Relative strength index) from a wind chill index.  But it is a technical indicator that is supposed to give some guidance on whether the market is overbought or oversold (or neutral).

One of the contributors on ETS pulled RSI data all the way back to 1970.  I thought it would be interesting to do a little statistical analysis on the data to see what the predictive power is.  Here are some items I'd like to test:

  1. Does an overbought (greater than 70) or oversold (less than 30) act as a predictor on where the market will be in 1 day, 5 days, 20 days and 50 days?
  2. Are the 70 and 30 day cut offs optimal?  Maybe there is a better cut of overbought and oversold?
  3. Has the predictive ability (assuming there is some) changed over time?  Meaning is it as effective in 2012-2013 as it was in 1978?
  4. What is the overall correlation between the index and the 1/5/20/50 movements? So not just looking at whether flag is overbought or oversold.
That seems like a good start. 

High Level Look

Here is a high level table.  It is just giving users a feel how common the various signals are:


RSI Status Number of Days Pct Days
neutral                       9,800 88.1%
Overbought                          974 8.8%
Oversold                          356 3.2%
Grand Total                      11,130 100.0%


So 8.8% of the time, the market is overbought.  Now one would expect that if the market is overbought, it has a greater probability of dropping in the near future. Conversely, if it is oversold, you'd think it is more likely to rise in the near future.  Let us look at that hypothesis at a high level:


RSI Status 1 Day Change 5 Day Change 20 Day Change 50 Day Change
neutral 0.03% 0.15% 0.59% 1.55%
Overbought 0.03% 0.15% 1.02% 1.92%
Oversold 0.12% 0.55% 1.50% 3.15%
Grand Total 0.03% 0.17% 0.65% 1.63%


So overbought seems to tell you virtually nothing on where the market will go in the next day or the next 5 days.  At 20 and 50 days, it appears to be counter-intuitive, the market is actually more likely to up more than average (at 20 days 1.02% versus 0.59% for neutral).  I will dig further, but my gut reaction is that over-bought is not a very good predictor.

Oversold is less common, but is more interesting. Your expected gains (let us call it "lift") are 2 to 4 times higher than neutral at all three time periods.  That seems very useful. But again, let us dig further.

Split By Year

The idea here is to look at the data by year.  The data gets a bit thin, so I will use rolling 5 year periods.  I will still look at all three RSI split.  On the Day Change, for the start I will focus on 20 days.  If I get ambitious I will look at other day splits.  But we do see 3x lift at 20 days for oversold.  So my question is whether the lift has stayed constant over the years or is their a trend.  My thought is to look at that via a table and a chart (picture speaks 1,000 words).

First the table:

Year Neutral Overbought Oversold Grand Total
1970-1974 -0.45% 1.24% 0.06% -0.17%
1971 - 1975 -0.02% 1.15% 0.72% 0.18%
1972 - 1976 0.05% 1.13% -0.31% 0.13%
1973 - 1977 -0.44% 1.66% 0.11% -0.31%
1974 - 1978 0.07% 1.78% -0.09% 0.18%
1975 - 1979 0.68% 1.56% 0.72% 0.75%
1976 - 1980 0.52% 0.83% 1.29% 0.58%
1977 - 1981 0.22% 0.57% 0.78% 0.27%
1978 - 1982 0.76% 1.24% 1.58% 0.85%
1979 - 1983 0.82% 1.21% 2.15% 0.91%
1980 - 1984 0.71% 1.22% 1.60% 0.79%
1981 - 1985 0.65% 1.79% 1.82% 0.79%
1982 - 1986 1.27% 1.75% 2.98% 1.38%
1983 - 1987 0.96% 1.18% 1.57% 1.00%
1984 - 1988 0.95% 1.13% 1.66% 0.98%
1985 - 1989 1.25% 1.00% 2.66% 1.23%
1986 - 1990 0.87% 0.58% 0.80% 0.84%
1987 - 1991 0.88% 0.73% 0.74% 0.86%
1988 - 1992 1.01% 0.28% 0.00% 0.94%
1989 - 1993 0.92% 0.33% -0.27% 0.86%
1990 - 1994 0.58% 0.16% -0.02% 0.54%
1991 - 1995 1.05% 1.07% 1.32% 1.05%
1992 - 1996 1.04% 0.62% 2.68% 0.99%
1993 - 1997 1.33% 0.98% 4.74% 1.31%
1994 - 1998 1.68% 1.14% 3.87% 1.62%
1995 - 1999 1.99% 1.07% 5.12% 1.86%
1996 - 2000 1.37% 0.60% 4.82% 1.33%
1997 - 2001 0.69% 0.72% 3.93% 0.77%
1998 - 2002 -0.07% 0.21% 3.48% 0.04%
1999 - 2003 -0.08% -1.99% 3.69% -0.02%
2000 - 2004 -0.29% 0.13% 3.73% -0.17%
2001 - 2005 -0.06% 0.47% 3.74% 0.05%
2002 - 2006 0.37% 0.98% 3.44% 0.43%
2003 - 2007 0.70% 1.03% 2.81% 0.73%
2004 - 2008 -0.44% 1.26% 1.72% -0.32%
2005 - 2009 -0.12% 1.71% 4.72% 0.06%
2006 - 2010 -0.02% 1.29% 4.75% 0.17%
2007 - 2011 -0.15% 1.08% 4.80% 0.04%
2008 - 2012 0.11% 0.96% 4.87% 0.29%
2009 - 2013 1.25% 0.71% 8.26% 1.30%
2010 - 2014 1.06% 0.41% 3.51% 1.04%
Grand Total 0.59% 1.02% 1.50% 0.65%

Hmm, that is a lot of data to look at. Perhaps a picture is worth 10,000 words.  But before we start graphing, let us pause and think about a few numbers.  At the very bottom, you come back to our first tables.  The 1.50% for oversold after 20 days versus the 0.59% at neutral => our 3x lift I mentioned.  Very interestingly, that "lift" seems larger more recently. From 2010 to 2014, it takes you from 1.06% to 3.51%. Then if we get into years with the global financial crisis, say 2008 to 2012 the lift is 0.11% to .87%. Whoa, that seems quite helpful.  Before we go further, a good actuary is always worried about credibility of the data, so how many data points are in each bucket?

Data Points in each bucket:

Year Neutral Overbought Oversold Grand Total
1970-1974             958                  168              122               1,248
1971 - 1975          1,008                  158               96               1,262
1972 - 1976          1,080                  115               67               1,262
1973 - 1977          1,123                    60               80               1,263
1974 - 1978          1,101                    87               75               1,263
1975 - 1979          1,101                  106               56               1,263
1976 - 1980          1,100                  112               51               1,263
1977 - 1981          1,107                    88               68               1,263
1978 - 1982          1,073                  116               75               1,264
1979 - 1983          1,112                    94               59               1,265
1980 - 1984          1,115                    87               63               1,265
1981 - 1985          1,103                  103               58               1,264
1982 - 1986          1,092                  131               41               1,264
1983 - 1987          1,086                  152               26               1,264
1984 - 1988          1,093                  144               27               1,264
1985 - 1989          1,080                  170               13               1,263
1986 - 1990          1,104                  137               23               1,264
1987 - 1991          1,112                  130               22               1,264
1988 - 1992          1,149                  100               16               1,265
1989 - 1993          1,145                  105               15               1,265
1990 - 1994          1,175                    72               18               1,265
1991 - 1995          1,116                  144                 4               1,264
1992 - 1996          1,092                  167                 6               1,265
1993 - 1997          1,086                  169                 9               1,264
1994 - 1998          1,054                  197               12               1,263
1995 - 1999          1,054                  200                 9               1,263
1996 - 2000          1,139                  112               12               1,263
1997 - 2001          1,160                    69               28               1,257
1998 - 2002          1,173                    48               35               1,256
1999 - 2003          1,201                    23               32               1,256
2000 - 2004          1,187                    36               33               1,256
2001 - 2005          1,186                    38               32               1,256
2002 - 2006          1,187                    55               17               1,259
2003 - 2007          1,184                    64               10               1,258
2004 - 2008          1,181                    52               26               1,259
2005 - 2009          1,183                    46               30               1,259
2006 - 2010          1,158                    72               29               1,259
2007 - 2011          1,158                    72               30               1,260
2008 - 2012          1,140                    85               34               1,259
2009 - 2013          1,136                  104               18               1,258
2010 - 2014             928                    89               12               1,029
Grand Total          9,781                  974              356             11,111

Ok - you can see why I used five year rolling periods.  Some stretches the "oversold" is pretty uncommon.  I find this table useful and interesting.  It seems (to me) that I would see overbought more often in bull markets. But from 2003-2007, the overbought signal only flashed 64 times in 5 years.  Before I go further, I have to say that I am just using the raw data I was given.  I have not pulled my own RSI data.  With that, I say bring on the graphs!  It is difficult to see patterns here.

Oversold Graph

This graph shows over time the relationship of the 20 day stock market movement after an oversold signal by 5 year periods.  I also show the average as a bench mark.  Let us see what we see.



Wow, that really adds some clarity. We are interested in the lift of the blue line (which measures how the market does 20 days after an oversold signal flashes) over the orange line (how market does 20 days after a neutral signal). You can see through 1996, there was some lift, but it was not super strong.  But from 1999 forward it is pretty telling. So let us now look at one of the first tables I did, and split it 1997 and earlier and 1998 to current. Hope you readers are sticking with me, this is quite exciting!

1970 to 1997

RSI Status 1 Day Change 5 Day Change 20 Day Change 50 Day Change
neutral 0.04% 0.18% 0.73% 1.92%
Overbought 0.06% 0.24% 1.11% 2.17%
Oversold 0.01% 0.41% 0.79% 2.51%
Grand Total 0.04% 0.19% 0.78% 1.97%

You can just see that oversold does not vary that much from neutral.

1998 to 2014

RSI Status 1 Day Change 5 Day Change 20 Day Change 50 Day Change
neutral 0.02% 0.11% 0.35% 0.95%
Overbought -0.09% -0.17% 0.69% 1.04%
Oversold 0.50% 1.07% 3.99% 5.38%
Grand Total 0.02% 0.12% 0.44% 1.04%

Now you see a great deal more lift from the Oversold signal.  

Overbought Thoughts

I did run these same tables/graphs for overbought.  I did not see anything worth sharing.

Summary (So Far)

Of my 4 initial points I wanted to cover, I have touched on #1 and #3 to some extent.  I have shown oversold does appear to have some predictive power, but overbought does not.  I have also shown that oversold has been a more powerful predictor in past 15 years.  Good stuff!

I will continue in a second posting.



No comments: