Stochastic Oscillator
The Stochastic Oscillator is a momentum indicator that compares an asset's most recent closing price to its trading range - the highest high and lowest low - over a set lookback period, typically 14 periods. It is plotted on a scale from 0 to 100, with readings above 80 generally considered overbought and readings below 20 generally considered oversold. It was developed by American technical analyst George Lane in the late 1950s.
The indicator is built from two lines: %K, the raw calculation, and %D, a moving average of %K used to smooth it out and generate crossover signals. The core formula for %K is: ((Current Close - Lowest Low) ÷ (Highest High - Lowest Low)) × 100. For example, if a stock has traded between $45 and $50 over the past 14 days and closes today at $49, %K = (($49 - $45) ÷ ($50 - $45)) × 100 = 80, a reading right at the threshold traders watch as overbought.
The underlying logic is that in a healthy uptrend, closing prices tend to cluster near the top of the recent range, and in a healthy downtrend, they tend to cluster near the bottom - so a reading that is unusually stretched toward one extreme suggests the move may be overextended and due for a pause or pullback. Traders commonly use it to time entries within a broader trend (buying oversold dips in an uptrend rather than fighting the trend at overbought levels), or to spot divergence, where price makes a new high but the Stochastic Oscillator fails to, hinting that upward momentum is fading.
It is worth noting that the Stochastic Oscillator is a specific technical indicator and should not be confused with the broader mathematical concept of a stochastic process, described separately in this glossary - they share a name rooted in the same idea of randomness and variability, but one is a chart tool and the other is a statistical modeling concept.
A note on the settings, which are more consequential than they look. The standard 14 periods with a 3-period smoothing on %D is a convention inherited from the era when these were computed by hand, not a result anyone derived, and shortening the lookback makes the line more sensitive and more frequently pinned at an extreme rather than more accurate. What is sold as a slow stochastic is simply a second round of smoothing, plotting the old %D as the new %K, which is why the same stock chart can carry two lines both labelled stochastic that cross at different moments and disagree about whether anything has happened.
The 80 and 20 lines are the most misused part of this indicator, and the reason is in its own logic. If closes cluster near the top of the range during a healthy uptrend, as the paragraph above says they do, then a strong trend will pin the reading above 80 and hold it there, sometimes for weeks. Selling every crossing of 80 in a trending market means selling into strength over and over. The reading tells you where the close sits inside the recent range; it says nothing about whether the range itself is about to move, which is the question a trader actually has.
Lane's own emphasis was on divergence rather than on the levels: the case where price makes a higher high and the oscillator does not. That is a statement about the relationship between two series, which a single threshold crossing is not. The workable rule that follows is to use the levels only in a market you have separately established as range-bound, using something like a trend-strength measure or the width of a channel, and to use divergence when it is trending. One further mechanical point: %D is a moving average of %K, so any crossover signal necessarily arrives after %K has already turned. The smoothing that makes the signal readable is the same smoothing that makes it late.