Learn the stock market › Indicators › Lesson 4 of 7
What is the stochastic oscillator?
Walmart, the last year
Price
Stochastic for Walmart
%K%D8020
How it is worked out
Take the highest and lowest prices of the last 14 days, and see how far up that range the close sits. That number is called %K. An average of the last three %K readings is called %D, the second line.
Lowest price in 14 days: 116.63
Close on Nov 6, 2026: 125.52
%K = (125.52 − 116.63) / (131.82 − 116.63) = 58.5
%D was 73. George Lane developed the measure in the late 1950s. This is the fast version. Many charting tools show a slower one, where %K is smoothed first, so their numbers can differ a little.
How it differs from RSI
RSI compares how much a stock has risen with how much it has fallen. The stochastic oscillator only asks where today's close sits in the range. That makes it jumpier and more often extreme: among the 20 largest US companies since 2010, %K was over 80 on 31.3% of days and under 20 on 16.4%.
On only 28% of the days with %K over 80 was RSI over 70 as well. So the two often call different days overbought. For Walmart on the latest day, %K was 59 and RSI 64.
A strong stock can stay there for a long time. Broadcom stayed over 80 for 30 trading days in a row, from Apr 24, 2025 to Jun 5, 2025, and rose 38% in that time.
What happened after the extremes?
This is the same test as in the lesson on RSI: the day %K went under 20 or over 80, at most once a month per company, against the same company's ordinary day. Highs and lows count from 2010 here.
| After three months | %K under 20 | %K over 80 | Ordinary day |
|---|---|---|---|
| Times | 1,929 | 2,411 | – |
| Had risen | 68.9% | 67.2% | 67.6% |
| On average | +7.5% | +6.5% | +7.1% |
Under 20, the stock had risen in 68.9% of cases after three months, and over 80 in 67.2%, against 67.6% on an ordinary day. The differences in average rise can't be told apart from chance, after one, three or twelve months.
These are today's largest companies, so they recovered from every fall. That flatters the days under 20.
What the number says, and what it doesn't
The number describes where the price closed over the last 14 days, nothing more. It says nothing about the cause or the company. What happens when two such measures don't agree is in the lesson on when indicators disagree.
Test yourself
%K is 90. What do you know for certain?
More numbers are on the Walmart stock page.
Sources
- StockCharts ChartSchool, Stochastic Oscillator: who developed it, the calculation and its versions, read on 5 November 2026.