28

Relative strength indicator calculation

If you are a stock trader or investor who is having trouble sleeping at night because you don’t know how to do the relative strength indicator calculation, then worry no more. You’ve come to the right place.

How relative is the strength?

The first point to clarify regarding the relative strength index, or indicator, is that it doesn’t measure the relative strength of a stock in the way we normally understand relative strength to mean.

The relative strength of a stock or a sector means that in a rising market, if the market is going up by say 2 percent and a particular stock or a sector goes up by 3 percent over the same period, then we say that stock or sector is showing relative strength.

Wait a minute, I hear the unimaginably astute reader who remembers something from an earlier article say, that sounds a lot like the beta.

Well spotted. But there is an important difference between relative strength and beta. Very simply, beta is a measure of the sensitivity of a stock to market movements in either direction, i.e. if the market moves up or down the stock price moves up or down in a fixed relation. Here is a detailed explanation of how beta works.

On the other hand, relative strength is concerned with which stocks or sectors are showing strength in relation to the market. So we are concerned with strength which is a measure of price gain of a stock or sector in relation to market price movement.

The difference between relative strength and beta is that in a rising market stocks with a beta greater than 1 will have high relative strength, whereas in a declining market, stocks with a beta less than 1 will have greater relative strength.

The Relative Strength Index or RSI

So what does the Relative Strength Index show? The answer is that it shows the strength or weakness in recent and current price movements of a stock.

The important and potentially confusing point here is that the index shows the current price movements of a stock in relation to recent price movements over a set period. What could be confusing is that the current price movement is only compared with recent price movements of the same stock and not with price movements of the market. So it is measuring the strength of its own price movements in relation to where the price has been.

The Relative Strength Index Formula

Before we get into the calculation here is the formula for the Relative Strength Index, where

  • RSI = the relative strength index.
  • K = the average of all upward price movements in the period.
  • D = the average of all downward price movements in the period

Then the formula for RSI is:

Relative Strength Index Formula

OK so now we’ve got the definition out of the way let’s dive into the calculation itself. No worries, this will be more like a gentle wade into a kiddies paddling pool rather than a swan dive into the deep end.

The RSI calculation

The RSI is most usually used for a 14-day period. In this case, we need to know the closing price of the stock for the last 15 days. We then calculate the day on day price changes. From there we calculate the average of all the upward price moves and the average of all the downward price moves.

There are three kinds of averages used to calculate the RSI

  • An exponential moving average, using exponential weighting
  • A smoothing method used by Mr. J Welles Wilder the inventor of the RSI.
  • A simple moving average proposed by Mr. Cutler

Here is a step by step calculation for the RSI for the 14-day period up to 26 June 2020 for the State Street Global Advisors Standard and Poor’s 500 index-tracking ETF which goes by the symbol SPY. This example uses a simple moving average calculation without smoothing.

RSI calculation for SPY

The RSI as calculated in this case using a simple moving average, as proposed by Mr. Cutler, yielded an RSI of 31.16.

Here is a chart of the SPY for the same period.

SPY with RSI

We can see that on the chart the RSI for SPY on 26 June was calculated to be 45.14. This is because the chart uses Mr. Wilder’s method of smoothing the averages. The smoothing calculation used in the chart factors much less the very large price drop in the 12th figure of the series. Whereas in the simple moving average calculation that large price drop is given equal weight with the other price movements.

Over-bought and over-sold lines

The Relative Strength Index is usually displayed with a line at 70 indicating over-bought and a line at 30 indicating over-sold. When the RSI moves above 70 that is an indication that the stock could be over-bought and when it moves below 30 that is an indication that the stock could be oversold.

What does the RSI show?

The Relative Strength Index is just an indicator of price momentum. Let’s say this another way, it indicates where the current price is now in comparison to where the price has been over the last 14 trading days. This is sticking with the 14 day RSI period.

As already noted when the RSI is 70 or above the stock is considered to be in overbought territory and at 30 and below it is considered to be in oversold territory.

