I’m not a big technical trader. That being said, a lot of people in the information age are, and because of that we have been sure to include a number of technical indicators within the Equities Lab system. One such indicator, the relative strength index(RSI), is extremely common among technical analysts, and I think it is time to put the RSI indicator to the test.
What is the RSI Indicator?
Developed by J. Welles Wilder, the Relative Strength Index is an oscillator that changes based on the price movements in a company’s share price. It suggests that a company is overbought if the indicator is above 70, and oversold when the indicator is below 30 – meaning that you should buy into a company at any level below 30 and sell/short at any level above 70. It does get more complex once you bring it market conditions and areas of support or resistance, but that sort of exploration will have to wait for another article.
RSI = 100-(100/(1+(Average Upward Price change/Average Downward Price Change)))
Let’s build it
Though it may seem impossible at first, most any type of indicator or formula can be built using the Equihack language. In order to save you time, the formula is preprogrammed into the software. If you’d like to use it in a screen/backtest of your own simply type in “import RSI” and set the RSI you’re looking for.
If you’re new to the Equihack language, we are taking the average change of close over 20 days for both the up days and the down days – setting an if/then statement to put the day in the correct box. We then add that number to 1, and divide 100 by it. Finally, we subtract this number from 100 to finish calculating the RSI for that security.
Let’s see how this indicator actually performs when run through a backtest that will simulate trading over the past 20 years. Creating the following screen allows us to identify all of the companies in the market that match the criteria we set.
For this simple criterion there are a total of 206 matches.
The breakdown of the results doesn’t look too bad. There is a diversification of sectors, earnings, scores, etc.
How did it do?
It’s time for the moment of truth. Does the RSI actually allow you to pick oversold companies and make long term profits? Keeping everything else the same, we are going to test different rebalance periods and find out if this is really an indicator worth investing in on a very basic level. Seeing how momentum strategies typically work better over a short time period we are going to start with the default quarterly rebalance and tighten it each time.
Every other even month
Every Two Weeks
There are over 200 matches for the one simple parameter and it’s unreasonable to expect an investor to purchase every possible position that is suggested by the system – especially when you start calculating the trading costs into the model.
Weekly when adjusted for trading costs at 0.1%
There’s roughly a 50,000% difference between the adjusted and unadjusted weekly results. It should also be noted that the majority of the returns made in the short term rebalances were made prior to 2004 – so let’s get rid of all years prior assuming that the decision to use RSI in your portfolio was a more recent one, and keep the trading costs in play.
Notice that by only backtesting from 2004 it eliminates pretty much all of the “insane” earnings from the strategy – going from over 50,000% in return to just over 800%. RSI is lucky that getting rid of those early years didn’t destroy its returns entirely. Most of the time, when a strategy is heavily dependent on one period or another it becomes entirely deprecated the moment you test it without the dependency.
The Flip Side
Though not necessarily relevant to the article at hand, I wonder what happens when you long companies that have an RSI of 70 or higher. What happens if you short them? Rather than including a number of rebalance periods we are just going to use the Quarterly default.
Going long RSI > 70
After seeing the extremely positive results of RSI < 30, I’m not too surprised here. The total pool of companies in this scenario was 234, and with a portfolio that large it is difficult to actually lose money long term – resulting in a strategy that limps along at an incredibly high volatility to get to a return point of less than the benchmarked S&P 500.
Shorting RSI > 70
If you don’t have experience shorting within the Equities Lab system, we have an article that utilizes the position weights feature more closely on our blog.
Again, I’m not really surprised at the fact that you lose money when you attempt to short the negative side of the RSI simply because we still make money by going long on RSI > 70.
Overall, the RSI indicator has gone through the gauntlet and proven itself to actually have a bit of merit behind it. But that doesn’t mean I’m done trying to figure out how to get it to break or experimenting with it inside of my screens, because within every screen there is always room for improvement and an endless number of possibilities.