Strategies

How To Use the Stochastic Oscillator: 937 Signals, Tested

The stochastic oscillator asks one narrow question: where does today's close sit inside the recent trading range? Near the top, the reading is high. Near the bottom, it is low. Below 20 is conventionally "oversold", and generations of traders have been taught that oversold means a bounce is due.

It is a testable claim, and the indicator fires often enough to test it properly.

Across 22 US stocks and sector ETFs, over the window the free backtester covers, a stochastic (5, 3, 3) reading of oversold occurred 937 times. Buying that close and holding ten sessions, 55.9% of those trades finished green.

Why 55.9% is not a 55.9% edge

Half is not the bar, and this is the whole reason the number needs a page rather than a tweet. The window was mostly a bull market, so most ten-day holds finished green whatever day you picked. We measured the rate on the same names over the same dates:

Ten-day holds starting fromWindowsFinished green
any bar at all24,94855.4%
a stochastic oversold reading93755.9%

Half a percentage point apart, on 937 trades, which is statistically indistinguishable from nothing (p is about 0.76).

Be precise about what that does and does not establish, because "no difference found" is not the same as "no difference". The 95% interval on that half-point gap runs about plus or minus 3.2 points, so the oversold reading's true win rate could sit anywhere from roughly 52.7% to 59.1%. At 80% power this test could only have detected an edge of about 4.5 points or more. A genuine 3-point edge would be well worth having and this study would have missed it.

The sample is also smaller than 937 suggests. Those signals fall on only 435 distinct dates, with as many as 13 firing on the same day, because 22 names that include SPY and eleven sector ETFs go oversold together. Correlated signals count for less than independent ones, so the real interval is wider than the one above.

What the test supports, then, is the narrower claim: we could not detect an edge, and we would have seen a large one. The indicator is not wrong. It is not visibly adding anything either.

The crossover version did slightly worse

The other common way to trade it is the signal-line crossover: buy when %K crosses up through %D, rather than waiting for an oversold state. Same names, same window, same ten-day hold:

Stochastic (5, 3, 3) ruleSignalsWin rateTime in marketMedian return
is oversold93755.9%37.2%+4.3%
has crossed up1,67053.3%65.8%-3.9%
(buying on any day)24,94855.4%100%+57.3%

The crossover fires nearly twice as often, keeps you in the market two thirds of the time, and lands slightly below the base rate. More signals did not mean more information; it meant more trading.

The last row is the one worth sitting with. Simply holding the same 22 names returned a median 57.3% over the same period. The oversold rule returned 4.3% while being invested 37% of the time.

What the oscillator actually measures

02080100OverboughtOversold%K%D
The stochastic oscillator on a 0–100 scale. The fast %K line and its smoothing, %D, swing between an overbought band above 80 and an oversold band below 20. Schematic, the shape of the indicator, not real prices.

Two lines:

  • %K is the raw position of the close inside the high-low range of the last K bars, on a 0 to 100 scale.
  • %D is a moving average of %K, which is why it lags and why crossovers happen after the move.

The smooth parameter averages %K before %D is taken from it. A (5, 3, 3) is fast and noisy; a (14, 3, 3) is the textbook default and fires less often.

The single most common error is reading an extreme as an instruction. Overbought is not a sell signal. In a strong uptrend the stochastic pins near 100 and stays there for weeks, because the close keeps finishing near the top of its range, which is the definition of an uptrend. Selling every overbought reading in a rising market means selling every winner early. The same logic inverts in a downtrend: oversold can stay oversold the whole way down.

That is the mechanical reason our test came out flat. The indicator faithfully reports where price sits in its range. Where price sits in its range does not predict where it goes next.

Where it might still be useful

None of this is in the backtest, which takes every signal the detector finds. If the oscillator earns a place at all, it is as a secondary reading rather than a trigger:

  • As a filter, not an entry. Requiring "not overbought" before taking a signal you already like is a different job from buying oversold on its own.
  • Inside a range, not a trend. The premise (price reverts inside its recent range) is a range-trading premise. Check the market meter for whether that is the regime you are in.
  • With a longer lookback. (14, 3, 3) fires far less often than (5, 3, 3). Fewer, slower signals is the usual direction of improvement.
  • Against something that carries direction. Our test of the MACD and of single-candle patterns like the one white soldier came out much the same way, which is worth knowing before stacking two of them together and expecting the errors to cancel.

Test it yourself

The backtester carries the oscillator as a rule. In the free backtester, open Chart setup, add Stochastic, and set the state to is oversold. Pick a ticker, choose a hold period, and run it.

The experiment worth running is not "does it beat 50%". It is whether adding one condition on top moves the win rate away from the base rate for your window, or only cuts the number of trades. With 937 raw signals there is room to filter and still have a sample left.

Frequently asked questions

What is a good stochastic setting? There is no setting that made this work in our test. (5, 3, 3) is fast and gave 937 signals at the base rate; the textbook (14, 3, 3) fires less often and is the usual starting point. Treat the parameters as a trade-off between signal count and noise, not as a dial that produces an edge at the right number.

Does oversold mean I should buy? Not on this evidence. Buying 937 oversold readings and holding ten days won 55.9% of the time, against 55.4% for buying on a randomly chosen day in the same window. Whatever the reading is telling you about the next ten days is smaller than this test could resolve.

Is 55.9% not better than a coin flip? It beats a fair coin, and that is the wrong comparison. The market's coin was weighted during this period: 55.4% of all ten-day holds finished green. A win rate has to clear the base rate for its own window, and this one did not clear it by any amount we could measure. On 937 correlated signals that means an edge under about 4.5 points would have been invisible to us, so read this as "no edge found", not "no edge exists".

What is the difference between stochastic and RSI? Stochastic measures where the close sits inside the recent high-low range. RSI measures the ratio of average gains to average losses. They often agree, and in our testing neither separated the next ten days from chance.

Should I use the crossover or the oversold level? Neither did better in our test, and the crossover did marginally worse while keeping you invested nearly twice as long. If you want the shorter answer: the crossover is more trades for less information.

Before you trade this indicator

The figures here come from one run over 22 large-cap US stocks and sector ETFs, in a window that was mostly a bull market, with the oversold rule invested about 37% of the time. The names are correlated and the signals cluster on the same days, so the effective sample is smaller than the trade count implies. Win rates are measured before costs, which is why they are compared against a like-for-like base rate; the median return figures include commission and slippage. The script that produced them, including the --baseline flag behind the 55.4% figure, is in the repository (backend/scripts/research/candle_study.py) so the run can be repeated rather than trusted. The tool will show you today's numbers on any ticker you choose, and they will not match these exactly. Past prices are not a forecast, and nothing here is investment advice.

See which names it holds right nowWe rank the large-cap universe every night and publish the 15-year backtest behind it, alongside the book each setup currently holds: free, no signup.Open the momentum screener

Backtest figures in our articles are computed by our own engine over real price data: fees and slippage included, shown against buy-and-hold, and live embeds refresh as new data lands.

One useful email a weekWhat our backtests, screens and congress feed surfaced this week, no hype, one click to unsubscribe, nothing else sent.