# Stochastic Oscillator: What It Is, How It Works, How to Calculate

> **Definition**
>
> A stochastic oscillator is a momentum indicator that compares a security's closing price to a range of its prices over a certain time period.

## What Is a Stochastic Oscillator?

A stochastic oscillator is a momentum indicator that compares a particular [closing price](https://www.investopedia.com/terms/c/closingprice.asp) of a security to a range of its prices over a certain period of time.

Its sensitivity to market movements is reducible by adjusting the time period or taking a [moving average](https://www.investopedia.com/terms/m/movingaverage.asp) of the result. It helps identify potential market trend reversals by indicating [overbought](https://www.investopedia.com/terms/o/overbought.asp) and oversold trading conditions on a scale from 0 to 100.

The stochastic oscillator was developed by George Lane in the 1950s and presents the location of the closing price of a stock relative to a stock's high and low prices over a period of time, typically 14 days.

The stochastic oscillator uses two lines: %K and %D. The %K line is the current value, and the %D line is the 3-period moving average of %K. Traders use these lines to predict potential trend reversals.

### Key Takeaways

*   The stochastic oscillator is a momentum indicator that measures the relationship between a security's closing price and its price range over a set period, typically 14 days.
*   It provides trading signals by identifying overbought and oversold conditions, with readings above 80 indicating potential overbought levels and readings below 20 indicating potential oversold levels.
*   The oscillator uses two lines, %K and %D, where %K is the current value and %D is the 3-period moving average of %K, to help traders predict potential trend reversals.
*   Despite its usefulness, the stochastic oscillator can produce false signals, particularly in volatile markets, so it is often used with trend analysis for confirmation.

![Stochastic Oscillator: A momentum indicator comparing a particular closing price of a security to a range of its prices over a certain period of time.](https://www.investopedia.com/thmb/eAFaDV1Fcz_am3EoO_8XKObvK8w=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/Term-Definitions_stochasticoscillator-Final-0ac691d6dead495fb4bfc908a011747c.jpg)

*Technical analysts use a stochastic oscillator to gauge momentum based on an asset's price history. — Jessica Olah / Investopedia*

## How the Stochastic Oscillator Identifies Market Trends

The stochastic oscillator is range-bound, meaning it is always between 0 and 100. This makes it a useful indicator of overbought and oversold conditions.

Traditionally, readings over 80 are considered in the overbought range, and readings under 20 are considered oversold. However, these are not always indicative of impending reversal; very strong trends can maintain overbought or oversold conditions for an extended period. Instead, traders should look to changes in the stochastic oscillator for clues about future trend shifts.

Stochastic oscillator charting generally consists of two lines: one reflecting the actual value of the oscillator for each session, and one reflecting its three-day simple moving average. Because price is thought to follow [momentum](https://www.investopedia.com/articles/active-trading/041814/four-most-commonlyused-indicators-trend-trading.asp), the intersection of these two lines is considered a signal that a reversal may be in the works, as it indicates a large shift in momentum from day to day.

Divergence between the stochastic oscillator and trending price action is also seen as an important reversal signal. For example, when a bearish trend reaches a new lower low, but the oscillator prints a higher low, it may be an indicator that bears are exhausting their momentum, and a bullish reversal is brewing.

The stochastic oscillator is only one of several [technical indicators used by option traders](https://www.investopedia.com/articles/active-trading/022615/most-important-technical-indicators-binary-options.asp) to time entry and exit points.  

![Image](https://www.investopedia.com/thmb/NEmiBUSktBmruSr7GVXsA8Enrbg=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/dotdash_INV-final-Stochastic-Oscillator-Jun-2021-01-0580390daa1c44ffaac8c7ffcbb96f6a.jpg)

*— Image by Sabrina Jiang © Investopedia 2021*

## Calculating the Stochastic Oscillator: Step-by-Step Guide

$\begin{aligned} &\text{\%K}=\left(\frac{\text{C} - \text{L14}}{\text{H14} - \text{L14}}\right)\times100\\ &\textbf{where:}\\ &\text{C = The most recent closing price}\\ &\text{L14 = The lowest price traded of the 14 previous}\\ &\text{trading sessions}\\ &\text{H14 = The highest price traded during the same}\\ &\text{14-day period}\\ &\text{\%K = The current value of the stochastic indicator}\\ \end{aligned}$

Notably, %K is referred to sometimes as the [fast stochastic](https://www.investopedia.com/ask/answers/05/062405.asp) indicator. The "slow" stochastic indicator is taken as %D = 3-period moving average of %K.

The general theory serving as the foundation for this indicator is that in a market trending upward, prices will close near the high, and in a market trending downward, prices close near the low. Trade signals occur when %K crosses its three-day moving average, known as %D.

The difference between the slow and fast stochastic oscillator is that the slow %K incorporates a %K slowing period of 3 that controls the internal smoothing of %K. Setting the smoothing period to 1 is equivalent to plotting the fast stochastic oscillator.

## The Origin and Evolution of the Stochastic Oscillator

The stochastic oscillator was developed in the late 1950s by George Lane. As designed by Lane, the stochastic oscillator presents the location of the closing price of a stock in relation to the high and low prices of the stock over a period of time, typically a 14-day period.

Lane stated in interviews that the stochastic oscillator doesn't follow price, volume, or similar factors. He indicates that the oscillator follows the speed or momentum of price.

Lane also revealed that, as a rule, the momentum or speed of a stock's price movements changes before the price changes direction. In this way, the stochastic oscillator can foreshadow reversals when the indicator reveals bullish or bearish divergences. This is the first and often considered the most crucial trading signal Lane identified.

## Practical Example: Using the Stochastic Oscillator in Trading

The stochastic oscillator is included in most charting tools and can be easily employed in practice. The standard time period used is 14 days, though this can be adjusted to meet specific analytical needs. The stochastic oscillator is calculated by subtracting the low for the period from the current closing price, dividing by the total range for the period, and multiplying by 100.

For example, if the 14-day high is $150, the low is $125, and the current close is $145, the session's reading is 80, calculated as (145-125) / (150-125) × 100.

By comparing the current price to the range over time, the stochastic oscillator reflects the consistency with which the price closes near its recent high or low. A reading of 80 would indicate that the asset is on the verge of being overbought.

## Comparing RSI and Stochastic Oscillator: Key Differences

The [relative strength index (RSI)](https://www.investopedia.com/terms/r/rsi.asp) and the stochastic oscillator are both price momentum oscillators that are widely [used in technical analysis](https://www.investopedia.com/ask/answers/032015/how-do-i-use-stochastic-oscillator-create-forex-trading-strategy.asp). While often [used in tandem](https://www.investopedia.com/ask/answers/012815/what-are-best-technical-indicators-complement-stochastic-oscillator.asp), they each have different underlying theories and methods. The stochastic oscillator is predicated on the assumption that closing prices should move in the same direction as the current trend.

Meanwhile, the RSI tracks overbought and [oversold](https://www.investopedia.com/terms/o/oversold.asp) levels by measuring the velocity of price movements. In other words, the RSI was designed to measure the speed of price movements, while the stochastic oscillator formula [works best in consistent trading ranges](https://www.investopedia.com/ask/answers/06/daytradingstochastic.asp).

Generally, RSI works better in [trending markets](https://www.investopedia.com/terms/t/trending-market.asp), while stochastics are better for sideways or range-bound markets.

## Recognizing the Limitations of the Stochastic Oscillator

The primary limitation of the [stochastic oscillator](https://www.investopedia.com/terms/r/relative_vigor_index.asp) is that it has been known to produce [false signals](https://www.investopedia.com/terms/f/false-signal.asp). This is when a trading signal is generated by the indicator, yet the price does not actually follow through, which can end up as a losing trade. During volatile market conditions, this can happen quite regularly. One way to help with this is to take the price trend as a filter, where signals are only taken if they are in the same direction as the trend.

## How Do You Read the Stochastic Oscillator?

The stochastic oscillator represents recent prices on a scale of 0 to 100, with 0 representing the lower limits of the recent time period and 100 representing the upper limit. A stochastic indicator reading above 80 indicates that the asset is trading near the top of its range, and a reading below 20 shows that it is near the bottom of its range.

## What Does %K Represent on the Stochastic Oscillator?

On a stochastic oscillator chart, %K represents the current price of the security, represented as a percentage of the difference between its highest and lowest values over a certain time period. In other words, K represents the current price in relation to the asset's recent price range.

## What Does %D Represent on the Stochastic Oscillator?

On a stochastic oscillator chart, %D represents the 3-period average of %K. This line is used to show the longer-term trend for current prices, and is used to show the current price trend is continuing for a sustained period of time.

## The Bottom Line

A stochastic oscillator is a momentum indicator utilized by technical analysts to identify overbought and oversold signals. It compares a security's closing price with its price range over a specific period.

The stochastic oscillator is primarily used to predict potential market reversals, but it's important to understand its limitations, such as possible false signals during volatile markets.

The stochastic oscillator's sensitivity can be adjusted to meet specific analytical needs, by either modifying the observation period or calculating a moving average.

The stochastic oscillator should not be relied on exclusively to determine entry and exit points in trading, but in conjunction with several other tools.

George Lane developed the stochastic oscillator in the 1950s. The cumulative knowledge since emphasizes the indicator's ability to foreshadow reversals through the momentum or speed of price movements.

> **Article Sources**
>
> 1.  Fidelity. "[Slow Stochastic](https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/slow-stochastic)."
>     
> 2.  George Pruitt. "[The Ultimate Algorithmic Trading System Toolbox + Website: Using Today's Technology to Help You Become a Better Trader](https://onlinelibrary.wiley.com/doi/book/10.1002/9781119262992)." John Wiley & Sons, 2016.
>     
> 3.  CMC Markets. "[What Is the Stochastic Indicator?](https://www.cmcmarkets.com/en/trading-guides/what-is-a-stochastic-indicator)"