• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Decoding Markets

  • Access All Areas
  • Courses
  • Free Book
  • Resources
    • Best Books
  • Blog
    • About
    • Free Class
    • Top Posts
You are here: Home / Amibroker / Testing The RSI 2 Trading Strategy On US Stocks

January 20, 2016 By Joe Marwood 20 Comments

Testing The RSI 2 Trading Strategy On US Stocks

In this article I look at a popular method for trading stocks and futures which utilises the RSI 2 indicator. This is a mean reversion technique for finding overbought and oversold securities.

What is the RSI indicator?

The RSI (relative strength index) is an overbought/oversold momentum oscillator first developed by J. Welles Wilder in 1978. It’s a very popular indicator measuring relative strength in a security and is most often used on a 14-day timeframe, with values ranging from 0 to 100.

RSI 2 trading strategy

Typically, when RSI 14 is below 30, the security can be said to be oversold and this is meant to be a good time to buy. When RSI 14 is above 70, the security is said to be overbought and this is meant to be a good time to sell.

However, I tested the RSI 14 indicator on a number of different stocks and I found that these rules have not been all that successful over the last few years.

In fact, I found that doing the exact opposite (buying overbought stocks and selling oversold stocks) results in higher returns as it allows the capture of longer term upward trends. You can read the full article testing the RSI 14 here.

Since RSI 14 is not so conducive to short-term mean reversion type trades, the rest of this article will look at testing the indicator on a two-day timeframe instead. Whereas, the RSI 14 can be implemented in a trend following system, RSI 2 is a lot more volatile and more suited to shorter term trading.

Testing The RSI 2 Trading Strategy

I believe the RSI 2 trading strategy was first popularised by Larry Connors and Cesar Alvarez in the book Short-Term Trading Strategies That Work, published in November 2008.

In the book, Connors agrees that the 14-period RSI has no edge statistically and that he is much more successful with RSI 2. The book says that Connors looked at over eight million trades from January 1 1995 to December 31 2007 and found that “the average returns of stocks with a 2-period RSI reading below 10 outperformed the benchmark 1-day (+0.07%), 2-days (+0.21%), and 1-week later (+0.49%).”

Furthermore, Connors and Alvarez found that the lower the RSI 2, the greater the subsequent performance.

The book then goes on to list some specific trading strategies to take advantage of these findings. These strategies will now be tested on more up-to-date data with the back-testing simulator, Amibroker.

Test One – 2-period RSI under 5 on S&P 500

The first strategy mentioned in the book is on the S&P 500 Index. It has the following rules:

  1. The S&P 500 is above its 200-day MA
  2. RSI 2 of the S&P 500 is below 5
  3. Buy the S&P 500 on the close
  4. Exit when the S&P 500 closes above its 5-day MA

In other words, we want to buy the S&P 500 when it is oversold but still above it’s 200-day moving average. This strategy is run between 1995 and 2008 and is shown in the book to produce the following returns:

• No. of trades = 49
• No. of Winners = 83.6%
• Total points made = 522.92
• Average hold time = 3 days

I tested this strategy for myself using Amibroker and historical data from Norgate between 1/1/1995 and 1/1/2008 (without any transaction costs) and I achieved the following results:

• No. of trades = 49
• No. of winners = 83.7%
• Total points made = 524.4
• Average hold time = 4 days
• Annualised return = 3.91%
• Maximum drawdown = -6.48%
• CAR/MDD = 0.60

As you can see, the results are almost identical. Following is the table of results by month and year:

yearly results 1995 to 2007

Since the test results look good so far I moved the data set forward and tested the strategy between 1/1/2008 and 1/1/2016. The results are shown below:

• No. of trades = 30
• No. of Winners = 80%
• Total points made = 184.91
• Average hold time = 4 days
• Annualised return = 1.35%
• Maximum drawdown = -13.19%
• CAR/MDD = 0.10

As you can see, although the strategy has still been profitable performance has declined somewhat and this is clearly seen by the CAR/MDD ratio.

The results table below shows how the system did poorly in 2011, 2013 and 2014. However, performance did come back strongly in 2015. As a result, it is hard to say whether the strategy is broken or not.

RSI 2 table of results 1

Test Two – Cumulative RSI on SPY

In the second test, Connors comes up with a strategy which uses a cumulative RSI. This strategy is tested on the SPY ETF and has the following rules:

  1. Security is above its 200-day MA
  2. Use 2-period RSI
  3. Add up past two days of the 2-period RSI
  4. Buy if the cumulative RSI is below 35
  5. Exit when the 2-period RSI closes above 65

Running this system on SPY between mid-January 1993 and 1/1/2008 is shown in the book to produce the following results:

• No. of trades = 50
• No. of Winners = 88%
• Total points made = 65.53
• Average hold time = 3.7 days

