We aren’t big technical traders.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 for it within Equities Lab. One indicator we include, the relative strength index(RSI), is extremely common among technical analysts. In this article, we will 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 gets more complex once you bring in market conditions and areas of support or resistance, but for now let’s keep it simple and you can do that sort of exploration on your own.

RSI = 100-(100/(1+(Average Upward Price change/Average Downward Price Change)))

Let’s build it

Though it may seem out of your reach at first, with some practice, you can build most any type of indicator or formula using the Equihack language. In order to save you time, the formula is preprogrammed into the software. If you would like to use it in a screen/backtest of your own simply type in “import RSI” and set the RSI you are looking for.

If you are 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.

Results

Let’s see how this indicator actually performs when we run it 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 criteria there are a total of 206 matches.

The breakdown of the results do not 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.

Quarterly(Default)

Rebalancing every other even month

Every month

Every Two Weeks

Every Week

Daily

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, 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, it isn’t too surprising. 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.

It is not really a surprise that the fact you lose money when you attempt to short the negative side of the RSI, simply because we are still making 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. That does not mean we are done trying to figure out how to get it to break or experimenting with it inside of more screens, because within every screen there is always room for improvement and an endless number of possibilities.