Home / Indicators / Stochastic Oscillator
Indicator family

Stochastic Oscillator: what it is, and whether it works

The stochastic oscillator asks where today's close sits inside the high-low range of the last N bars, expressed as 0-100 — 100 means it closed at the top of the range, 0 at the bottom. Below: every variant we backtested, and how often each one actually beat buying and holding the same asset.

Tested and published by IndicatorEdge · backtest grid generated 2026-06-25 · base rates recomputed 2026-07-31 · how we test

10
variants of Stochastic Oscillator backtested
21.4%
of 17,971 tests beat buy-and-hold
3,852 beat it, 14,119 did not
25.2%
best variant: Stochastic
425 of 1,687 — its own page has the detail
Base rate

How often Stochastic Oscillator beat buy-and-hold

3,852 of 17,971 out-of-sample tests beat simply buying and holding the same asset — 21.4%. On the other 14,119 it did not. That is above the 20.1% rate across all 382 indicators we test (one pooled rate over all 660,005 tests we have run, not a mean of the per-indicator rates).

One test is one variant on one asset on one timeframe. We tested 10 variants of Stochastic Oscillator, so an asset that carries several of them contributes several tests — this is the family's record across everything we ran, not a count of assets. Those variants are not alike: individually they beat buy-and-hold between 20.1% and 25.2% of the time, and 21.4% is the pooled rate over all of them, not a property every version of this indicator has. The table below gives each one separately. "Beat" means a higher return than holding that same asset over that same window. Measured out-of-sample, on data the setup was not chosen on.

What it looks like

Stochastic Oscillator on a real chart

Stochastic oscillator on SPY14-period %K, conventional 80/20 levels · SPY daily, 180 bars to 2026-08-06 · conventional settings, not our tested onesprice2080%K(14)14-period %K, conventional 80/20 levels · SPY daily, 180 bars to 2026-08-06 · conventional settings, not our tested ones
Every variant we tested

Stochastic Oscillator variants, ranked by how often they beat buy-and-hold

VariantBeat / tested Beat rateAvg Sharpe
Stochastic425 / 1,68725.2%0.27
Stochastic Momentum Index389 / 1,66723.3%0.22
Stochastic RSI404 / 1,78322.7%0.23
Ehlers Stochastic369 / 1,76620.9%0.33
Stochastic (20,5)386 / 1,84920.9%0.17
Premier Stochastic376 / 1,81320.7%0.27
Stoch RSI (fast)383 / 1,85320.7%0.12
Stochastic Slow (21,5)375 / 1,84720.3%0.17
Stochastic (10,3)373 / 1,85220.1%0.1
Stochastic Fast (5,3)372 / 1,85420.1%0.11
The mechanism

What Stochastic Oscillator is — and how it's built

%K is the close minus the lowest low over the lookback, divided by the highest high minus the lowest low over that same lookback, times 100. The lookback is conventionally 14. %D is a short moving average of %K, conventionally three periods, drawn on top as a signal line. Because the denominator is the range itself, the reading is bounded at 0 and 100 by construction.

How it's read. Levels of 80 and 20 are the conventional overbought and oversold thresholds, and the %K crossing %D is read as a signal in the direction of the cross. As with RSI, divergence against price is a second conventional reading.

Where it struggles by design. In a strong trend the close sits near one end of the range bar after bar, so the oscillator pins at an extreme and stays there — the condition it is designed to flag becomes permanent and stops being informative. A narrow recent range also makes the denominator small, so ordinary moves produce violent swings in the reading.

Origin: Developed by George Lane in the 1950s.

Free · no spam

Get the weekly edge report

The best-performing indicator per asset, what changed this week, and the honest caveats — straight to your inbox.