I ran the same system in Amibroker on the SPY ETF and got the following results:

• No. of trades = 127
• No. of Winners = 74%
• Total points made = 42.56
• Average hold time = 3.5 days
• Maximum drawdown = -7.25%
• CAR/MDD = 0.57

Clearly my results are quite a bit different. I’m not sure why that is. Maybe I am not testing the right market. Maybe my rules are not the same. It’s hard to tell given the information in the book.

Nevertheless, let’s run the strategy and see how its performed in more recent years. Thus, running the same strategy on SPY between 1/1/2008 and 1/1/2016 I achieved the following results:

• No. of trades = 58
• No. of Winners = 72.4%
• Total points made = 20.36
• Average hold time = 4 days
• Annualised return = 1.76%
• Maximum drawdown = -19.38%
• CAR/MDD = 0.09

Once again, you san see that the strategy has not performed so well in recent years. Although the percentage of winners has only declined slightly, the drawdown has more than doubled. If we look at the profit table, we can see that the system has actually done quite well every year except in 2011 where it lost 11.5%.

RSI 2 table of results 2

Test Three – Cumulative RSI On Stocks

According to Connors, stocks have added risk versus indices because they can go to zero (whereas indices can’t). Connors therefore suggests it’s important to use much lower cumulative RSI readings on individual stocks.

In Stock Trading Strategies That Work, Connors looks at all stocks with cumulative RSI readings below 10 with an average daily volume of more than 250,000 shares and a stock price above $5.

He concludes that there were 77,068 signals between 1995 and 2008, “of which 69% of trades were profitable exiting above a 2-period RSI of 65” and that  “the average gain on these stocks was nearly four times greater than the gains for all stocks with the same holding period.”

In order to test this final approach I came up with the following portfolio strategy rules:

  1. Stock has 100 day average volume above 250,000 shares
  2. Stock trades above $5
  3. Stock is above its 200-day MA
  4. Buy if the cumulative RSI 2 is below 10
  5. Exit when the 2-period RSI closes above 65
  6. Maximum portfolio size of 10 stocks at one time
  7. Equity is split equally between each position
  8. Duplicate signals are ranked by RSI 2; weakest preferred

I ran the strategy on all stocks in the S&P 1500 universe between the dates 1/1/1995 and 1/1/2016. This time I included commissions of $0.01 per share and all trades were made on the close. The results and equity curve from this strategy are shown below:

• No. of trades = 8711
• No. of Winners = 64.7%
• Average hold time = 5.2 days
• Annualised return = 23.86%
• Maximum drawdown = -21.36%
• CAR/MDD = 1.12

RSI 2 equity curve test 3

RSI 2 results table test 3

As you can see from these results, the strategy has put in a very good performance over the last 20 years, turning a hypothetical starting capital of $100,000 into almost $9 million with an overall annualised return of 23.86%.

So, the RSI 2 trading strategy really has been a great way to get on board some oversold stocks and make some profitable mean reversion trades!

However, although these results do look good on paper it’s also important to be aware of some additional considerations.

Additional Considerations

The most glaring consideration is shown from looking at the yearly profit table (above) and this shows that the strongest performance actually came at the beginning of the test period. For example, on the S&P 1500 universe, the strategy made over 80% in 1997, 1999 and 2000. In recent years the strategy has performed nowhere near as well.

This is also consistent when running the strategy on the S&P 500 and S&P 100 universe as you can see below:

Monthly and yearly results on the S&P 100 universe
Monthly and yearly results on the S&P 100 universe
Monthly and yearly results on the S&P 500 universe
Monthly and yearly results on the S&P 500 universe

It’s worth noting that the strategy still seems to be profitable with very few down years. Maybe an edge still exists but performance does seem to have tailed off.

Logistics

It’s also important to consider that this strategy entails trading precisely on the close. Since you won’t know the real RSI closing value until the day is over, you will likely need some method of pre-calculating the trade price which will give you the correct closing signal. This may prove difficult.

Also, the short-term nature of the system means that slippage estimates may vary.

Overall Thoughts

The performance of the RSI 2 indicator strategy seems to have lost some of its edge in recent years. This may be because markets have become more efficient, because the strategy has become more widely known, or a combination of the two.

The strategy is also difficult to implement especially when dealing with a large universe of stocks.

Having said that, the RSI 2 trading strategy still appears to be profitable and there have been no down years yet recorded on the S&P 500 universe.

Overall, the RSI 2 indicator still shows some promise for development and could be used with other rules and on other markets (such as on the VIX or fundamental data sources).

The idea of a cumulative indicator is also one that could be transferred to other indicators/strategies. So long as you can accurately forecast the closing RSI values, it may still be possible to make money from this strategy, or from a variation of it.

