Relative strength index

Last updated

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.

Contents

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. [1] It has become one of the most popular oscillator indices. [2]

The RSI provides signals that tell investors to buy when the security or currency is oversold and to sell when it is overbought. [3]

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. [4]

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:

Conversely, a down period is characterized by the close being lower than the previous period's close,

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:

The relative strength factor is then converted to a relative strength index between 0 and 100: [1]

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

Relative strength index 7-period RSIwiki.gif
Relative strength index 7-period
Bitcoin, RSI-14, bearish divergence occurs Bitcoin RSI14 Divergence.png
Bitcoin, RSI-14, bearish divergence occurs

The RSI is presented on a graph above or below the price chart. The indicator has an upper line, typically at 70, a lower line at 30, and a dashed mid-line at 50. Wilder recommended a smoothing period of 14 (see exponential smoothing, i.e. α = 1/14 or N = 14).

Principles

Wilder posited [1] that when price moves up very rapidly, at some point it is considered overbought. Likewise, when price falls very rapidly, at some point it is considered oversold. In either case, Wilder deemed a reaction or reversal imminent.

The level of the RSI is a measure of the stock's recent trading strength. The slope of the RSI is directly proportional to the velocity of a change in the trend. The distance traveled by the RSI is proportional to the magnitude of the move.

Wilder believed that tops and bottoms are indicated when RSI goes above 70 or drops below 30. Traditionally, RSI readings greater than the 70 level are considered to be in overbought territory, and RSI readings lower than the 30 level are considered to be in oversold territory. In between the 30 and 70 level is considered neutral, with the 50 level a sign of no trend. [5]

Divergence

Wilder further believed that divergence between RSI and price action is a very strong indication that a market turning point is imminent. Bearish divergence occurs when price makes a new high but the RSI makes a lower high, thus failing to confirm. Bullish divergence occurs when price makes a new low but RSI makes a higher low. [1] :68

Furthermore, traders often use "hidden" divergences to indicate possible trend reversals. A hidden bullish divergence occurs when the price makes a lower high, while the RSI makes a higher high. Conversely, a hidden bearish divergence occurs when price makes a higher low, but the RSI makes a lower low.[ citation needed ]

Overbought and oversold conditions

Wilder thought that "failure swings" above 50 and below 50 on the RSI are strong indications of market reversals. [6] For example, assume the RSI hits 76, pulls back to 72, then rises to 77. If it falls below 72, Wilder would consider this a "failure swing" above 70.

Finally, Wilder wrote that chart formations and areas of support and resistance could sometimes be more easily seen on the RSI chart as opposed to the price chart. The center line for the relative strength index is 50, which is often seen as both the support and resistance line for the indicator.

Uptrends and downtrends

In addition to Wilder's original theories of RSI interpretation, Andrew Cardwell has developed several new interpretations of RSI to help determine and confirm trend. First, Cardwell noticed that uptrends generally traded between RSI 40 and 80, while downtrends usually traded between RSI 60 and 20. Cardwell observed when securities change from uptrend to downtrend and vice versa, the RSI will undergo a "range shift."

Example of RSI Indicator Divergence Rsi-divergence.jpg
Example of RSI Indicator Divergence

Next, Cardwell noted that bearish divergence: 1) only occurs in uptrends, and 2) mostly only leads to a brief correction instead of a reversal in trend. Therefore, bearish divergence is a sign confirming an uptrend. Similarly, bullish divergence is a sign confirming a downtrend.

Reversals

Finally, Cardwell discovered the existence of positive and negative reversals in the RSI. Reversals are the opposite of divergence. For example, a positive reversal occurs when an uptrend price correction results in a higher low compared to the last price correction, while RSI results in a lower low compared to the prior correction. A negative reversal happens when a downtrend rally results in a lower high compared to the last downtrend rally, but RSI makes a higher high compared to the prior rally.

In other words, despite stronger momentum as seen by the higher high or lower low in the RSI, price could not make a higher high or lower low. This is evidence the main trend is about to resume. Cardwell noted that positive reversals only happen in uptrends while negative reversals only occur in downtrends, and therefore their existence confirms the trend.

Cutler's RSI

