StockFetcher Forums · Filter Exchange · KEVIN'S "MONDAY MORNING FILL THE GAP" FILTER<< 1 2 3 4 5 ... 6 >>Post Follow-up
Kevin_in_GA
4,599 posts
msg #104247
Ignore Kevin_in_GA
1/6/2012 12:53:35 PM

I've been kicking around several ideas based on others' work here on trading opening gaps. Most people have looked at TRO's work in this area (Milk the Cows, his Fade the Gap statistics filters, etc). If you have not looked at these, you really should.

My preference is to "set it and forget it" since I cannot daytrade - so it made sense for me to look at weekends (the close on Friday to the open on the following Monday). Many stocks will gap up or down only to return back to the previous week's close, albeit temporarily.

So what does the filter below do? It shows you the statistics for the number of times a particular stock has gapped down at the open on Monday from the previous week's close, and also the frequency of which it then went to fill that gap over the next few days.

Look for stocks that frequently gap down and then fill that gap. At the open on Monday you'll see what stocks have gapped down, how frequently that has occurred over the last 100 weeks, and the percentage of times that gap was filled. It also calculates your predicted gain - easy to do since it is just the difference between the open and last week's close.

I have set the absolute numbers of gaps to be at least 30 over the last 100 weeks. I personally would only look seriously at stocks that have filled those gaps at least 85% of the time.

REMEMBER: This filter is only run on Monday at the open. You set a stop limit at the previous week's close and then ignore these until Friday. If they have not closed by then, make sure to close them out before the end of the trading week.

And before a half dozen people post "How do I backtest this?", StockFetcher does not let you set this up and backtest it because it must be run only on a specific day of the week.

Also note that I have not backtested this, but plan to try and write this code into StrataSearch and get some backtest results over the weekend. No promises that this can or will be done.


Fetcher[

/*KEVIN'S "TRADE THE WEEKLY OPEN GAP DOWN" STRATEGY*/

/*FIRST, SET KEY VARIABLES - LAST WEEK'S CLOSE AND THIS WEEK'S OPEN*/
set{horizontal1, weekly close 1 week ago}
set{open1, weekly open}

/*SECOND, DETERMINE IF A GAP DOWN OCCURS, AND IF IT WAS THEN FILLED*/
set{gapdown, count(open1 below horizontal1,1)}
set{stats, count(weekly high above horizontal1, 1)}
set{gapfill, gapdown * stats}

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

/*FINALLY, DETERMINE THE POTENTIAL GAIN FROM THIS WEEK'S GAP DOWN*/
set{gapsize, horizontal1 - open1}
set{gain2, gapsize / open1}
set{gain, gain2 * 100}

/*NOW ADD COLUMNS WITH KEY DATA AND SORT THEM FROM HIGHEST PERCENT GAP FILLED TO LOWEST*/
add column pct_gapfill {percent gap filled}
add column gapdown100
add column gapfill100
add column horizontal1 {last week's close}
add column open1 {weekly open}
add column gain {gain(%)}
add column ATR(50)
sort on column 5 descending

/*SET SCREENING CRITERIA FOR USE AT MONDAY'S OPEN. SINCE BIG GAPS DOWN ARE LESS LIKELY
TO BE FILLED, SCREEN OUT ANY GAPS DOWN THAT OPEN BELOW LAST WEEK'S LOW*/
weekly open below weekly close 1 week ago
weekly open above weekly low 1 week ago

/*ADDED CHECK - THE GAP TO BE FILLED SHOULD BE LESS THAN THE ATR(50). THIS WILL ALSO HELP TO SCREEN OUT BIG GAPS DOWN THAT ARE UNLIKELY TO BE FILLED THIS WEEK*/
gapsize below ATR(50)

/*SET A MINIMUM FREQUENCY FOR GAPS DOWN - THE HIGHER THIS IS, THE STRONGER THE STATISTICAL RELEVANCE - I CHOSE 30 HERE BUT YOU CAN SET IT TO ANYTHING YOU WANT (HIGHER WILL GIVE FEWER
HITS). I ALSO WANT THE RETURN TO BE AT LEAST 2%*/
gapdown100 above 30
gain above 2

/*STANDARD LIQUIDITY REQUIREMENTS*/
close above 1
average volume(30) above 100000

chart-display is weekly
draw gapfill
draw gapdown

]



And here's the short trade equivalent:

Fetcher[

/*KEVIN'S TRADE THE WEEKLY OPEN GAP UP STRATEGY*/

/*FIRST, SET KEY VARIABLES - LAST WEEK'S CLOSE AND THIS WEEK'S OPEN*/
set{horizontal1, weekly close 1 week ago}
set{open1, weekly open}

/*SECOND, DETERMINE IF A GAP UP OCCURS, AND IF IT WAS THEN FILLED*/
set{gapup, count(open1 above horizontal1,1)}
set{stats, count(weekly low below horizontal1, 1)}
set{gapfill, gapup * stats}

/*THIRD, COUNT THE FREQUENCY OF GAPS UP THAT WERE FILLED OVER THE LAST 100 WEEKS*/
set{gapup100, count(gapup above 0.5,100)}
set{gapfill100, count(gapfill above 0.5,100)}
set{pct_gapfill, gapfill100 / gapup100}

/*FINALLY, DETERMINE THE POTENTIAL GAIN FROM THIS WEEK'S GAP DOWN*/
set{gapsize, open1 - horizontal1}
set{gain2, gapsize / horizontal1}
set{gain, gain2 * 100}

/*NOW ADD COLUMNS WITH KEY DATA AND SORT THEM FROM HIGHEST PERCENT GAP FILLED TO LOWEST*/
add column pct_gapfill {percent gap filled}
add column gapup100
add column gapfill100
add column horizontal1 {last week's close}
add column open1 {weekly open}
add column gain {gain(%)}
add column ATR(50)
sort on column 5 descending

/*SET SCREENING CRITERIA FOR USE AT MONDAY'S OPEN. SINCE BIG GAPS UP ARE LESS LIKELY
TO BE FILLED, SCREEN OUT ANY GAPS UP THAT OPEN ABOVE LAST WEEK'S HIGH*/
weekly open above weekly close 1 week ago
weekly open below weekly high 1 week ago

/*ADDED CHECK - THE GAP TO BE FILLED SHOULD BE LESS THAN THE ATR(50). THIS WILL ALSO HELP TO SCREEN OUT BIG GAPS UP THAT ARE UNLIKELY TO BE FILLED THIS WEEK*/
gapsize below ATR(50)

/*SET A MINIMUM FREQUENCY FOR GAPS UP - THE HIGHER THIS IS, THE STRONGER THE STATISTICAL RELEVANCE - I CHOSE 30 HERE BUT YOU CAN SET IT TO ANYTHING YOU WANT (HIGHER WILL GIVE FEWER
HITS). I ALSO WANT THE RETURN TO BE AT LEAST 2%*/
gapup100 above 30
gain above 2

/*STANDARD LIQUIDITY REQUIREMENTS*/
close above 1
average volume(30) above 100000

chart-display is weekly
draw gapfill
draw gapup

]



Enjoy.

Kevin

Nurdish
2 posts
msg #104249
Ignore Nurdish
1/6/2012 1:10:32 PM

Kevin - some of your work here is inspirational, I joined after seeing yours + eman's posts. You guys are great.

Kevin_in_GA
4,599 posts
msg #104251
Ignore Kevin_in_GA
1/6/2012 1:46:03 PM

Much appreciated. I would not act on this one until I have had a chance to thoroughly backtest it. For now, consider it a work-in-progress.

I had also thought of using other triggers (e.g., the previous weeks pivot points as entry and exit). I may come back to that idea a little later, once this one is more fully developed.

sohailmithani
192 posts
msg #104252
Ignore sohailmithani
1/6/2012 2:34:25 PM

great filter. Thanks for sharing. I tested it a bit using date off set option and results were excellent. Now in my test what I did the following:

1) only took top 3 stocks (top means percent filled over 90 and gapdown100 to be over 30),
2) close between $5 and $100,
3) gain (max) target restricted between 2% and 4%,
4) excluded ETF and
5) excluded those 5 alphabet stocks from the list.

