Saturday, March 03, 2007

Filter Questions

Bullish Jim asked some excellent questions regarding my filter process and I thought instead of answering in a comment I'd do a post.

CMA stands for "customized moving average" with this you can get a moving average of anything including a moving average or a moving average if you so desire. E.G. CMA(MA(10),10) returns the 10-period moving average of the 10-period moving average. Try it - I have some filters in my backlog pile waiting to be worked using such an approach.

You can also use CEMA for customized exponential moving average. But for averages of averages such as the ATR a simple moving average is better.

I test 4 months at a time but I'm a confirmed swing/day trader so 4 months is sufficient. I also move my test period around - if I want to see how a filter performs during a market down turn then I select a period with a turn down in it E.G. last October and pretty soon this week. I'm only interested in how my filters are working lately. Towards that end I move the period forward to the current time about every 2 to 3 weeks. I have a basic filter that I build all of my other filters from and I test that as a baseline - if you can't beat the plain vanilla filter you have no business being in the toolbox.

I set my stop loss at 8% and 0 out the stop profit. I changed the maximum hold time to 4 days. I have switched the default tracking periods to 1, 4, 10, 20 and 30 days (even if you are stopped out or profited out you still get up to the 30 days results on all tests that start at least 30 days before the end of the overall period). I take 1 trade a day and a maximum of 4 trades. All of these things can be reset on the stockfetcher back testing default screen.

I exit on the trigger statement "Close > close 1 day ago and close 1 day ago > close 2 days ago" . Sometimes I'll use RSI(2) > x, or MACD > x or a moving average crossover some other indicator just to see how that would affect a trader's results.

Trades are either ended on a trigger statement, a stop loss, or are timed out (4 days and out). I find that is sufficient to test for efficiency. Because I'm using high efficiency approaches (the ones I report at any rate) I seldom get stopped out and most often the trade is ended on a trigger statement.

For every filter I report on I probably have thrown out 5 others. And most of the filters I report on have been tested through 10 or 15 variations of the filter. Every once in awhile I get confused and have to throw out a complete set of results and start over again. One of the reasons why I'll report on simple filters is that I am constantly testing them. Once you start combining filters you should start from a combination of factors that you know and understand. For example the filter I did today with the ATR and RSI was a combination of the two best of the two filters that I had provided earlier. But, if you noticed, I have changed both the RSI target to 2 and the length of the CMA on the ATR to 10. This was done the old fashioned way - trial and error. In other words I might have gotten good results with 5 and 20 but then I started modifying it, first one then the other. I got excellent results with ATR < CMA(ATR(10),20) and ATR < CMA(ATR(10),5) - but ...

It has to be real - my rule is simple - if you, a reader of mine do not have filtering software I want you to be able to look at a screen containing a set of candlesticks, an ATR(10) and an RSI(2) and be able to estimate where everything is in relation to each other and proceed from there with confidence.

In other words the output of the filter isn't the important factor - it is the efficiency of the technical analysis tools that is important.

My second objective is to show people that sometimes it makes more sense to buy when the MACD goes down than when it is going up or other urban tale of trend followers everywhere.

2 comments:

L.J. said...

That's very helpful. Thanks for taking the time to walk through the details.

QUALITY STOCKS UNDER 5 DOLLARS said...

Some fine questions nice.