momentum
Overbought / Oversold
Intermediate
Stoch

Stochastic Oscillator

Compares closing price to its price range over a period, measuring momentum with a 0–100 oscillator sensitive to recent extremes.

Overview

The Stochastic Oscillator was developed by George Lane in the late 1950s. It is based on the observation that in an uptrend, closing prices tend to cluster near the top of the period's range, and in a downtrend, near the bottom. The indicator consists of %K (fast stochastic) and %D (its signal line), both bounded between 0 and 100.

How it looks on a chart

Illustration only — synthetic data generated for visual reference.

Beginner

The Stochastic Oscillator asks a simple question: where did price close relative to its range over the past 14 days? A reading of 80 means price closed near the top of its 14-day range — bullish momentum. A reading of 20 means price closed near the bottom — bearish momentum. Like RSI, the stochastic has overbought and oversold zones. Above 80 is overbought; below 20 is oversold. But the key difference from RSI is that the stochastic is more sensitive to recent price extremes. It can signal reversals slightly earlier than RSI in some situations. The most common signal is when the two lines (%K and %D) cross each other while in the overbought or oversold zone. A bullish signal occurs when %K crosses above %D below 20. A bearish signal occurs when %K crosses below %D above 80. Waiting for the lines to leave the extreme zone before acting reduces false signals.

Intermediate

%K = 100 × (Close − Low₁₄) / (High₁₄ − Low₁₄). The %D is typically a 3-period SMA of %K (called "slow stochastic"). The "fast stochastic" uses %K directly without smoothing. A further smoothed version ("full stochastic") applies a second smoothing to %D. Parameters: typical settings are (14, 3, 3) meaning a 14-period %K, smoothed to 3 periods for the slow %K, with a 3-period SMA for %D. For faster signals, (5, 3, 3) is common on intraday charts. Wider oversold/overbought thresholds (15/85 or 10/90) reduce the number of signals but increase their reliability. Stochastic is particularly effective as a timing tool when combined with a trend filter. In an uptrend, only take oversold stochastic readings (below 20) as long signals — this gives the trend-continuation context. The stochastic "failure swing" — where %K fails to reach the extreme zone on a second attempt before reversing — is a reliable continuation signal.

Advanced

George Lane emphasized divergence as the primary use case for the stochastic. Bullish divergence occurs when price makes a lower low but the stochastic makes a higher low — indicating that despite new price lows, selling pressure is diminishing. Lane considered this more reliable than simple overbought/oversold signals. From a statistical perspective, stochastic readings are essentially a bounded rank within a rolling window. This makes them non-stationary in a peculiar way: the %K value depends on the position of the current close within the rolling high-low range, not just the level of prices. In fat-tailed distributions (common in financial markets), extreme readings cluster more than a normal distribution would predict, which inflates the apparent frequency of overbought/oversold conditions. In systematic strategy testing, the stochastic's sensitivity to the high-low range rather than close-to-close changes makes it complement RSI well — the two can diverge significantly during intraday volatile days where the close is far from the high/low midpoint. Combining both creates a more robust composite momentum score.

Formula

%K = 100 × (Close − Lowest Low₁₄) / (Highest High₁₄ − Lowest Low₁₄)
%D = SMA(%K, 3)
  1. 1.Find the lowest low and highest high over the last 14 periods.
  2. 2.Compute %K = 100 × (Close − Lowest Low) / (Highest High − Lowest Low).
  3. 3.Smooth %K with a 3-period SMA to get the "slow %K" (often displayed as %K on charts).
  4. 4.Compute %D = 3-period SMA of the slow %K (the signal line).
  5. 5.Plot both %K and %D; draw overbought (80) and oversold (20) horizontal lines.

Parameters

ParameterDefaultRangeDescription
K Period14350Lookback period for the high-low range and close position.
K Smoothing3110Smoothing applied to raw %K (1 = fast stochastic).
D Period3110Period for the %D signal line SMA.

Trading signals

bullish: %K crosses above %D below the 20 level

Oversold region crossover — potential short-term bounce or reversal.

bearish: %K crosses below %D above the 80 level

Overbought region crossover — potential short-term pullback or reversal.

bullish: Bullish divergence with both lines below 20

Strong oversold divergence — higher-conviction reversal signal.

bullish: Lines exit oversold zone (cross above 20) after dip

Confirmation of oversold bounce — entry after confirmation is safer.

Limitations

  • Highly sensitive in volatile markets — can oscillate between overbought and oversold rapidly.
  • In strong trends, overbought/oversold signals are frequently wrong (trend continuation rather than reversal).
  • The range calculation (high-low) is sensitive to individual price spikes or wicks.
  • Smoothing parameters add lag; less smoothing increases whipsaw, more smoothing delays signals.
How Gilito AI uses Stoch

Gilito tests stochastic oscillator configurations across its full parameter grid, comparing its performance to RSI and Williams %R on the same assets to identify which momentum oscillator has the highest predictive value per instrument. It specifically tests the stochastic as both a standalone reversal signal and as a trend-continuation entry timing tool.

Related indicators