This website uses cookies to collect usage information in order to offer a better browsing experience. By browsing this site or by clicking on the "ACCEPT COOKIES" button you accept our Cookie Policy.

RSI Indicator – Part I

QuantInsti

Contributor:
QuantInsti
Visit: QuantInsti

The Relative Strength Index (RSI) indicator, as the name suggests, tells us the relative strength of the asset. RSI is counted as a robust technical indicator.

RSI calculation with the help of an example

Let’s understand how to calculate and graph the RSI indicator. While you can easily calculate the RSI indicator value with the Python code, for explanation purposes we will do it manually.

Quant

Step 1: Closing Price

We will take the closing price of the stock for 30 days. The closing price is mentioned in column (1).

Step 2: Changes in Closing Price

We then compare the closing price of the current day with the previous day’s closing price and note them down. Thus, from the table, for 25-04, we get the change in price as (280.69 – 283.46) = -2.77.

Similarly, for 26-04, Change in price = (Current closing price – Previous closing price) = (285.48 – 280.6) = 4.79. We will then tabulate the results in the column mentioned as “Change (2)”. In this manner, we calculated the change in price.

Step 3: Gain and Loss

We will now create two sections depending on whether the price increased or decreased, with respect to the previous day’s closing price.

If the price has increased, we note down the difference in the “Gain” column, and if it’s a loss, then we note it down in the “Loss” column.

For example, on 26-04, the price had increased by 4.79. Thus, this value would be noted in the “Gain” column.

If you look at the data for 25-04, there was a decrease in the price by 2.77. Now, while the value is written as negative in the “change” column, we do not mention the negative sign in the “Loss” column. And only write it as 2.77. In this manner, the table for the columns “Gain (3)” and “Loss (4)” is updated.

In the next article, Rekhit will discuss Average Gain and Loss

Disclosure: Interactive Brokers

Information posted on IBKR Traders’ Insight that is provided by third-parties and not by Interactive Brokers does NOT constitute a recommendation by Interactive Brokers that you should contract for the services of that third party. Third-party participants who contribute to IBKR Traders’ Insight are independent of Interactive Brokers and Interactive Brokers does not make any representations or warranties concerning the services offered, their past or future performance, or the accuracy of the information provided by the third party. Past performance is no guarantee of future results.

This material is from QuantInsti and is being posted with permission from QuantInsti. The views expressed in this material are solely those of the author and/or QuantInsti and IBKR is not endorsing or recommending any investment or trading discussed in the material. This material is not and should not be construed as an offer to sell or the solicitation of an offer to buy any security. To the extent that this material discusses general market activity, industry or sector trends or other broad based economic or political conditions, it should not be construed as research or investment advice. To the extent that it includes references to specific securities, commodities, currencies, or other instruments, those references do not constitute a recommendation to buy, sell or hold such security. This material does not and is not intended to take into account the particular financial conditions, investment objectives or requirements of individual customers. Before acting on this material, you should consider whether it is suitable for your particular circumstances and, as necessary, seek professional advice.

trading top