The results on avg showed gain of between $600-800 per week even in 2008 (tested some months). This one looks to be the one I always wanted.

Any thoughts?

mahkoh
1,065 posts
msg #104258
Ignore mahkoh
modified
1/6/2012 5:31:07 PM

One thing: Stockfetcher doesn't generate Monday's data until we're at least half an hour underway in the new trading week. (And this week I had to wait until 10:30 before it stopped generating data from Friday 2011-12-30)

Kevin_in_GA
4,599 posts
msg #104263
Ignore Kevin_in_GA
1/6/2012 6:24:51 PM

One thing: Stockfetcher doesn't generate Monday's data until we're at least half an hour underway in the new trading week. (And this week I had to wait until 10:30 before it stopped generating data from Friday 2011-12-30)
+++++++

I know. The delay limits this system trading real time. However, the real value is in the statistical analysis, which can be run over each weekend to generate all stocks that meet a certain criterion (e.g., 90% fill rate, at least 30 gaps down/up, etc).

That list can be used with other real-time systems to trade as described here. After all, the only numbers you need to fill the trade are last week's close and this week's open. No indicator needed.

Billirider321
62 posts
msg #104285
Ignore Billirider321
1/8/2012 11:26:44 AM

One risk we need to consider on gap ups is potential takeover candidates. In those cases we will risk having shors on stocks which will be a big looser. There may be only very few candidates like this but we will always have that stress.
We can always research during the weekend and eleminate as much as possible. Second option is to take position in puts.

we can also look at big cap companies who are not take over candidates. But ther chance of gap fill will decrease. Guys this is realy a awesome idea(as most of the idea's of Kevin are). Lets try to improve with mutual coordination.

shillllihs
6,047 posts
msg #104286
Ignore shillllihs
1/8/2012 4:17:16 PM

I know what you're doing kevin, and i like it. Steering the sheeple. thanx for the loophole.

wkloss
231 posts
msg #104287
Ignore wkloss
1/8/2012 5:10:32 PM

Kevin,

Any thoughts on testing your balanced long/short approach on this one?

Bill

mahkoh
1,065 posts
msg #104292
Ignore mahkoh
1/9/2012 3:46:08 AM

Another issue I have come across in he past with filters that refer to the opening price: Most stocks have a substantial spread during the first minutes of trading, often over 2 %. So, while there is a very slim chance of actually getting the opening price these values are used in the filter calculations to come up with candidates.

StockFetcher Forums · Filter Exchange · KEVIN'S "MONDAY MORNING FILL THE GAP" FILTER<< 1 2 3 4 5 ... 6 >>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 2022 - 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


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.