A variation called Cutler's RSI is based on a simple moving average of U and D, [7] instead of the exponential average above. Cutler had found that since Wilder used a smoothed moving average to calculate RSI, the value of Wilder's RSI depended upon where in the data file his calculations started. Cutler termed this Data Length Dependency. Cutler's RSI is not data length dependent, and returns consistent results regardless of the length of, or the starting point within a data file.

Cutler's RSI generally comes out slightly different from the normal Wilder RSI, but the two are similar, since SMA and SMMA are also similar.

General definitions

In analysis,

Now for defined as being equal to if and only if the value of is positive, the index is a quotient of two integrals and is a value that assigns a weight to the part of that is positive. A ratio of two averages over the same domain is also always computed as the ratio of two integrals or sums.

Yet more specifically, for a real function on an ordered set (e.g. a price curve), one may consider that function's gradient , or some weighted variant thereof. In the case where is an ordered finite set (e.g. a sequence of timestamps), the gradient is given as the finite difference.

In the relative strength index, evaluates a sequence derived from closing prices observed in an interval of so called market periods . The positive value equals the absolute price change , i.e. at , multiplied by an exponential factor according to the SMMA weighting for that time. The denominator is the sum of all those numbers. In the numerator one computes the SMMA of only , or in other words multiplied by the indicator function for the positive changes. The resulting index in this way weighs , which includes only the positive changes, over the changes in the whole interval.

See also

Related Research Articles

<span class="mw-page-title-main">Divergence</span> Vector operator in vector calculus

In vector calculus, divergence is a vector operator that operates on a vector field, producing a scalar field giving the quantity of the vector field's source at each point. More technically, the divergence represents the volume density of the outward flux of a vector field from an infinitesimal volume around a given point.

<span class="mw-page-title-main">Potential energy</span> Energy held by an object because of its position relative to other objects

In physics, potential energy is the energy held by an object because of its position relative to other objects, stresses within itself, its electric charge, or other factors. The term potential energy was introduced by the 19th-century Scottish engineer and physicist William Rankine, although it has links to the ancient Greek philosopher Aristotle's concept of potentiality.

In linear algebra, the trace of a square matrix A, denoted tr(A), is defined to be the sum of elements on the main diagonal of A. The trace is only defined for a square matrix.

In vector calculus, the divergence theorem, also known as Gauss's theorem or Ostrogradsky's theorem, is a theorem relating the flux of a vector field through a closed surface to the divergence of the field in the volume enclosed.

<span class="mw-page-title-main">Heat equation</span> Partial differential equation describing the evolution of temperature in a region

In mathematics and physics, the heat equation is a certain partial differential equation. Solutions of the heat equation are sometimes known as caloric functions. The theory of the heat equation was first developed by Joseph Fourier in 1822 for the purpose of modeling how a quantity such as heat diffuses through a given region.

In mathematics, the Laplace operator or Laplacian is a differential operator given by the divergence of the gradient of a scalar function on Euclidean space. It is usually denoted by the symbols , (where is the nabla operator), or . In a Cartesian coordinate system, the Laplacian is given by the sum of second partial derivatives of the function with respect to each independent variable. In other coordinate systems, such as cylindrical and spherical coordinates, the Laplacian also has a useful form. Informally, the Laplacian Δf (p) of a function f at a point p measures by how much the average value of f over small spheres or balls centered at p deviates from f (p).

A continuity equation or transport equation is an equation that describes the transport of some quantity. It is particularly simple and powerful when applied to a conserved quantity, but it can be generalized to apply to any extensive quantity. Since mass, energy, momentum, electric charge and other natural quantities are conserved under their respective appropriate conditions, a variety of physical phenomena may be described using continuity equations.

In mathematical statistics, the Kullback–Leibler (KL) divergence, denoted , is a type of statistical distance: a measure of how one probability distribution P is different from a second, reference probability distribution Q. A simple interpretation of the KL divergence of P from Q is the expected excess surprise from using Q as a model when the actual distribution is P. While it is a measure of how different two distributions are, and in some sense is thus a "distance", it is not actually a metric, which is the most familiar and formal type of distance. In particular, it is not symmetric in the two distributions, and does not satisfy the triangle inequality. Instead, in terms of information geometry, it is a type of divergence, a generalization of squared distance, and for certain classes of distributions, it satisfies a generalized Pythagorean theorem.

