## Technically Speaking Archives

Chart Analysis

Technical Indicators & Overlays

Computerized Investing > March 15, 2014

# Stochastic Oscillator

PRINT | | | | |

## by Wayne A. Thorp, CFA

The stochastic oscillator is a momentum indicator developed by George Lane in the late 1950s. It measures the relationship between a security’s closing price and its trading range (high-low price range) over a predetermined time period.

The premise is that closing prices should predominantly close in the same direction as the prevailing trend. In other words, during an upward trend, prices should be closing near the highs of the trading range while during a downward trend, prices should be closing near the lows of the trading range.

Technicians use the stochastic oscillator to measure the continued momentum and strength of the prevailing trend. To paraphrase Lane, the oscillator doesn’t follow price or volume, but instead follows the speed or momentum of price; and momentum changes direction before price.

## Calculating the Stochastic Oscillator

The oscillator consists of two lines: %K and %D. The %K line is essentially a “raw” measure of momentum, while %D is a moving average of the %K line. The %D line is also the more important of the two lines from an analysis standpoint, producing better signals.

The stochastic oscillator is calculated as follows:

%K = 100 × [(C – Ln) ÷ (Hn – Ln)]

Where:

• C is the most recent closing price

• Ln is the lowest price of the last n trading periods (14 is often the default)

• Hn is the highest price of the last n trading periods (14 is often the default)

%D = three-period simple moving average of %K

These formulas reference “periods,” which can represent days, weeks or months.

## Interpreting the Stochastic Oscillator

As we mentioned earlier, the stochastic oscillator compares the current closing price to the high-low range of prices over a given time period. Consider an example where the current closing price is 100, the highest high over the look-back period is 110 and the lowest low over the look-back period is 95. The high-low range is therefore 15 (110 minus 95), which is the denominator of the %K formula. The latest close less the lowest low equals 5 (100 minus 95), which is the numerator of the %K formula. Dividing 5 by 15 gives us 0.33, and multiplying this by 100 gives us a %K of 33.

The stochastic oscillator is above 50 when the closing price is in the upper half of the look-back period’s trading range, and below 50 when the closing price is in the lower half of the trading range. Low readings indicate that the price is near the low for the look-back period and high readings indicate the price is near the high for the look-back period.

Figure 1 illustrates the stochastic oscillator for Target Corp. (TGT) for the six-month period ending February 19, 2014. The highlighted area represents three different 14-day periods, with the red dotted line in each representing the closing price at the end of the period. Here we see that the stochastic oscillator was near 100 when the closing price was near the top of trading range; the stochastic oscillator was nearly 0 when the close was near the bottom of the trading range; and the stochastic oscillator was just below 50 when the close was in the middle of the trading range.

## Fast or Slow?

Depending on your analytical needs and the characteristics of the security you are following, you may use one of two stochastic oscillators, referred to as “fast” and “slow” stochastic. The purpose of these different stochastic oscillators is to smooth the oscillator in differing fashions to remove some of the randomness and make the oscillator less sensitive to price movements.

The fast stochastic is the basic version of the indicator, using (usually) 14 days as the look-back period for the fast %K line and a three-day simple moving average of the fast %K line for the fast %D line.

The slow stochastic uses a three-day moving average of the “fast” %K line as its slow %K line. In effect, with the slow stochastic, the %K line is the same as the fast stochastic %D line. Then, with the slow stochastic, we take another simple moving average of the slow %K line to arrive at the slow %D line.

Figure 2 illustrates both the fast stochastic and slow stochastic for the iShares Dow Jones U.S. Index (IYY) exchange-traded fund. Here we can see that the %K of slow stochastic indicator in the bottom panel equals the %D of the fast stochastic oscillator in the middle panel.

More experienced traders modify the stochastic oscillator even further, to make it more or less sensitive to price movement. This can involve changing the number of periods in the %K look-back as well as changing the smoothing factor of the %K or %D lines (adjusting the number of periods of the moving average). Shortening the number of periods used for the moving average(s) makes the oscillator more sensitive, thereby increasing the number of signals it generates. Increasing the number of periods in the moving average(s) reduces the number of signals the stochastic oscillator generates by making it less sensitive to price changes.

## Overbought & Oversold Conditions

By multiplying the %K line by 100, the stochastic oscillator is “normalized”; it has predetermined boundaries at both the low and high end, in this case zero and 100. This makes the oscillator useful for identifying overbought and oversold conditions with a security. Traditionally, overbought conditions exist when the indicator rises above 80, while oversold conditions exist below 20. However, traders do make adjustments to account for their individual trading style and the characteristics of the underlying security.

