Pro Access

Stochastic Reversion is part of the expanded Pro strategy library. The guide stays public, but running it in backtest, compare, paper tracking, and source-code view is a Pro capability. Pro currently unlocks 8 additional pre-built strategies.

The Intuition

The stochastic oscillator measures where the close sits inside its recent trading range. A reading near 0 means price closed near the range low. A reading near 100 means it closed near the range high. Mean-reversion traders interpret those extremes as signs of short-term exhaustion.

The signal is not about valuation. It is about local positioning pressure. If the close repeatedly prints near the bottom of the recent range, the move may be stretched enough for a short rebound. If it repeatedly prints near the top, the opposite logic applies.

This is one of the classic short-horizon reversal tools because it is easy to interpret and naturally adapts to the recent high-low envelope. It is especially common in markets where prices oscillate inside broad ranges instead of trending persistently.

Its weakness is exactly that simplicity. In a true trend, "oversold" can stay oversold and "overbought" can stay overbought for far longer than the indicator implies. Traders usually pair it with regime filters or use it only on assets where pullbacks tend to snap back quickly.

The Math

Read this as a compact model summary: what the signal sees, what it ignores, and where fragility can creep in.

HighestHigh(t) = max(High[t-n : t])
LowestLow(t)   = min(Low[t-n : t])
%K(t)          = 100 × (Close(t) - LowestLow(t)) / (HighestHigh(t) - LowestLow(t))

Signal(t) = +1  if %K(t) < oversold
          = -1  if %K(t) > overbought
          =  0  otherwise

Parameters

ParameterTypeDefaultDescription
window int 14 Lookback window for the range
oversold float 20.0 Percent-K threshold for long entries
overbought float 80.0 Percent-K threshold for short entries

Source Code

Source access for this built-in strategy is included with Pro.

Further Reading

  • Lane, G. (1984). Lane's Stochastics. Market Technicians Association Journal.
  • Murphy, J. (1999). Technical Analysis of the Financial Markets. NYIF.
  • Connors, L. & Alvarez, C. (2009). Short Term Trading Strategies That Work. TradingMarkets Publishing.

When It Works / When It Fails

Works
  • Range-bound non-trending markets with predictable oscillation
  • Liquid instruments with tight bid-ask spreads
  • Short-term reversal setups with clear support and resistance
Fails
  • Strong directional trends where %K stays at extremes
  • Gap-prone instruments with binary event-driven risk
  • Without a trend filter in trending equity regimes

Regime Fit

Transition / Calm vol
Best conditions. Clean range oscillation with reliable overbought/oversold readings.
Transition / Normal vol
Workable. Slightly more noise but range-position logic remains valid.
Bull or Bear / Calm vol
Borderline. Slow trends can still generate partial reversal entries.
Any regime / Stressed vol
Avoid. Oscillator pins at extremes; reversal signals are consistently early.

Compared to Alternatives

vs Williams %R
Algebraically equivalent to %K with an inverted sign. Practical difference is threshold framing and whether %D smoothing is applied.
vs RSI
Stochastic uses range position within a lookback window; RSI uses cumulative gains/losses. Stochastic is faster-reacting; RSI is smoother across sessions.
vs Bollinger
Bollinger adapts bands to volatility as it changes; Stochastic uses a fixed lookback range. Bollinger is more stable when volatility regimes shift.
Unlock This Strategy →