How to Calculate Stock Stochastics and Make a Stochastic Oscillator
In stock trading, "stochastics" refers to oscillations in closing prices. A stochastic oscillator is a graph that charts these fluctuations over a range of several weeks or months.
Stock traders use stochastic analysis to decide when to buy and sell stocks. Their assumption is that when a stock's current closing price is near its past high or low, then the next day's price will not be drastically higher or lower, respectively.
Using the simple steps below, you can chart stock stochastics yourself using Excel or any other spreadsheet.
Instructions
-
-
1
First, understand the two line graphs that are charted on a stochastic oscillator. One line represents the change in closing price with respect to the high and low of the past N days. This is called "fast %K." The other line represents the average of the fast %K values over the past M days. This is called "fast %D."
Usually, stock traders who use stochastics take N=14 and M=3, but some take N=9 or 5.
-
2
Calculate the fast %K values for each day with this formula: Fast %K =
Today's CP - Low CP
----------------------------
High CP - Low CPToday's CP is the stock's closing price today, Low CP is the lowest closing price of the stock in the past 14 days (starting with today), and High CP is the highest price in the last 14 days.
-
-
3
For example, if the prices for the past 17 days are
2, 2, 4, 6, 3, 5, 5, 3, 4, 7, 3, 4, 3, 3, 6 (Mon), 7 (Tue), 4 (Wed),
then the fast %K values for those last 3 days are
Mon %K = [6-2]/[7-2] = .8 = 80%
Tue %K = [7-2]/[7-2] = 1 = 100%
Wed %K = [4-3]/[7-3] = .25 = 25%(These are not typical stock prices, but it is easier to illustrate the technique with simple integers.)
-
4
Next, calculate the fast %D values for each day by computing the average of the fast %K values for the past 3 days.
Using the example above, the %D value for Wednesday is the average of the %K values for Mon, Tue, and Wed. So,
Wed %D = [.8 + 1 + .25]/3 = .683 = 68.3%
-
5
To make the chart of stochastic oscillations, simply plot these numbers on a graph with horizontal and vertical axes. Place days on the horizontal axis, and place a scale of 0 to 1 (or 0% to 100%) on the vertical axis.
-
6
There two other line graphs you can plot on a stochastic oscillator. These are called the "slow %K" and "slow %D" values. Slow %K is actually equal to fast %D. And, slow %D is the average of the fast %D values for the past 3 days.
The only difference between the fast and slow versions of %K and %D is that the line graphs for the slow stochastics are smoother; they don't as many sharp peaks and valleys, which can be misleading. However, some interesting information is lost with the slow stochastics because they can be too smooth.
Because of these pros and cons, most stock traders make charts of both the fast and slow oscillators. Many stochastic oscillators have the fast %K and fast %D lines on one graph, and the slow %K and slow %D together on a graph below.
-
7
To learn how the graphs of stochastic oscillations help traders make decisions about buying and selling, read "How to Interpret Stochastic Oscillations," which is linked in the resources below.
-
1