# Momentum

**Momentum** in technical analysis is the rate of change of security prices or market indexes. Usually, **closing prices** are used to calculate momentum. There are several indicators based on momentum, but they are based on the following definition:

Momentum = Current Price − Earlier Price

The earlier price can be any earlier price, but typically, the price 14 trading days earlier is chosen. An important point to remember and to prevent confusion is that if momentum is nonzero, then it has momentum, even if the difference is the same every day. In other words, the *rate of change* simply refers to the difference between the current price and the earlier price, even if the difference isn't actually changing from day to day. Momentum equals zero when the current price is the same as the earlier price, and it is negative when the current price is less than the earlier price.

However, to compare different securities at different prices the **percentage rate of change** (**ROC**) is used to construct a **momentum indicator** that is independent of security prices, so that stocks at different prices will have the same momentum indicator if the percentage change is the same.

Rate of Change (ROC) | = | Current Price − Earlier Price Earlier Price | × | 100 |

The ROC indicator functions as an oscillator, used to interpret overbought or oversold conditions. The indicator can vary from -100%, if the current price were zero, to more than 100%, although it is unlikely to be over 100%, since the current price must be more than double the earlier price. So, for example, the ROC indicator for a stock that has doubled in price will be 100%. Note that since the security prices can never be less than zero, the ROC indicator can never be less than -100%.

Many technical traders use the momentum indicator as a leading indicator of price extremes that will ultimately revert back toward the mean. For instance, if the indicator exceeds 30%, this would indicate an overbought condition, and there will likely be a pullback as traders sell to take profits. If it is less than -30%, then it is oversold, so it would be a good time to buy since the stock is likely to rise in the immediate future.

There are several problems with the ROC indicator. First, it weights the current day and the prior day equally, even though, the current price is more important. There is also a **drop-off effect**, where the ROC indicator can change significantly on each day depending on what prior day was dropped.

Which leads to the main problem with the rate-of-change indicator. If the earlier day had an anomalous spike or gap in price, then the ROC indicator will also give an anomalous reading that is not representative of market conditions. To solve this problem, 2 other momentum indicators were developed that either used averages for a previous range of trading days, or by using the highest high or the lowest low over a previous range. By using a range or window period, the effect of anomalous days is minimized. Furthermore, both RSI indicator and the stochastic oscillator give greater weight to the last closing price.

## Relative Strength Index (RSI)

Not to be confused with *relative strength*, which is how much a particular stock rises or falls compared to other stocks or a market average, the **relative strength index** (**RSI**), developed by J. Welles Wilder, compares the stock's gains over its losses over a specific duration, usually 14 trading days. Wilder reasoned that if gains significantly exceeded losses over the period, then the stock was overbought, and if losses significantly exceeded gains, then it was oversold.

As an oscillator indicating either an overbought or oversold condition, Wilder normalized his function so that it ranged from 0 to 100, with a value exceeding 70 indicating an overbought condition and a value lower than 30 indicating an oversold condition. However, some technicians use different numbers depending on the trend. An RSI exceeding 50 can also indicate an uptrend and an RSI less than 50 indicates a downtrend.

Wilder used a 14-day period for the RSI, and although other technicians have used a different number of days in their calculations, 14 days continues to be the standard.

For the 1^{st} calculation of the RSI for a security, Wilder simply added all the gains over the 14-day period and divided it by the sum of all the losses. This was then used in the RSI equation to normalize it.

UPS = Sum of gains on up days over 14-day period / 14

DOWNS = Sum of losses on down days over period / 14

Note that DOWNS is a positive number; the losses are added as positive numbers.

RS = UPS / DOWNS

Relative Strength Index (RSI) | = | 100 | - | 100 1 + RS |

Starting on the 15^{th} day, Wilder used a smoothing function to calculate the new RSI by taking the RSI for the previous day and multiplying it by 13 and adding the result to the gain or loss for the current day, giving the current day greater weight.

UPS_{day k} | = | UPS_{day k-1} × 13+ Gain _{day k}14 |

DOWNS_{day k} | = | DOWNS_{day k-1} × 13+ Loss _{day k}14 |

The new UPS and DOWNS is then used to calculate the current RS and RSI. This method of smoothing is called the **Wilder exponential moving average**, and is used in several other technical indicators.

Because the RSI frequently gives false signals, the RSI is mostly used for confirmation, not for buy/sell signals.

## Stochastic Oscillator (%K)

While most oscillators derive their input from a preceding specific number of days, the stochastic oscillator puts more emphasis on the last closing price. This makes it more responsive to recent price action.

George Lane has promoted this oscillator since 1954, but the origination of the stochastic oscillator is obscure. Why it was named the *stochastic oscillator* is also obscure. Although a common meaning of stochastic is randomness, it also means something that is governed by the laws of probability. While this definition could describe the whole of technical analysis, it at least provides a plausible basis in naming the oscillator.

The **stochastic oscillator**, represented by the symbol **%K**, is based on a **window period** that typically spans 14 trading days, where the highest high and the lowest low are selected from the range, and the last closing price are used to calculate %K. %K = 0 when the last close is also the low for the window period.

Stochastic Oscillator (%K) | = | Close Price − Lowest Low Highest High − Lowest Low | × | 100 |

Because this formula fluctuates rapidly, especially in a volatile market, it is usually smoothed by calculating its **simple moving average** (**SMA**) over the last 3 trading days. This is often called the **fast stochastic**, and is represented as the **fast %D**.

Fast %D = 3-day SMA of %K

However, in volatile markets, even the fast %D fluctuates rapidly and can give many false signals, so it is smoothed again, and called the **slow stochastic**, or the **slow %D**.

Slow %D = 3-day SMA of fast %D

Slow %D is a 3-day simple moving average of the 3-day simple moving average of %K.

Like most other technical indicators, the stochastic oscillator has variations. Different window periods can be selected as well as different moving averages, although the input variables shown here are the most common. George Lane used 5 days for the window period. The input variables are often depicted as a set of 3 numbers, with the 1^{st} number showing the number of trading days in the window period and the other 2 numbers showing the number of days in the moving averages. So the most common input variables would be shown as 14-3-3.

The stochastic oscillator, like all oscillators, is best used in a trading-range market as a confirmation signal, with values exceeding 80 indicating an overbought condition while values less than 20 indicating an oversold condition. Crossovers of the fast and slow stochastic are also used as trading signals.

### Williams %R

Another common variation of the stochastic oscillator originated by Larry Williams is the **Williams %R**, which compares the most recent close to the high of the window period rather than to the low.

Williams %R | = | Highest High − Close Price Highest High − Lowest Low | × | 100 |

The Williams %R varies somewhat inversely to %K, and varies from 0 to -100, while %K varies from 0 to 100. Note that the overbought and oversold numbers are also reversed, with numbers exceeding -20 indicating an overbought condition while a number less than -80 indicates an oversold condition. %R = 0 when the close is the high for the window period.