In stock and securities market technical analysis, parabolic SAR is a method devised by J. Welles Wilder Jr., to find potential reversals in the market price direction of traded goods such as securities or currency exchanges such as forex. It is a trend-following (lagging) indicator and may be used to set a trailing stop loss or determine entry or exit points based on prices tending to stay within a parabolic curve during a strong trend.

<span class="mw-page-title-main">MACD</span> Chart indicator of moving average convergence/divergence

MACD, short for moving average convergence/divergence, is a trading indicator used in technical analysis of securities prices, created by Gerald Appel in the late 1970s. It is designed to reveal changes in the strength, direction, momentum, and duration of a trend in a stock's price.

The money flow index (MFI) is an oscillator that ranges from 0 to 100. It is used to show the money flow over several days.

In financial technical analysis, momentum (MTM) and rate of change (ROC) are simple indicators showing the difference between today's closing price and the close N days ago. Momentum is the absolute difference in stock, commodity:

<span class="mw-page-title-main">Trix (technical analysis)</span>

Trix is a technical analysis oscillator developed in the 1980s by Jack Hutson, editor of Technical Analysis of Stocks and Commodities magazine. It shows the slope of a triple-smoothed exponential moving average. The name Trix is from "triple exponential."

On-balance volume (OBV) is a technical analysis indicator intended to relate price and volume in the stock market. OBV is based on a cumulative total volume.

The commodity channel index (CCI) is an oscillator originally introduced by Donald Lambert in 1980.

Average true range (ATR) is a technical analysis volatility indicator originally developed by J. Welles Wilder, Jr. for commodities. The indicator does not provide an indication of price trend, simply the degree of price volatility. The average true range is an N-period smoothed moving average (SMMA) of the true range values. Wilder recommended a 14-period smoothing.

In technical analysis of securities trading, the stochastic oscillator is a momentum indicator that uses support and resistance levels. George Lane developed this indicator in the late 1950s. The term stochastic refers to the point of a current price in relation to its price range over a period of time. This method attempts to predict price turning points by comparing the closing price of a security to its price range.

The doji is a commonly found pattern in a candlestick chart of financially traded assets in technical analysis. It is characterized by being small in length—meaning a small trading range—with an opening and closing price that are virtually equal. The efficacy of technical analysis is disputed by the efficient-market hypothesis, which states that stock market prices are essentially unpredictable.

In financial technical analysis, the know sure thing (KST) oscillator is a complex, smoothed price velocity indicator developed by Martin J. Pring.

The true strength index (TSI) is a technical indicator used in the analysis of financial markets that attempts to show both trend direction and overbought/oversold conditions. It was first published William Blau in 1991. The indicator uses moving averages of the underlying momentum of a financial instrument. Momentum is considered a leading indicator of price movements, and a moving average characteristically lags behind price. The TSI combines these characteristics to create an indication of price and direction more in sync with market turns than either momentum or moving average. The TSI is provided as part of the standard collection of indicators offered by various trading platforms.

References

  1. 1 2 3 4 J. Welles Wilder, New Concepts in Technical Trading Systems, ISBN   0-89459-027-8
  2. John J. Murphy (2009). The Visual Investor: How to Spot Market Trends (2nd ed.). John Wiley and Sons. p. 100. ISBN   9780470382059.
  3. Deng, S.; Sakurai, A. (2013-03-01). "Foreign Exchange Trading Rules Using a Single Technical Indicator from Multiple Timeframes". 2013 27th International Conference on Advanced Information Networking and Applications Workshops. pp. 207–212. doi:10.1109/WAINA.2013.7. ISBN   978-1-4673-6239-9. S2CID   14825935.
  4. Marek, Patrice; Šedivá, Blanka (2017). "Optimization and Testing of RSI". 11th International Scientific Conference on Financial Management of Firms and Financial Institutions.
  5. "Relative Strength Index". Investors Underground. Day Trading Encyclopedia. Retrieved 29 June 2016.
  6. "RSI". StockCharts. StockCharts.com. Retrieved 29 June 2016.
  7. Cutler's RSI page at Aspen Graphics Technical Analysis Software