The relative strength index (RSI) is a technical indicator used in the analysis of financial markets. It is intended to chart the current and historical strength or weakness of a stock or market based on the closing prices of a recent trading period. The indicator should not be confused with relative strength. The RSI is classified as a momentum oscillator, measuring the velocity and magnitude of price movements. Momentum is the rate of the rise or fall in price. The relative strength RS is given as the ratio of higher closes to lower closes. Concretely, one computes two averages of absolute values of closing price changes, i.e. two sums involving the sizes of candles in a candle chart. The RSI computes momentum as the ratio of higher closes to overall closes: stocks which have had more or stronger positive changes have a higher RSI than stocks which have had more or stronger negative changes. The RSI is most typically used on a 14-day timeframe, measured on a scale from 0 to 100, with high and low levels marked at 70 and 30, respectively. Short or longer timeframes are used for alternately shorter or longer outlooks. High and low levels—80 and 20, or 90 and 10—occur less frequently but indicate stronger momentum. The relative strength index was developed by J. Welles Wilder and published in a 1978 book, New Concepts in Technical Trading Systems, and in Commodities magazine (now Modern Trader magazine) in the June 1978 issue. It has become one of the most popular oscillator indices. The RSI provides signals that tell investors to buy when the security or currency is oversold and to sell when it is overbought. RSI with recommended parameters and its day-to-day optimization was tested and compared with other strategies in Marek and Šedivá (2017). The testing was randomised in time and companies (e.g., Apple, Exxon Mobil, IBM, Microsoft) and showed that RSI can still produce good results; however, in longer time it is usually overcome by the simple buy-and-hold strategy.
Calculation For each trading period an upward change U or downward change D is calculated. Up periods are characterized by the close being higher than the previous close:
U = close now − close previous {\displaystyle U={\text{close}}_{\text{now}}-{\text{close}}_{\text{previous}}}
D = 0 {\displaystyle D=0}
Conversely, a down period is characterized by the close being lower than the previous period's close,
U = 0 {\displaystyle U=0}
D = close previous − close now {\displaystyle D={\text{close}}_{\text{previous}}-{\text{close}}_{\text{now}}}
If the last close is the same as the previous, both U and D are zero. Note that both U and D are nonnegative numbers. Averages are now calculated from sequences of such U and D, using an n-period smoothed or modified moving average (SMMA or MMA), which is the exponentially smoothed moving average with α = 1 / n. Those are positively weighted averages of those positive terms, and behave additively with respect to the partition. Wilder originally formulated the calculation of the moving average as: newval = (prevval * (n - 1) + newdata) / n, which is equivalent to the aforementioned exponential smoothing. So new data is simply divided by n, or multiplied by α and previous average values are modified by (n - 1) / n, i.e. 1 - α. Some commercial packages, like AIQ, use a standard exponential moving average (EMA) as the average instead of Wilder's SMMA. The smoothed moving averages should be appropriately initialized with a simple moving average using the first n values in the price series. The ratio of these averages is the relative strength or relative strength factor:
RS = SMMA ( U , n ) SMMA ( D , n ) {\displaystyle {\text{RS}}={\frac {{\text{SMMA}}(U,n)}{{\text{SMMA}}(D,n)}}}
The relative strength factor is then converted to a relative strength index between 0 and 100:
RSI = 100 ⋅ ( 1 − SMMA ( D , n ) SMMA ( U , n ) + SMMA ( D , n ) ) = 100 − 100 1 + RS {\displaystyle {\text{RSI}}=100\cdot \left(1-{\frac {{\text{SMMA}}(D,n)}{{\text{SMMA}}(U,n)+{\text{SMMA}}(D,n)}}\right)=100-{100 \over {1+{\text{RS}}}}}
If the average of U values is zero, both RS and RSI are also zero. If the average of U values equals the average of D values, the RS is 1 and RSI is 50. If the average of U values is maximal, so that the average of D values is zero, then the RS value diverges to infinity, while the RSI is 100.
Interpretation
Basic configuration
… excerpt ends here. Continue reading the full article.