The RSI is considered to give a sell signal if it crosses from above 70 and moves consistently lower.

The reverse also applies. The RSI is considered to give a buy signal if it crosses from below 30 and moves consistently higher. Here is an example of the same ETF as considered earlier, the SPY for the period February to June 2020.

SPY Feb to June 2020 with RSI

As we can see if we had only considered buy and sell signals from the RSI during this period we would not have made particularly good trading decisions. In fact, all through the first half of March 2020 when the market was tanking the RSI was giving repeated, though not very strong buy signals.

The RSI and MACD

Let’s take a look at the SPY for the period of large price movements between February and June 2020 and compare the signals generated the RSI with those of the MACD, which we examined here.

SPY Feb to June 2020 RSI and MACD

As the chart shows the SPY, which is just tracking the Standard and Poor’s 500 Index reached a peak around mid-February after a long and significant bull market over the previous 3 years. The market started to drop in early March and plunged to a bottom about 30 percent off its February peak around 23 March. The market climbed back from there and nearly reached the same price level as its earlier February peak during the first week of June.

Signals from the RSI

Over this period the RSI gave the following signals

  • Sell signal around 20 January
  • Buy signal around 1 March
  • Sell signal around 12 June

Signals from the MACD

Over this same period, the MACD gave these signals

  • Sell signal around 18 February
  • Buy signal around 25 March
  • Weak sell and buy signals around 9 and 18 May
  • Sell signal around 13 June

For this ETF and during this period there is little doubt that the MACD gave more reliable and successful buy and sell signals than did the RSI.

Limitations of the RSI

I think we have seen that the RSI is actually quite limited. That should not be surprising as it is only a way of looking at price movements of a stock without reference to the market or other factors. It is just a price momentum tool and should only be used with that in mind. To find out more about the Relative Strength Index, check here.

A single-page PDF summary of the Relative Strength Index is available here.Relative Strength Index summary


I hope you found this article interesting and useful. Do leave me a comment, a question, an opinion or a suggestion and I will reply soonest. And if you are really inclined to do me a favor, scroll down a bit and click on one of the social media buttons and share with your friends. They may just thank you for it.


Disclaimer: I am not a financial professional. All the information on this website and in this article is for information purposes only and should not be taken as investment advice, good or bad.


Affiliate Disclosure: This article contains affiliate links. If you click on a link and buy something, I may receive a commission. You will pay no more so please go ahead and feel free to make a purchase. Thank you!


Share and Enjoy !

Shares

Andy

