Saturday, July 01, 2006

Filter Testing

The objective of filter testing is to discover technical analysis methods that will work in various kinds of markets. As you know the market goes up and the market goes down. It does this on any scale that you would care to use (minute, 5 minute, 60 minute, daily, weekly, monthly).

When I develop a filter I test it over various time periods. What I am looking for are periods when the market is going up and periods when it is going down in a recent time frame.

Consequently when I do a filter test (test a filtering method) I use 3 periods:

– The most recent 90-days terminating within the last 2 weeks,
– The most recent 45 days of the last 6 months when the bias of the market was up, and,
– The most recent 45 days of the last 6 months when the bias of the market was down.

By using three periods such as these I can see how well the filter works in various types of markets.

The second thing I do is to use a baseline filter. That is a filter I have been using for many years. The baseline gives me a sense for the periods being tested. Too many winners or losers suggest that the periods are too extreme for normal use.

You will notice that I don’t test against a hundred years of market data because that would be the most useless, time wasting testing that could ever be done. There are sites out there that will sell you their filter results based on such testing. If you feel comfortable using filters that were really, really good during 1995 – go for it.

The baseline filter is very simple. The closing price is between 10 and 20, the average volume over the last 90 days is 500000 shares/day, the closing price is at least 10% over the 200 day moving average and the 45-day linear regression slope is greater than 0.


DirectionStartEnd#tradesWin%ROI%SPX ROI %
Current3/2/0606/30/0614345629-4.19
Up3/9/065/12/0697663515.28
Down4/27/066/30/0651543-129-14.46


Right away you can see that there are a number of interesting components to such a test method. First the number of trades changes with the market conditions. Second the win percentage changes. But most incredible is the variance in the return on investment between when the market is going up and when the market is going down. Remember the screen didn’t change only the general market conditions changed. Also note that the test periods overlapped one another. When you are testing your own filters it makes sense to use an approach such as mine.

No comments: