# Subject: Technical Analysis - Stochastics

Last-Revised: 9 Apr 2009
Contributed-By: (Original author unknown), Richard Hiatt, Chris Lott (contact me), Martin Clear

Stochastics attempt to indicate where the current price is as a percentage value in relation to the high and low extremes of price swings during a set time period. In this set time period the stochastics work on the assumption that an overbought condition exists when the indicator value is in the area above 50% and oversold when prices put the indicator value below 50%. Traders generally use thresholds of 70%--30% for better signals, and thresholds of 80%--20% or 90%--10% can also be used. The best way to find the appropriate cutoffs is to run the stochastics computation and see at what threshold the indicator produces the fewest false signals. Also it may be necessary to adjust the set time period and/or the sum of the days being used.

The basic calculation is this:

```     Sum of X # days of (Close - X # of days low)
------------------------------------------------
Sum of X # days of (X days high - X # days low)

```
For example, compute the sum of 3 days of the close minus the low of the last 10 days, and divide that by the sum of 3 days of the 10-day high minus the 10-day low. Let's say the 10-day high was 100 and the 10-day low was 80. Here's the computation:
Day 1 close = 95 minus 10 day low of 80 = 15.
Day 2 close = 90 minus 10 day low of 80 = 10
Day 3 close = 85 minus 10 day low of 80 = 5
The sum is 30. A three-day sum of the high (price of 100) minus the low (price of 80) is 60, and 30 divided by 60 is 50%.

So the price range over the last 3 days of trading has been at 50% of the range over the last 10 days. The trick is to find what sum of days and what range of highs/lows most accurately matches the highs and lows of the stock or futures being followed. Further, in markets that are in a up trend or down trend, the goal is to take only the buy or sell signals.

Here is a more sophisticated method for computing the stochastic indicator. The raw stochastic is computed as the position of today's close as a percentage of the range established by the highest high and the lowest low of the time period you use. The raw stochastic (%K) is then smoothed exponentially to yield the %D value. These calculations produce the original (or "fast") stochastics.

```%K = 100 [ ( C - L5 ) / ( H5 - L5 ) ]
```
where: C is the latest close, L5 is the lowest low for the last five days, and H5 is the highest high for the same five days
```%D = 100 x ( H3 / L3 )
```
where: H3 is the three day sum of ( C - L5 ) and L3 is the 3-day sum of ( H5 - L5 )

A closely related indicator is the Williams %R indicator. The Williams %R tracks stock price momentum in almost exactly the same way as the stochastic indicator. It is a value between -100 and 0 representing where the closing price of today is positioned in the full range of prices (lowest low to highest high) across the input time period. The value -100 indicates that the current close is also the lowest low in the period, and 0 indicates that the current close is also the highest high in the period. Thus the Williams %R value is always exactly 100 less than the Stochastic %K value.

The following links will take you to pages at Incredible Charts which explain further:

 Previous article is Technical Analysis: Relative Strength Indicator Next article is Trading: Basics Category is Technical Analysis Index of all articles