TRADING TECHNIQUES


What If Linear Filters Won't Work For Your Tradable?
Nonlinear Ehlers Filters


by John F. Ehlers


Linear filters like moving averages are great for slow, "stationary" data. Unfortunately, prices aren't slow or stationary.


The most common filters that traders use are moving averages -- either simple moving averages (SMA) or exponential moving averages (EMA). These are linear filters. Linear filters are best for smoothing stationary, slowly varying signals that are corrupted with high-frequency noise. In this instance, "stationary" means that the rules that dictate the underlying process do not change and remain stable; the underlying process that generates prices doesn't change. Unfortunately, price data is not stationary most of the time.

FIGURE 1: RESPONSE TIME. A median filter does well in ranges but is slow to react to dramatic price changes.


An example of a statistically stationary process is the classic coin-flip experiment; the nature of the coin flip never changes. However, if weighted coins were randomly introduced into the experiment, the statistics of the experiment would then depend on which coin is used, and therefore the results would become nonstationary.

The signals you deal with every day often can be described statistically. For example, human speech has noise-like statistics. The speech process is nonstationary because it changes from moment to moment. Even though speech has noise-like characteristics, it obviously carries information.

Price data resembles speech in statistical characteristics; it is both noise-like and nonstationary. One of the main problems you encounter in trading when using technical analysis is that you must attempt to restore signals that often are nonstationary and also corrupted by noise. When dealing with nonstationary signals with sharp transitions or when dealing with impulsive noise, linear filtering techniques give poor results.

NONLINEAR FILTERS

The filters I have devised are nonlinear finite impulse response (FIR) filters. (See sidebar "Two types of filters.") These filters provide extraordinary smoothing in sideways markets and aggressively follow major price movements with minimal lag.

The development of my filters started with a general class of FIR filters called order statistic (OS) filters. In contrast to linear filters, where sensitivity to time is necessary, OS filters are based on the ranking of the samples within the filter window. The OS filter ranking is based on summary statistics, such as mean or variance, rather than by position in time.   ...Continued in the April 2001 issue of Technical Analysis of STOCKS & COMMODITIES


John Ehlers is president of MESA Software and a frequent contributor to STOCKS & COMMODITIES. This article was adapted from Rocket Science For Traders, published by John Wiley & Sons in 2001. He may be reached via his website at www.mesasoftware.com.

Excerpted from an article originally published in the April 2001 issue of Technical Analysis of STOCKS & COMMODITIES magazine. All rights reserved. © Copyright 2001, Technical Analysis, Inc.



Return to April 2001 Contents