RSI

The relative strength index (RSI) is a momentum indicator used in technical analysis that measures the magnitude of recent price changes to evaluate overbought or oversold conditions in the price of a stock or other asset. The RSI is displayed as an oscillator (a line graph that moves between two extremes) and can have a reading from 0 to 100. The indicator was originally developed by J. Welles Wilder Jr. and introduced in his seminal 1978 book, "New Concepts in Technical Trading Systems."

Traditional interpretation and usage of the RSI are that values of 70 or above indicate that a security is becoming overbought or overvalued and may be primed for a trend reversal or corrective pullback in price. An RSI reading of 30 or below indicates an oversold or undervalued condition.

The Formula for RSI

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={\text{close}}_{{\text{now}}}-{\text{close}}_{{\text{previous}}} D=0

Conversely, a down period is characterized by the close being lower than the previous period's close (note that D is nonetheless a positive number), U=0 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. The average U and D are calculated using an n-period smoothed or modified moving average (SMMA or MMA) which is an exponentially smoothed Moving Average with α = 1/period. Some commercial packages, like AIQ, use a standard exponential moving average (EMA) as the average instead of Wilder's SMMA.

Wilder originally formulated the calculation of the moving average as: newval = (prevval * (period - 1) + newdata) / period. This is fully equivalent to the aforementioned exponential smoothing. New data is simply divided by period which is equal to the alpha calculated value of 1/period. Previous average values are modified by (period -1)/period which in effect is period/period - 1/period and finally 1 - 1/period which is 1 - alpha.

The ratio of these averages is the relative strength or relative strength factor:{\displaystyle RS={\frac RS={\frac  {{\text{SMMA}}(U,n)}{{\text{SMMA}}(D,n)}}

If the average of D values is zero, then according to the equation, the RS value will approach infinity, so that the resulting RSI, as computed below, will approach 100.

The relative strength factor is then converted to a relative strength index between 0 and 100:RSI=100-{100 \over {1+RS}}

The smoothed moving averages should be appropriately initialized with a simple moving average using the first n values in the price series.

Last updated

Was this helpful?