Skip to main content
All posts

What is the Stochastic Oscillator? Definition, Formula, and Example

The stochastic oscillator is a 0-to-100 momentum indicator that measures where the current close sits within a recent high-low range, with readings above 80 marking overbought and below 20 marking oversold conditions.

What is the Stochastic Oscillator?

The stochastic oscillator is a bounded (0-100) momentum indicator that measures where the current close sits within the recent high-low range. Developed by George Lane in the late 1950s, it is built on the observation that closing prices cluster near session highs during uptrends and near session lows during downtrends. Readings above 80 mark overbought conditions; readings below 20 mark oversold conditions. Unlike trend indicators, the stochastic does not measure direction—only the relative position of price within its own recent range.

How the Stochastic Oscillator is Calculated

The oscillator has two lines, %K (fast) and %D (slow):

%K = ((C − L₁₄) / (H₁₄ − L₁₄)) × 100

Where:

  • C = most recent close
  • L₁₄ = lowest low over the lookback period (default 14)
  • H₁₄ = highest high over the lookback period (default 14)

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

The "fast stochastic" plots raw %K and its 3-period SMA. The more common "slow stochastic" smooths %K with a 3-period SMA before applying another 3-period SMA for %D, reducing noise. The "full stochastic" allows custom smoothing periods on both lines and is the version most modern terminals expose by default.

Worked Example: SPY

Assume SPY over the last 14 sessions has a high of $510, a low of $485, and closes today at $505.

%K = (($505 − $485) / ($510 − $485)) × 100

%K = ($20 / $25) × 100

%K = 80

The reading of 80 places SPY at the upper boundary of its 14-day range, signaling an overbought condition. If %D was 75 yesterday and rose to 78 today, the %K-above-%D crossover in overbought territory is the classic exit signal for long positions. A bearish divergence example: SPY makes a new 14-day high at $512 next session while %K prints only 76—the lower stochastic high while price makes a higher high is the divergence trigger that precedes most short-term tops.

When Traders Use the Stochastic Oscillator

  • Mean-reversion entries — buying when %K crosses above %D below 20; selling when %K crosses below %D above 80.
  • Bullish/bearish divergence — price makes a new high while stochastic prints a lower high (or vice versa), flagging momentum exhaustion before price reverses.
  • Range-bound markets — works best when an instrument is oscillating within a defined channel rather than trending.
  • Confirmation layer — combined with RSI or MACD to filter weak crossovers.
  • Multi-timeframe alignment — daily stochastic for trend bias, 60-minute for entry timing.

Limitations and Common Misconceptions

  • Failure in trends — in a strong trend, the stochastic stays pinned above 80 (uptrend) or below 20 (downtrend) for weeks. Fading these readings is a recipe for losses.
  • Whipsaws — the fast version generates frequent crossovers that produce false signals in choppy tape.
  • "Overbought ≠ short signal" — a high reading means the close is near the recent range high, not that price is too high in any absolute sense.
  • Lookback sensitivity — shortening the period (e.g., 5) increases responsiveness but adds noise; lengthening (e.g., 21) smooths but lags reversals.
  • No price target — the indicator signals momentum state, not a measured move; profit targets must come from price-based methods.

Institutional-grade tools, browser-based.

Get every ticker in this post on a real terminal, scanner, charts, filings, insider trades, and 800K+ economic series in one tab. Free tier, no credit card.

Try Tapeboard free → 14-day Pro trial · no card