Stocks & Commodities V. 23:3 (28-29): What’s The Difference by John F. Ehlers

Stocks & Commodities V. 23:3 (28-29): What’s The Difference by John F. Ehlers
Item# \V23\C03\055EHL.pdf
Availability: In Stock

Product Description

Stocks & Commodities V. 23:3 (28-29): What’s The Difference by John F. Ehlers

What’s the difference between the median and the average? It’s what drives this new adaptive smoothing filter.

Remember back in school when your teacher asked you what the difference was between the median and the average? I remember thinking, “Yeah, what is the difference?” as in, “Who cares?” As it turns out, you should care. It is exactly that difference that drives a unique new adaptive smoothing filter that I’m going to tell you about.

Average and median filters eliminate extraneous data in fundamentally different ways. An average folds “noise” in with the signal so that if enough points are selected, the noise is reduced by summing to its own (nearly) zero average value. On the other hand, a median filter eliminates noise by ignoring it. A big spike in the data has no impact at all on the median signal value. Median filters are used in video to eliminate impulsive, or “salt and pepper” noise on the picture. We will exploit these characteristics to create an adaptive smoothing filter.


Consider a dataset that consists of 10 ones. Both the average and the median of this dataset is 1. Next, let’s move that dataset forward as we would with a moving average, dropping the last old data sample and adding a new one. Assuming the value of the new data sample is 10, then the new average will be 1.9 (nine ones and one 10, divided by 10). On the other hand, the median of the new dataset still remains unchanged at 1. A median filter ranks all the samples within the filter and selects the middle one as the filter output. So there is a difference between median and averaging filters. That percentage difference becomes less as the respective filter lengths are made shorter.

*Note: $2.95-$5.95 Articles are in PDF format only. No hard copy of the article(s) will be delivered. During checkout, click the "Download Now" button to immediately receive your article(s) purchase. STOCKS & COMMODITIES magazine is delivered via mail. After paying for your subscription at users can view the S&C Digital Edition in the subscriber's section on

Take Control of Your Trading.
Professional Traders' Starter Kit
All these items shown below only $299.99!
  • 5-year subscription to Technical Analysis of STOCKS & COMMODITIES, The Traders' magazine. (Shipping outside the US is extra. Washington state addresses require sales tax based on your locale.)
  • 5 year access to S&C Archive
  • 5 year access to S&C Digital Edition
  • 5-year subscription to Advantage.
  • 5-year subscription to Working Money.
  • Free book selection.
  • Click Here to Order