## Technical Analysis: Stochastic Oscillator

Category : Uncategorized

# Technical Analysis: Stochastic Oscillator

Please make sure you have the most updated mfd_dm, mfd_ta and mfd_tex packages for Stata installed for this post.

1 2 3 4 5 6 |
* net from "http://www.researchforprofit.com/stata/mfd_dm" net from "http://www.researchforprofit.com/stata/mfd_ta" net from "http://www.researchforprofit.com/stata/mfd_tex" * click on the blue mfd_dm package and then "click here to install" * |

Stochastic Oscillator is another technical analysis tool that is based on momentum of the stock price.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
* clear all cd "/Users/mfd/Desktop" local symbol="AAPL" mfd_dm_prices `symbol', freq(d) start(01jan2000) end(31dec2013) field(o c h l) label variable close_`symbol' "`symbol' daily close" gen day=_n tsset day mfd_ta_stoch close_`symbol' twoway (line fast_K date) (line fast_D date) * in the backtest, variable name is not important. It actually uses it for the symbol. * backtest has to be run after the actual stochastic calculation mfd_ta_stoch close_`symbol', backtest("20-80-slow_K") * |

The chart for the fast stochastic is as follows:

Meaning:

- Below 20: price is near its period low
- Above 80: price is near its period high

Fast of slow stochastic:

- Fast: K is actual stochastic figure, D is 3 days SMA of fast K
- Slow: K is 3 days SMA of task K, D is 3 days SMA of slow K

Divergence:

- Bullish: Price goes lower low, stochastic goes higher low. Bearish momentum is decreasing, bullish reversal is possible.
- Bearish: Price goes higher high, stochastic goes lower high. Bullish momentum is decreasing, bearish reversal is possible.

Set-up:

- Bullish: Price goes lower high, stochastic goes higher high. Bullish momentum is increasing.
- Bearish: Price goes higher low, stochastic goes lower low. Bearish momentum is increasing.