Figure 3 shows the stochastic oscillator for McDonald’s Corp. (MCD) between August 2013 and February 2014. We’ve modified the parameters of the slow stochastic oscillator to use longer moving averages for smoothing (five days instead of three). Doing so makes the oscillator less sensitive, thereby generating fewer signals. Over the six-month period represented on the chart, MCD shares traded in a range roughly between \$92.50 and \$98. Such a price behavior is preferable when using oscillators, since prolonged trends—up or down—will push the indicator into prolonged overbought or oversold conditions.

The highlighted portions of the stochastic panel indicate oversold (oscillator below 20) and overbought (oscillator above 80) conditions. When a security becomes overbought—the stochastic oscillator moves above 80—we should be on the lookout for a possible reversal and price decline. Movements below 80 serve as a signal that such a reversal is taking place (indicated by the red shaded areas on the chart). Likewise, when the oscillator moves into oversold territory below 20, this may foreshadow a rebound and price increase. A move back above 20 is an indication that an upturn is taking place (indicated by the green shaded areas).

## Bull & Bear Divergences

In technical analysis, divergences take place when a new high or low in price is not confirmed by an indicator. When using the stochastic oscillator, a bullish divergence forms when prices are marking lower lows but the oscillator forms higher lows. This may indicate that downward momentum is waning, which might mean a reversal to the upside is coming (a bullish reversal).

Figure 4 shows Tenneco Automotive (TEN) with a bullish divergence in September-October 2012. While TEN shares were hitting new intermediate lows throughout September and October, the stochastic oscillator was making higher lows. When you identify a potential bullish divergence, three events need to take place to confirm the upward price reversal. First, the %K line crosses above the %D line and/or there is a move by the indicator back above 20. Secondly, the %D line moves above 50, placing closing prices in the upper half of the look-back period. Lastly, prices break resistance to the upside. In Figure 4, the %K line crossed above %D in late October, and the following week the %D line crossed above 50. This precedes the breakout of TEN shares through resistance just below \$29. A few weeks later, this former resistance level became a new level of support when prices reversed, only to bounce off support and resume their upward climb.

Lastly, Figure 5 shows National Oilwell Varco (NOV) with a bearish divergence between September-November 2013. The price moved to higher highs over this period, but the stochastic oscillator peaked in late September and formed lower highs through November. The first three signal line reversals from overbought territory during this time proved to be false signals as NOV shares kept moving higher. Finally, in late November, the stochastic oscillator moved below 50. In this example, it took several more trading days until the price finally broke below support around \$81 for the third and final confirming signal of bearish divergence.

## Conclusion

The stochastic oscillator is a momentum indicator useful for identifying potential price reversals, whether by identifying potentially overbought or oversold conditions or via bearish or bullish convergence of prices and the oscillator itself.

Like all oscillators, the stochastic oscillator is best suited for trading ranges or prolonged trends where prices periodically deviate from the prevailing trend. Perhaps most importantly, however, is to remember that you shouldn’t use only one indicator in your analysis. Using the stochastic oscillator in conjunction with other elements, such as volume and support/resistance breakouts, can give you confirmation or refutation of the signals it generates.

## Discussion

Allan Pacela from CA posted about 1 year ago:

Excellent review. I use this stochastic oscillator and find it very helpful in identifying price trend changes. It is not useful for certain classes of stocks e.g. preferred stocks which trade in narrow ranges.
And, there will be false signals. Before taking the signals too seriously, study the history of these signals for your stock of interest.

Wayne Thorp from IL posted about 1 year ago:

Thank you for your comments @Allan. Like most technical indicators, a certain level of price/volume volatility is necessary to get the most out of them. I agree that preferred stocks, in general, lack sufficient volatility.

Johan Hansen from ME posted about 1 year ago:

I like to use it for overall market direction (ie. stocks that make up the S&P500) and then narrow it down to individual stocks/sectors that outperform. For example if majority of SP500 are greater than Stoc66.7 then trend is Up, Less than 33.3 the trend is Down. Between 66.7 and 33.3 market(stock) is neutral and look here for trading opportunities. This works well in conjunction with SMA 20 & 50..... Johan

James Williams from MA posted about 1 year ago:

Great review - thanks!

You need to log in as a registered AAII user before commenting.
Create an account