StockFetcher Forums · Filter Exchange · Kevin's gapfilter revisited<< >>Post Follow-up
mahkoh
888 posts
msg #108153
Ignore mahkoh
modified
9/21/2012 6:17:36 PM

I've modified Kevin's weekly gap filter so that it looks for stocks with gapfill statistics on a daily timeframe.
It tells you statistics of gaps up and down greater than 0.7 % during the last 100 days.
Run the filter after market close and download csv (or have the results emailed to you). In the excel file delete columns 2 to 6.
Of the remaining 3 columns (symbol,low(or high) and % of gaps filled) copy those with gapfill% 0.70 and up and paste them on to the symbol column (C) of the gapup and gapdown google docs files below:

https://docs.google.com/spreadsheet/ccc?key=0AgVFJDk1gPekdE5qeE5NTFhnT2R3SHRvNE1CSkVjT0E
https://docs.google.com/spreadsheet/ccc?key=0AgVFJDk1gPekdENOUTJPLUZsYnJlYWdabExKRWZnZ0E

Column M shows the day's gap%. Once Google finance has received it's first data ( usually within a couple of minutes) sort by this column (Z to A for gapup, A to Z for gapdown)
Where column N is red the open is above yesterday's high ( or below yesterday's low), you may want to avoid those.
Where column B turns red the stock has broken out above yesterday's high (or below yesterday's low)
Column E gives the gapfill statistics and column O shows percent move from the open.

Average volume above 1 mln ensures that the spread will be reasonable pretty much right at the open.

The filters

Fetcher[


/*KEVIN'S TRADE THE OPEN GAP DOWN STRATEGY - LONG PLAY*/

/*FIRST, SET KEY VARIABLES*/
set{horizontal1, close 1 day ago}
set{horizontal, horizontal1*0.993}
set{trigger, close *0.993}


/*SECOND, DETERMINE IF A GAP DOWN OCCURS, AND IF IT WAS SUBSEQUENTLY FILLED*/
set{gapdown1, count(open below horizontal,1)}
set{gapdown2, count(open above low 1 day ago,1)}
set{gapdown, gapdown1 * gapdown2}
set{stats, count(high above horizontal1, 1)}
set{gapfill, gapdown * stats}

/*THIRD, COUNT THE FREQUENCY OF GAPS DOWN THAT WERE FILLED OVER THE LAST 80 WEEKS*/
set{gapdown80, count(gapdown above 0.5,100)}
set{gapfill80, count(gapfill above 0.5,100)}
set{pct_gapfill, gapfill80 / gapdown80}


/*NOW ADD COLUMNS WITH KEY DATA AND SORT THEM FROM HIGHEST PERCENT GAP FILLED TO LOWEST*/
add column gapdown80 {Gaps down}
add column gapfill80 {gaps filled}
add column low
add column pct_gapfill {% of gaps filled}



sort on column 8 descending

/*SET A MINIMUM FREQUENCY FOR GAPS DOWN*/
gapdown80 above 5

close above 10
average volume(30) above 1000000

draw gapdown
draw gapfill
]



Fetcher[



/*KEVIN'S TRADE THE OPEN GAP DOWN STRATEGY - LONG PLAY*/

/*FIRST, SET KEY VARIABLES*/
set{horizontal1, close 1 day ago}
set{horizontal, horizontal1*0.993}
set{trigger, close *0.993}


/*SECOND, DETERMINE IF A GAP DOWN OCCURS, AND IF IT WAS SUBSEQUENTLY FILLED*/
set{gapdown1, count(open below horizontal,1)}
set{gapdown2, count(open above low 1 day ago,1)}
set{gapdown, gapdown1 * gapdown2}
set{stats, count(high above horizontal1, 1)}
set{gapfill, gapdown * stats}

/*THIRD, COUNT THE FREQUENCY OF GAPS DOWN THAT WERE FILLED OVER THE LAST 80 WEEKS*/
set{gapdown100, count(gapdown above 0.5,100)}
set{gapfill100, count(gapfill above 0.5,100)}
set{pct_gapfill, gapfill100 / gapdown100}


/*NOW ADD COLUMNS WITH KEY DATA AND SORT THEM FROM HIGHEST PERCENT GAP FILLED TO LOWEST*/
add column gapdown100 {Gaps down}
add column gapfill100 {gaps filled}
add column low
add column pct_gapfill {% of gaps filled}



sort on column 8 descending

/*SET A MINIMUM FREQUENCY FOR GAPS DOWN*/
gapdown100 above 5

close above 10
average volume(30) above 1000000

draw gapdown
draw gapfill
]



klynn55
425 posts
msg #108154
Ignore klynn55
9/21/2012 11:09:44 PM

lots of thought and work, thank you !

Kevin_in_GA
4,537 posts
msg #108177
Ignore Kevin_in_GA
9/26/2012 9:54:04 AM

I think that you are looking at too small of a pullback to be profitable. I ran this set of conditions on SS back from 1/2/2007 until 9/14/2012 and found that the Monte Carlo Average Trade Return was -0.10%, the MC Av. Percent Profitable was 48%, and you lost about 10% a year. Most of the profitable trades occurred in 2008 during the severe market downturn, and since then the results have been poor.

I ran and optimization of these conditions and found the if you look for

1. open gaps that are down 3.5% from the previous day's open
2. had gappped down this much at least once over the last 200 days, and
3. had closed profitably by the end of the day of at least 65% of the time

you got about the same number of trades entered but with much better results (MC average annual return was an amazingly high 90.1%).

I also use the following code snippet to select for stocks with proper liqiuidity characteristics:

close above 10
count(close * volume above 1000000,10) above 9


I'll post comparative stats tonight.

mahkoh
888 posts
msg #108184
Ignore mahkoh
modified
9/26/2012 3:26:10 PM

Thanks for the feedback and looking forward to your results, Kevin.

There is however one thing: I do not use this filter to jump into the trades head first after market open. The filter combined with the docs files provide me with a number of opportunities that I may trade, with the chances of having a winner backed by the statistics.

If a stock gaps up and runs I will not short until I feel it is starting to roll over. If it does I may decide to close the trade if it retraces to the 20 ma on the 5 minute chart instead of waiting for it to fill the gap completely.

One thing puzzles me: The gapdown filter consistently gives fewer qualifying stocks than the gapup filter, about 3 gapuppers for every 2 gapdowners.

StockFetcher Forums · Filter Exchange · Kevin's gapfilter revisited<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2016 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus