Actionable insights on equities, fixed-income, macros and personal finance Start 14-Days Free Trial
Actionable investing insights Get Free Trial
Concepts & Tutorials

LearnTA: Measuring Price Action using the RSI


The Relative Strength Index, or RSI, is perhaps the most popular of all Technical Analysis indicators. Let’s get some definitions out of the way so we can begin to explore what it really does.
Developed by J. Welles Wilder, the Relative Strength Index (RSI) is a momentum oscillator that measures the speed and change of price movements. RSI oscillates between zero and 100. Traditionally, and according to Wilder, RSI is considered overbought when above 70 and oversold when below 30.
Let’s understand how it can help us.

Its application in the more prevalent visual chart-reading school of thought in ’Technical Analysis’ dwells on faith, intuitive pattern recognition, and has little place for evidence-based decision making. In “Technical Analysis Explained – The Successful Investor’s Guide to Spotting Investment Trends and Turning Points”, the author Martin Pring explains the Relative Strength Indicator (RSI) and concludes by pointing out, “RSI can be really useful when it triggers divergences, completes price patterns, or violates trend lines.” Unfortunately, all three – divergences, price patterns and trend lines – are subjective and rely heavily on visual pattern recognition. While there are many traders who can use these tools like a skilled craftsman to arrive at precise buy and sell signals, let’s evaluate how RSI can objectively describe price action.
The RSI is typically calculated over 14 periods. Let me use 15 periods i.e. 3 trading weeks, a good timeframe for swing trades. Because RSI is poised as an oscillator, I will limit to examining it only for mean-reversion, applied to the Nifty 50 equity index.

Understanding the Math

RS and RSI
Essentially, RSI compares positive price changes to negative price changes and gives you a number on a scale of 0 to 100.
RSI = 100 – (100 / (1+RS))
RS = Average Gain / Average Loss
Average Gain = Sum of Gains over past 15 periods / 15
Average Loss = Sum of Losses over past 15 periods / 15
Before we proceed, pause and think about this for a moment. There’s some ridiculous math going on here. What’s more ridiculous is that none of the Technical Analysis books have corrected it since RSI was first introduced by Wilders in 1978. Figured it out?
The denominators are the same! They cancel out. RS should be simply Sum of Gains / Sum of Losses. That’s 38 years of blind faith. Anyway, let’s move on.
Consider the following table of price changes. The Sum of Gains here = 15; Sum of Losses = 9. RS = 15/9 = 1.67. Plug it into the formula and you get a corresponding RSI of 62.54.
Closing Prices
Back in 1987, calculating this on a rolling basis would’ve been tough for the average retail investor. Wilder used a hack to easily maintain a record of RSI values. The average gain and average loss calculation shown above was used only for the first calculation in a series. For the subsequent periods, he used this formula:
Average Gain = / 15
Average Loss = / 15
What this means is that relics of previous calculations always remain with its effect diminishing over time. How far back the first average was calculated is not included with RSI numbers, neither are there any guidelines on how far back to go.
This is explained away as ‘smoothing’ the values. I think it’s silly to continue to calculate this way now that it’s quite simple to arrive at the proper calculations, without distorting the underlying RS values. If you want smoothing, add a moving average to it. You want the raw RS values intact because they’re descriptive of price action. Let’s see how.

RS vs RSI, Overbought and Oversold

More RS and RSI
The RSI formula is just a little trick to convert the raw RS number into a scale of 1 to 100 so comparisons become easy.
f(x) = 1 – (1 / (1+x)) maps , the possible range of RS, to and then scale it to 100.
However, this causes problems, especially when the RS value goes up significantly. But first, let’s understand where does the Overbought above 70 and Oversold below 30 interpretation come from.
Consider these three scenarios:
A stock has been moving up such that the sum of gains in the closing prices over the past 15 days is twice the sum of losses in the same period.
Say the sum of losses = x, hence sum of gains = 2x
RS = 2x/x = 2
RSI = 100 – (100/(1+2)) = 66.67
A stock has been moving down such that the sum of losses in the closing prices over the past 15 days is twice the sum of gains in the same period.
Say sum of gains = x, hence sum of losses = 2x
RS = x/2x = 0.5
RSI = 100 – (100/(1+0.5)) = 33.33
A stock has been moving such that the sum of gains in the closing prices over the past 15 days is equal to the sum of losses in the same period.
Say sum of gains = x, hence sum of losses = x
RS = x/x = 1
RSI = 100 – (100/(1+1)) = 50
As you can see, it might be fair to assume that Wilders simply rounded off these numbers to 70 and 30 and they became the Overbought and Oversold levels.
But, all it means is that at RSI of 66.67, price has gone up twice as much as it has gone down in the last 3 weeks; and at RSI of 33.33, price has gone down twice as much as it has gone up in the last 3 weeks; and at RSI 50, price has gone up as much as it has gone down in the last 3 weeks.
Now this describes price action quite well, doesn’t it? If there is one number you wanted to describe what has happened to price in the recent past, this would be it.

Why RSI can cause illusions

In his book “RSI – The Complete Guide”, John Hayden explains the logarithmic nature of RSI. He writes, “It is interesting to note that when the Gain vs Loss ratio changes from 1:1 to 2:1, the change in the RSI value is 16.67 points. When the ratio moves from 2:1 to 3:1, the RSI value only increases another 8.33 points. For the RSI to hit the 80 level, a ratio of 4:1 is needed. That is an Up Average that is four times larger than the Down Average and is a condition that does not occur very often. When the ratio is 20:1 and the Up Average is 20 times the Down Average, the Relative Strength Index value at this time is only 95.24. This is a market condition that almost never occurs when the look back is 14 bars!”
RSI History
RSI History 2
In the comparison between15-day RS and RSI of NIFTY since the day the index began, you’ll notice that the RSI shows a bell-curve like distribution while RS is highly skewed towards the left, with very rare occurrences above 10 and mostly fizzling out at around 5. On zooming in to the left, you’ll notice very few occurrences below 0.4.
Now, let’s take the liberty to generalise a little bit. On the log scale, 0.4 would be equivalent to 4 on the bearish and bullish side respectively. What this means is that relative strength tends to bottom out around 0.4 or when price has gone down 2.5 times than it has gone up. This is roughly an RSI value of 28.5.
However, on the bullish side, there’s a fat tail. Here, the raw RS values act as a better guide to infer the degree of bullishness and whether there’s a higher probability of exhaustion.

  1. 3 landmarks on RSI. 50 = Price has gone up and down in equal measure. 66.67 = Price has gone up twice as much as it has gone down. 33.33 = Price has gone down twice as much as it has gone up.
  2. The largest increase or decrease in RSI happens when the ratio changes from 1:1 to 1:2 or 2:1. This means that RSI is most sensitive to price when it oscillates between 33.33 and 66.67.
  3. While RS or corresponding RSI values are both suitable when analysing potential bottoms, the raw RS value is better when analysing potential tops.

In general, using the RSI to Trade means that you should understand the math behind what the indicator does. Using a trigger of RSI moving up from below to above the 30 line really means that the price seems to be going up more than it’s going down, but in the last 14 days it’s still moved up half the amount it’s moved down.
Treating RSI above 80 as “overbought” also is an oversimplification – what it means is that the price movements of the last 14 days (assuming the parameter is 14) have been much more above going up rather than going down. At an RSI of 80, a price move of 5% will increase the RSI only marginally more than a move of 1%, in all likelihood – so above 80 should not be used as a trigger to sell.
The most price sensitive area is between 33 and 66, and a movement into this zone from outside is most likely to give you a closer correlation with price movements.
There’s a lot more that you can do with the RSI, but we hope that this gives you a window in what the indicator is and how to interpret it at different levels.
Note: You can go to and use the “Add Indicator” tool (or just type / ) and add the Relative Strength Index to see the RSI. Here’s how it looks with the Nifty:
Nifty Performance
More on LearnTA at :

capitalmind logo - 400x118 - apr2016