Saturday, November 29, 2008

A "new" Muddy filter

Muddy mentioned back in comments about how white candle around the lower Bollinger Band with a tail as long as the body or bigger can kickstart a rally. I know he talks about white candles under LBB on his blog but I don't think this tail data has ever been coded. Anyway I just did. And the backtest is pretty ridiculous. 

show stocks where close is above open 

and price is between 1 and 20 

and average day range is above 3

and average volume(90) is above 700000

and set{bottail,open-low} 

and set{body,close-open}

and bottail > body

and price touched lower bollinger band(20)



Here are some of the backtest results











** UPDATE

I suppose this is a bullish hammer... however I think the combination of the LBB position makes it more powerful

8 comments:

Anonymous said...

Wow..great work on this..I've never actually studied this to the extent that you have with a scan or backtest..I only knew it could be pretty powerful at times...thanks for this..another toolbox saver

pavtrader said...

Wow indeed, nicely done JV

johnnyvento said...

Wow goes to Muddy's insight... I'm slowly learning to code by studying all of the complex codes we use

James Krieger said...

Wow, that is a cool one...gotta add that to my filter list

johnnyvento said...

every comment has Wow

Wow, anyone?

CABeachBum said...

WOW! That's a "wow" to both you and Muddy in all caps. Nice job!

mp said...

wow

DaveH said...

Nice idea JV and Muddy. To test Rick's point that the results may be skewed by the fact the market has been up strongly in the test period shown, I used StockFetcher's backtest to look at all cases where the filter returned results since 8/4/08. I made an Excel file of the results which you can download by going to http://drop.io/jv_muddy_candle_LBB# and clicking on the "download" at the bottom of the page.

The bottom line is that yes the results were much better on days when the market was up. On average the stocks chosen returned -0.45% if bought at the open on the day after the filter selected them and sold at the close on that day. But if one had some selection system that allowed buying only those stocks that were going to give positive results the average return for that day would have been +5.80%. And if you look at the gain results, the days when the Nasdaq was up generally gave the best results for the stocks from the system. Therefore, either a system of buying only those stocks that were green for the day, only buying stocks on days when the pre-market futures are up, or only buying stocks when the Nasdaq is up for the first 30 minutes may produce good results.

The column labeled "1 day change" is the results of buying the open next day after the selection and the column labeled "Gain/Loss" is the result of buying the open on that day and selling the open the next day. I also looked at the results of buying the open the day after the selection and holding for 2 or 3 days. Holding for 2 days gave an average return of 5.50% and holding for 3 days gave a return of 5.02%, so it seem on average one gets better return by selling at the end of the first day.