TRADING SYSTEMS



Chaos Theory, The Market, And You
Nearest Neighbor Prediction


by Hans Uhlig, Ph.D.

Forecast the direction of the market using this model based on chaos theory.

Although it made many traders happy, the stock market of the 1990s was in some ways quite boring. It was a one-way street leading up, and during that period, the buy-and-hold strategy worked unusually well. This historically abnormal market behavior led to a widespread overestimation of the buy-and-hold strategy and an underestimation of market timing.

Now, of course, the picture has changed drastically. Indices are no longer climbing to new highs; instead, they're testing their lows. In times like these, applying a buy-and-hold strategy may not be the ideal choice. As a result, we must look at other approaches to investing in the stock market.

One approach I use is a method borrowed from chaos research, called nearest neighbor prediction (NNP). I will show you how to use NNP to make one-week forecasts of the stock market direction, using the weekly closes of the Standard & Poor's 500 as my example. This method clearly outperformed buy-and-hold over the last five years, even when the buy-and-hold method was working well.

The beauty of NNP is that it requires only an ordinary spreadsheet program. The operating principle is easy to grasp, decisions are always explicable, and there is no lengthy training phase. The method is robust and even self-improving over time as more data becomes available.

SIMILARITIES AND DIFFERENCES

The method in which the overall available data is averaged to make estimates is known as global predictors, one example of which is the autoregressive integrated moving average (Arima)?. Technical analysts, however, make interpretations by determining if actual charts show patterns that resemble similar situations in the past. Predictions based on chart patterns are referred to as local predictors. The NNP falls under this category.

The NNP approach is systematic and follows these four steps:
1. Define a pattern.
2. Define how to quantify the similarity between any two patterns.
3. Sort patterns according to their similarity to a reference pattern, which in most cases will be the most recent market situation.
4. Analyze the most similar patterns to determine how the market developed in these cases.

But how do you define a pattern? And how do you know how much and what data to use to quantify suitable patterns? This is where nonlinear statistics and chaos theory come in.

MAKING SENSE OF CHAOS

Chaos theory suggests that from a time series of a single resultant, you can reconstruct the dynamics of a chaotic system with multiple components. Could this be applied to the market? Perhaps. Nobody would doubt that market movements sometimes appear random, but the inherent dynamics are probably not, as several studies have shown. This combination of random appearance and rational components means the market can be described as nonlinear, or chaotic.

In the case of the financial markets, price would be the component used to reconstruct the complete dynamics. This means that if the theory holds, I would need only price data to build my pattern predictions.
 

...Continued in the November 2001 issue of Technical Analysis of STOCKS & COMMODITIES.
 

Hans Uhlig is a private investor. He lives in Hamburg, Germany, and can be reached via his website, www.hans-uhlig.de, or by e-mail at HansUhlig@aol.com.


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



Return to November 2001 Contents