Stochastic Oscillator: what it is, How does it work and How to use it?

The adjoining image shows the mindmap of the post, that is, the things you will learn in this article. First, you will be introduced to the Stochastic oscillator, followed by the principle behind this indicator. Later on, you will delve into concepts of %K and %D and Slow and Fast stochastics. This would be followed by the interpretation and practical uses of this indicator. So, let's get started.

A Technical Analyst, Trader, and Educator named George Lane developed Stochastic Oscillator in the 1950s. This indicator also called Lane's Stochastic, since then, has become incredibly popular among traders and analysts and forms one of the core indicators in several trading strategies. For me, it is one of the indicators that I use in my swing trading strategies. Let's get into the details of this indicator in the paragraphs that follow.

What is a Stochastic Oscillator?

A Stochastic Oscillator is a momentum indicator that shows the momentum with which the prices are moving. This oscillator oscillates between 0 and 100 and thus also shows the overbought and oversold regions of a stock.

Let us suppose that the candlestick shown alongside is a day's candle of a hypothetical stock XYZ. The difference between the highest and lowest point on this candle is range as shown in the image. Notice that the stock has closed near the high of the candle. So, we can say that the day was an uptrending day as the price closed near a high and on the upper side of the range. In an uptrend the stock price tends to close near high while in a downtrend the price tends to close near low. This forms the principle behind the Stochastic oscillator. A stochastic oscillator depicts the close of a stock in relation to the range for a particular period.


The principle behind Stochastic Oscillator -

In the above example, we discussed just one candlestick depicting the price action of a single day. Now let us extend this logic to a longer period say 14 days. The difference between the highest price in the 14 days and the lowest price in the 14 days will be the range of this period. Now if the closing price is near the high of 14 days period, that is, on the upper side of the range, we say that the stock is in an uptrend, since in an uptrend the closing price tends to be near the high.
This fundamental observation forms the principle behind the stochastic oscillator.
The Stochastic oscillator compares the closing of a stock or security to the range of price movements over a period.

Now that you have a basic idea about the stochastics let's move further to the calculation part.
A stochastic has two lines which are depicted as %K and %D.

             %K = 100* (CLOSE - 14 DAY LOW) / (14 DAY HIGH - 14 DAY LOW)

Once you have arrived at the value of %K, %D can be calculated as 3 period moving average of %K.

Fast Stochastic and Slow Stochastic-
The calculation that we learned above is of Fast Stochastic. However, some traders felt that the fast stochastic was exceedingly responsive to price movements and gave many signals that resulted in many whipsaws. To counter this drawback the idea of slow stochastic was conceptualized. In the slow stochastic % K line was smoothed through the 3-period moving average and then it was further smoothed through 3-period  MA to arrive at the %D value.
So, in a slow stochastic-
%K (Slow Stochastic) = 3 period MA of %K of fast stochastic
%D (Slow Stochastic) = 3 period MA of %K (Slow Stochastic)

Interpretation of Stochastic Oscillator

As stated earlier, stochastic has two lines called % K and % D lines. Also, a stochastic chart has two marked levels at 20 and 80. See it in the chart below-
Chart showing interpretation of Stochastic. (Click to enlarge)


As you can see in the chart of NIFTY above a stochastic has two lines. The %K line is shown in green and the %D line is shown in red. 

%K line crossing above the %D line is considered a buy signal while %K line going below the %D line is seen as a sell signal. However, like all other indicators stochastics should not be used in isolation for trading, and other factors like trend direction and other indicators should be used in conjunction to make better trading decisions.

Apart from giving buy and sell signals stochastics also show the overbought and oversold levels of a stock as shown in the chart above. Stochastic levels above 80 are suggestive of a stock being overbought and levels below 20 indicate a stock is oversold.

 Bear in mind though overbought is not a bearish signal as stochastic can remain above 80 for a long period, especially in strong trends. Conversely, an oversold level on stochastic is not a bullish signal as in a strong downtrend the stochastic can remain below 20 for an extended period.

Practical uses of Stochastic Indicator-

Now that we have learned the interpretation of stochastic charts, let's move on to practical uses of stochastic. As discussed earlier, a buy signal is generated when the %K line moves above the %D line but taking all such signals will lead to many losing trades as it gives many false signals.

One of the ways to screen out such false signals is by pairing it with trend direction.

In this method, we first ascertain the trend direction and then take only those signals that are in the trend's direction. I use a combination of two SMAs—a 21-period SMA and a 50-period SMA—to ascertain the trend direction. A 21-period SMA above the 50 EMA tells us that the stock is in an uptrend. Then for an uptrending stock, we go for a buy when the %K line crosses above the %D line near the oversold level. In a stock in an uptrend, we ignore all sell signals. Let's understand this through the chart below.



In this daily chart of ICICI, the stock is in an uptrend, as the 21-period SMA (shown in green in the price chart) is above the 50-period SMA (shown in red). Now as shown in the chart above we would take only buy signals and ignore all sell signals. We would go for a buy when the %K line crosses above the %D line near the oversold region. Notice in the chart above that stochastic gives many valid buy signals as marked by arrows.

Another practical use of stochastic is by spotting Divergences. A divergence is said to happen when the price makes a lower low but stochastic makes a higher low and vice versa. A divergence between price and Stochastic tells that the prevailing trend is losing momentum and a reversal might be on the cards.
Once you have spotted a divergence you enter a trade once the %K line crosses above the 50 mark. Let's understand this through a chart.


The chart above is a daily chart of INFY. Notice on the left-hand side of the chart that the price of the stock is going down. Between March and April 2023 the stock makes a lower low but stochastic makes a higher low in the same period suggesting a positive divergence.
The entry point has been marked at the point where %K crosses above 50. Observe that the stock price goes up subsequently.

George Lane, who developed the Stochastic Oscillator, described another kind of divergence which he described as 'set-ups'. A set-up is the opposite of divergence. In a bullish set-up, the price makes a lower high but the stochastic oscillator makes a higher high. A higher high in stochastic suggests a strengthening momentum. Once a set-up is spotted you can go long once the %K line crosses above the %D line near the oversold region.
Let's understand this through a chart.


The above chart is a daily chart of COALINDIA. Notice that between Nov. and Dec. 2022, the stock makes a lower high as shown through a trendline, and during the same period stochastic makes a higher high. Once this setup has been spotted, notice that buy entry is taken once the %K line crosses above the %D line near the oversold zone. Further, observe that the stock price starts to climb up afterward.

The Bottom Line-
The Stochastic is a momentum oscillator whose value oscillates between 0 and 100.
A level above 80 suggests a stock is overbought and a level below 20 suggests the security is oversold.
A stochastic has two lines called %K and %D lines.
The Crossover of the %K line above and below the %D line gives buy and sell signals respectively.
By aligning the buy and sell signals with the existing trend better trading decisions can be made.
Stochastic can also predict shifts in momentum through divergences and set-ups.


Post a Comment

Previous Post Next Post