Featured Archive

A COMPREHENSIVE OVERVIEW OF POPULAR TECHNICAL INDICATORS II. STOCHASTIC OSCILLATOR, PART 1

Hello again. If you have been following this series, you may have noticed that I haven’t yet comprehensively covered Bollinger Bands. We’ll be revisiting them in the future. For now, let’s turn our attention to one of my favorite technical indicators, the popular (but poorly-named) stochastic oscillator.

A stochastic oscillator takes three parameters and produces two outputs, known as %K and %D. The parameters are:

  1. A span parameter, which specifies how many bars the oscillator will cover. The most popular configuration is 14 days.
  2. A Ksmooth parameter, which specifies how many bars should be used for smoothing the %K oscillator. The most popular value is 3, but often people will use Ksmooth=1. This is known as the fast stochastic oscillator
  3. A Dsmooth parameter, which specifies how many bars should be used for smoothing the %D oscillator. The most popular value is 3. Occasionally people will use a shorthand specification where it is assumed that Ksmooth=Dsmooth. This is known as the slow stochastic oscillator

Calculation of the unsmoothed %K parameter is as follows: Look back of the last span bars and find the lowest and highest prices. Use the formula \%K_{u_t} = \frac{current price - lowest price}{highest price - lowest price}. To calculate the smoothed version, calculate the simple average of the unsmoothed %K parameter over Ksmooth days, i.e. \%K_{s_t} = \frac{\sum_{i=1}^{Ksmooth}{K_{u_{t-i+1}}}}{Ksmooth}. Calculation of %D is similar, but rather than smoothing the unsmoothed %K parameter over Ksmooth bars, we instead smooth the smoothed %K parameter over Dsmooth bars: \%D_t = \frac{\sum_{i=1}^{Dsmooth}{K_{s_{t-i+1}}}}{Dsmooth}

The stochastic oscillator is thought to signal noteworthy events when the %K line crosses the %D line. It is thought that where the crossover occurs is also of some importance; if a crossover occurs above 0.8, it is thought to have a different meaning than a crossover that occurs below 0.2.

Calculating stochastic oscillators on all major-exchange U.S. stocks at all timepoints in the Yahoo! Finance database that I have been using for test purposes (eliminating any stocks that have ever traded below $1.00) and then calculating the geometric averages of the five-day returns of stocks meeting various criteria leads to the following table:

14, 3, 3 Full Stochastic Oscillator Test Results, 5-day Close-to-Close, Geometric Averages
%K Crosses Above %D %K Crosses Below %D
Above 0.8 (0.043%) (0.071%)
Below 0.2 0.272% 0.387%
Geometric Average 5-day Return, Close-to-Close: 0.087%

From this table we can see that choosing a random non-penny U.S. stock and holding it for five days is not a very good strategy. But choosing a non-penny U.S. stock at close when its %K crosses below its %D below 0.2 and then selling it at close five days later has shown in the test data (which is, admittedly, somewhat incomplete) returns averaging about 20% per year (minus commissions). While it is impossible to say with certainty how well such a strategy would perform in the real world, clearly, there is more to the stochastic oscillator than random chance.

Share on TwitterShare via email

What Economists Do Economists Favor?

I found this great article originally via Greg Mankiw’s blog.

Davis May 2011

Share on TwitterShare via email

Historical Options Prices Providers

Recently I’ve been looking for a source of historical options pricing data. While the most recent option price listings are available for free from numerous sources such as Yahoo!, finding an inexpensive, detailed record of historical options prices is not easy.

A selection of pay ones is easily found:

Most of the pay sites also offer free samples of historical data. CSI offers free samples of the S&P 500 option pricings over late 2002-early 2003. CRB offers free samples of the S&P 500 option pricings in early 2002.

CBOE offers some summary datasets for free download. Some datasets of note are the CBOE Put/Call Ratios and the CBOE Equity Option Volume Archive. CBOE also offers historical stock volatility data as a convenience for those who prefer not to calculate historical volatility directly.

CrimsonMind offers daily historical options data from 2005 on with a free registration, but they do not facilitate easy downloading.

The Options Price Reporting Authority, which is the source for option data in the United States, offers a variety of services and licenses, including a vendor license with redistribution rights and free historical data. Individuals seeking access are directed to first confer with the pre-existing vendors.

Share on TwitterShare via email
Partly powered by CleverPlugins.com