want the code button imageWant the Amibroker code for this strategy? Just click the button on your left to visit the download page.

You may also like:

– RSI In Stocks: Can You Beat The Market?
– Overnight Trading System
– How to Beat Wall Street : 30+ Trading Strategies For Stocks
–
 Short Term Trading Strategies That Work By Connors And Alvarez


Trading systems and charts produced with Amibroker using data from Norgate Premium Data. Simulations assume a cash account with no margin. Stock universes include historical constituents/delisted shares.


Thank You For Reading

joe marwood profile pictureJoe Marwood is an independent trader and the founder of Decoding Markets. He worked as a professional futures trader and has a passion for investing and building mechanical trading strategies. If you are interested in more quantitative trading strategies, investing ideas and tutorials make sure to check out our program Marwood Research.


Disclaimer

This post expresses the opinions of the writer and is for information or entertainment purposes only. It is not a recommendation or personalised investment advice. Joe Marwood is not a registered financial advisor or certified analyst. The reader agrees to assume all risk resulting from the application of any of the information provided. Past performance, historical or simulated results  are not a reliable indicator of future returns and may not account for real world settings. Financial trading is full of risk and margin trading can lead to financial losses totalling more than what is in your investment account. We take care to present accurate analysis but mistakes in backtesting and presenting of analysis regularly occur. Please read the Full disclaimer.


Comment Policy

Thank you to everyone who takes the time to leave a comment. Your feedback, constructive criticism and identification of mistakes is welcome. In order to concentrate on work I may not have time to respond to all comments.

Filed Under: Amibroker, Stocks, Strategies/ Systems Tagged With: amibroker, trading systems

Recommended Educational Resources:


  • Discover New Trading Strategies
  • Learn Japanese Candlesticks (Free)
  • Mental Models For Trading (Free)
  • Indicators For Amibroker (Free)
  • Tools For Options Traders (Free)
  • Historical Data For 8000 Stocks (Free)

Reader Interactions