28 Comments

  1. Andy this site is a godsend. I’m a college student, and investing can be so complicated and intimidating. I know that it’s absolutely crucial for me to learn, though, and you’ve made it so much simpler to understand. I think RSI may be the most useful tool I’ll ever need in buying and selling. I’ll be sure to check it out and evaluate all of my current stocks with it. Thank you!

  2. Hi Andy!

    So my head is spinning after your article. I did bookmark your page so I can revisit it to read the rest of what you have to hopefully have it all make sense to me. I currently manage my wife’s and my Roth IRAs so the more knowledge I can gain from learning the market the better! Thanks for the info!

    • Hi Jordan and thanks for the comment. If your time horizon is long, which I am guessing it is, the timing of your investment decisions is going to be less important. It will be much more important for you to decide on a risk strategy and asset allocation that meets your objectives. One of the best ways to take timing off the table is to use dollar-cost averaging. The RSI is really one indicator that can be used to indicate price momentum and can be good to help time either bullish or bearish short or intermediate-term trades. As I say managing a Roth IRA you probably want to focus more on risk strategy and asset allocation. I hope this helps. Best regards, Andy

  3. Great post! You wrote it in a way that was so easy to understand, even for someone like me who has no background info on the topic. And the use of visuals made it even easier. 

    I will be sure to forward this to my husband who is learning how to invest in the stock market. For myself as a newbie, what would you recommend I read to learn how to make smart investment choices as a beginner? 

    • Hi Dana and thanks for your comment. For the best all-round introduction to the stock market and investing I would recommend “The Intelligent Investor” by Benjamin Graham. Here is a link that will take you directly to a short review.

      https://badinvestmentsadvice.com/best-investment-analysis-books-and-some/#intelligent

      It is a very accessible read and not too long. If you search for books on learning investing or learning the stock market on Amazon the top of the list will be books, many of which have a large number of superficial, excellent reviews but if you dig deeper you will find some bad and honest reviews. Most of the recently written books on this subject are from people who run investment advisory services and they publish these books mainly as promotional material to get you to sign up for their paid subscription services. Often the cost of the book is a fraction of the monthly subscription cost. The content of these books is often thin and not really aimed at equipping you with the understanding and confidence you need to invest on your own, rather they are hoping you will subscribe to their service.

      An advantage of “The Intelligent Investor” is that the principles remain timeless, the latest edition has commentary explains the principles to make them relevant for current day circumstances and there is nobody trying to upsell you anything. Moreover the book was written with the express goal of giving someone new to the subject the understanding and confidence to invest for themselves.

      I hope this helps and I wish you both the very best of luck

      Best regards

      Andy

  4. Hi Andy, I don’t have much idea about the stock market. This post is very interesting and informative for those who will start doing stock trading.  Now I understand that the RSI is measuring the momentum of increase or decrease in the price of a stock. The summary formula gives a very clear guideline for a newbie doing stock trading. The indicator of when to buy and sell is very easy to remember. I enjoy the simplified presentation. 

    • Hi Lyn and thanks for your comment. I am glad you found the article informative and easy to follow. Best regards, Andy

  5. Great post I have been using the RSI all the time but always with a few more indicators to know when the market is entering over bought or over sold territory that way I know something is about to happen. I never knew how to do the calculations as  my platform does that on auto, life is easy these days. 

    The information in this post does give me a new perspective of the RSI. It is easy to understand and to follow. I like How you explain with relevant graphs and the hole concept of the RSI and not only the calculation.

    It was nice to dust off on the RSI and I will look into some of your other indicators thank you for this post

    • Hi and thanks for your comment. Like you, I let my brokerage platform do all the calculations for me. But I think digging into the formula and calculations behind these tools gives a better insight into how they behave and then we can better understand why one tool may be saying one thing and another something different. Like you, I use a number of these indicators and I find it useful to get under the hood and gain a better sense of how they work. Thanks again and I wish you all success. Best regards, Andy

  6. Well, thank you for this crash course on trading. I have always fancied investing in stock trading but then with the limited knowledge I have, I fear I might lose it all. But this article has done me some justice and given me a starting point. I’m also bookmarking this site because its what I definitely need. Thank you for sharing.

  7. Wow! This is really a good article. I actually engage in forex trading and though I make use of the RSI to check for trend change most of the time, I didn’t really know what really drives the movement of this indicator and it makes total sense to me now after I have read this post. Thanks so much for giving a very well detailed explanation of how it works.

  8. Thank you for sharing a lovely, informative article with us. The chief item of this article is the Relative strength indicator calculation. It is truly amazing that you covered this subject so well in your post. I’ve learned a lot from reading your post and gained a lot of knowledge about it. I like The Relative Strength Index or RSI of the points in your article. I am also an investor. Your article will be very useful to me. When I go to invest, i will see the relative strength using this calculator.

    I have read and enjoyed your article so I would like to share your article with my friends by sharing it in the Facebook group so that everyone can know about your article and gain knowledge about it.

    • Hi and thank you for your comment. Please do share on Facebook or any other social media site. I am glad you found it interesting. Best regards, Andy

  9. Thanks for sharing this interesting and informative article, even though I don’t know that much about trading. I understand all you have here but I can hardly incorporate it into my brain. Please I wouldn’t mind if you can make another article talking about the basics of trading for some of us willing to learn more about it. Thanks

    • Hi and thank you for your comment. I would suggest that you read the latest article which simplifies how to approach investing in stocks. Here is the link
      https://badinvestmentsadvice.com/stock-investing-101-pdf/
      The focus of this article is investing as all the evidence shows it is important to sort out your goals and risk tolerance first before you start. Please don’t hesitate to leave me another comment on that article I would be interested to know whether that was helpful. Thanks again for your comment and helpful suggestion. Best regards, Andy

  10. Nice one, this is a great site, i have gained more knowledge and insight, i think this is for me, Relative Strength indicator is something i might like to try, i have been trying to make some investment some times ago and it seems kinda difficult but now your post has made it easy, i will definitely share this post and recommend it to some of my friends having difficulty in investing too..Thanks for this awesome post..

    • Hi and thanks for the comment. I would always caution using any of these indicators as part of an overall approach and strategy and no over-relying on any one of them, the relative strength indicator included. I wish you good luck with your investing. Best regards, Andy

  11. Thank you for your great explanation of RSI. I am always looking at ways to be a better investor, both as an active and as a passive investor. I do agree as I look at your explanation that is it a somewhat limited tool as it doesn’t take into account outside factors. Though I do plan on incorporating this in my arsenal of tools to better my finances. 

    • Hi and thanks for the comment. I agree with you. The RSI is only one of a number of indicators and tools I look at for investing and trading decisions. I wish you good fortune in your investing activities. Best regards, Andy

  12. Hello and thank you for your in-depth look at the Relative Strength Indicator (RSI) calculation.  Personally I have no experience with stock market analysis.  When it comes to investing my experience is more related to mutual funds and segregated funds (I am from Canada).  I am not sure if I would would want to directly invest in the stock market and manage all my own trades, but it’s always good to have a basic understanding of how the mechanisms work that are interpreted by those who manage investment portfolios.
    Cheers,
    David

    • Hi and thanks for the comment. I agree with you it is always good to build an understanding of how markets and investments work if you have investments that are professionally managed. It will keep your investment advisor on their toes and you will be better equipped to give them the information they need to make the right investment choices to meet your specific needs and circumstances. Thanks again and best regards, Andy

  13. Relative strength indicator calculation was interesting to begin with and then never mind throwing me in the paddling pool you threw me in the deep end. It’s not my area of expertise but I guess this system looks at progression over a short period compared to other investments rather than a longer term traditional view? Please tell me I have that right at least? 

    I am not entirely sure how I would use it personally without financial advice. Yet I do understand the notion of the market going up and down and wider trends. I guess this is your point, that it is a different way of looking at it.

    I would be interested in your page for dummies as for me as I do feel that it needs a simple approach although many of your readers seem to get it straight away. I guess it’s your audience and maybe I am not it unless you can convince me otherwise! 

    Maybe more benefit than systems. Who knows! Anyway you clearly know your stuff. Thanks for sharing.

    • Hi Phil and thanks for the comment. Yes, you got it right. The Relative Strength Index is just a short term price momentum indicator as it is only looking back over the last 14 days of price activity and nothing else. It is really useful when considering the timing of getting into or out of a position that you have decided on because of other factors. Because the RSI just has that short 14-day window view it is only going to indicate within that time period whether timing could be advantageous or not. Thanks for your comment. It is very helpful for me to understand where you are coming from as I so easily head off down technical rabbit holes. Best regards, Andy

  14. As a newbie in stocks, funds and crypto investments there are a lot of new terms to learn and understand. RSI is one of them and I have never actually heard of the term before reading about it in your blog post.

    You explain clearly what relative strength is which is important to understand RSI. From what you described it is a kind of “price history” for a stock, showing its tendency based on the 14 days period it covers. And as such will give and an indication of sell or buy.

     Is that a correct observation of the term RSI?

    • Hi and thanks for the comment. Yes, you are absolutely right in your description of the RSI. It is really just one of many tools and indicators. Thanks again for the comment. Best regards, Andy

Leave a Reply

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