Comments

  1. Frederico says

    January 21, 2016 at 6:18 pm

    Interesting results and most definitely food for thought. I could see this might be good overlaid on the Vix or even on a shorter timeframe.

    Reply
    • JB Marwood says

      January 22, 2016 at 9:54 am

      Agreed, might be interesting to see how it goes on a 30-minute or 1-hour chart

      Reply
    • DAVE says

      June 16, 2019 at 3:29 am

      TRY THIS –

      FIND STOCKS THAT HAVE A 200 DAY MA THAT HAVE A LOW TO HIGH RISE IN THE 200 DAY MOVING AVERAGE ANGLE OF 14 – 40% RISE ANGLE IN THE MA, THESE STOCKS ARE MORE RESISTANT TO SEVERE DOWN SWINGS! THESE STOCKS LOWER YOUR RISK, FOLLOW CONNORS RSI2 RULES TO BUY STOCKS ABOVE THE 200 DAY MA THAT NOW MEET THE 200 DAY MA ANGLE, BUT THEN LOOK FOR A PRICE DROP BELOW THE 5 DAY MA OF THE STOCK AND WHEN THEY DROP BELOW THE RSI2 LEVEL OF 10. THEN BUY A LONG CALL ON THEM 1 MONTH OUT AND IN A DAY OR SO THE STOCK SHOULD ONCE AGAIN RISE ABOVE THE 5 DAY MA. EXIT YOUR CALL OPTION WHEN THE STOCK RISES GENERALLY $2 OR MORE. BUY THE CALL OPTION AT OR NEAR THE CURRENT STOCK PRICE, THIS SEEMS TO WORK PRETTY GOOD. I DO NOT GIVE ANY GUARANTY TO ANYONE BUT PAPER TRADE THIS AND SEE IF IT WORKS FOR YOU! YOU NEED TO DETERMINE IF YOU WANT TO USE A STOP LOSS ON YOUR TRADE AND HOW LOW TO SET IT,

      GOOD LUCK!

      Reply
  2. Alonso says

    January 24, 2016 at 12:31 am

    Interesting result for the 100 stocks. Do you need this statement:

    SetPositionSize( 1, spsShares )

    Also, do you need this one?

    PositionScore = 100/RSI(2);

    Reply
    • JB Marwood says

      January 25, 2016 at 5:28 pm

      Hi Alonso
      You don’t need SetPositionSize( 1, spsShares ) in this example but I have left it is because it is part of my usual template.
      PositionScore is the ranking method so if there is more than one signal we will choose the stock with the lowest RSI 2.
      Thanks
      Joe

      Reply
  3. vasant joshi says

    January 26, 2016 at 6:54 pm

    better than normal 14 day RSI but still quite raw…..needs much more fine tuning

    Reply
    • JB Marwood says

      January 26, 2016 at 9:17 pm

      Perhaps. How do you suggest to fine tune it?

      Reply
  4. Piotr says

    January 25, 2017 at 3:30 am

    The strategy is good over a time as we can see on Portfolio Equity graph. The table shows the return on increased capital, not the initial, this is why it is lower and lower. If we use for example PositionSize = -20; in Amibroker, we will see yearly results without the influence on capital level.

    Reply
    • JB Marwood says

      January 25, 2017 at 8:56 am

      Yes, that is a good point. I’ve been meaning to update this article.

      Reply
  5. Dnps says

    January 25, 2017 at 6:00 am

    Do you even code on specific strategy requests?

    Reply
    • JB Marwood says

      January 25, 2017 at 8:54 am

      Yes, I do.

      Reply
      • Dnps says

        January 25, 2017 at 8:55 pm

        How do I get in touch with you ? Definetely cant be discussed here

        Reply
        • JB Marwood says

          January 26, 2017 at 10:03 am

          Email jbmarwood@gmail.com

          Reply
  6. Jm says

    June 3, 2017 at 11:37 pm

    Interesting thanks.

    Is the stock universe complete or is there survivorship bias in the results?

    Reply
    • JB Marwood says

      June 8, 2017 at 1:18 pm

      Can’t remember now to be honest but it probably did include delisted stocks. All my tests nowadays do include these companies to eliminate survivor bias.

      Reply
  7. Matthew F. says

    March 19, 2018 at 12:02 pm

    What is the rule to exit if the position goes against yo or never exits above 65 RSI??

    In order to test this final approach I came up with the following portfolio strategy rules:
    Stock has 100 day average volume above 250,000 shares
    Stock trades above $5
    Stock is above its 200-day MA
    Buy if the cumulative RSI 2 is below 10
    Exit when the 2-period RSI closes above 65
    Maximum portfolio size of 10 stocks at one time
    Equity is split equally between each position
    Duplicate signals are ranked by RSI 2; weakest preferred

    Reply
  8. Matthew F. says

    March 19, 2018 at 12:04 pm

    Maybe better said is……

    Is there a suggested or posted exit rule if the position does not close above 65……or is the exit rule to wait until that happens??

    Thank you. Matthew F?

    Reply
    • JB Marwood says

      March 19, 2018 at 2:06 pm

      The strategies I have seen wait for the RSI to close back above the level. That’s usually the only sell rule. Occasionally you can get a market that takes a long time to bounce back. A time based exit eg. 10 days isn’t too bad an idea.

      Reply
  9. Jay Eiser says

    May 5, 2019 at 9:18 am

    You seem to ignore that Connors did this testing on a fixed set of ETF’s.
    Stocks were not involved in the Connors testing. As you can see your testing on the SPY matched his results exactly.

    Reply
    • Joe Marwood says

      May 14, 2019 at 9:46 am

      I have tested on ETFs various strategies by Connors. Some of them are quite good such as RSI4.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Decoding Markets

We build trading strategies that give you more profit with less stress.

joe marwood beach

Popular

26 Stock Market Strategies Designed To Make You Money

13 Reasons You Should Learn The Amibroker Custom Backtest

Simple Algo Trading With Alpaca And Streak

amibroker strategies page

10 Ideas For A New Trading System

Double top pattern with adjustable parameters

How To Trade The Controversial Double Top Pattern

Slide 3 Books

100 Greatest Stock Trading Books Of All Time

Financial Disclaimer

Financial trading is risky and short-term trading is hard. You can lose money. Joe Marwood is not a registered investment advisor and nothing on this site is to be regarded as personalized investment advice. Past performance is not indicative of future results. Data errors and mistakes do occur. Please see the full disclaimer.

Footer

About The Author

Joe Marwood is an independent trader and investor specialising in financial market analysis and trading systems. He worked as a professional futures trader for a trading firm in London and has a passion for building mechanical trading strategies. He has been in the market since 2008 and working with Amibroker since 2011.

Joe Marwood Profile PIc

Recent Posts

  • 5 Trading Mistakes (Identified In Retail Trading Data)
  • Contagion In Crypto
  • Can You Predict Cryptocurrencies?
  • Do Sell-Side Analysts Know Better?
  • Using Fundamental Data To Improve Momentum Investing Strategies
  • 5 Economic Indicators That Matter To Investors
  • How To Make Money In REITs
  • Follow The Leader To Make Money In Stocks

Categories

Search

Topics

  • Amibroker
  • Investing Books
  • Mean Reversion
  • Stock Trading Strategies
  • Technical Analysis
  • Trend Following
  • Quant Trading

Privacy policy | Contact | Disclaimer | All Rights reserved. Decoding Markets.