Home                           

 Try Investor/RT             

 Investor/RT Tour           

 Getting Started              

 What's New                  

 Testimonials                 

[menuLeft.htm] Trading Systems
Closing The Gap
Backtest Details

Rules     Explanation     Results

Name: 

Closing The Gap

Submitted by: 

Chad Payne

Periodicity: 

Daily

Rules...

RULE 1: Daily: If GapDownLong then BUY $15000 at Open price
SIGNAL=GapDownLong
     (CL.1 - OP) / OP > 0.045 AND SET(V#1, CL.1)
ELEM=CL:Close
ELEM=OP:Open
ELEM=V#1:V#1

RULE 2: Daily: If GapDownExit then SELL at Value V#1 price
SIGNAL=GapDownExit
     HI >= V#1
ELEM=HI:High
ELEM=CL:Close

RULE 3: Daily: If GapDownStop then SELL at Close price
SIGNAL=GapDownStop
     HI < V#1
ELEM=HI:High
ELEM=CL:Close

RULE 4: Daily: If GapUpShort then SELL SHORT $15000 at Open price
SIGNAL=GapUpShort
     (CL.1 - OP) / OP < -0.045 AND SET(V#1, CL.1)
ELEM=CL:Close
ELEM=OP:Open
ELEM=V#1:V#1

RULE 5: Daily: If GapUpExit then COVER SHORT at Value V#1 price
SIGNAL=GapUpExit
     LO <= V#1
ELEM=HI:High
ELEM=CL:Close
ELEM=LO:Low

RULE 6: Daily: If GapUpStop then COVER SHORT at Close price
SIGNAL=GapUpStop
     LO < V#1
ELEM=HI:High
ELEM=CL:Close
ELEM=LO:Low

Explanation and Comments...

This backtest banks on symbols that gap significantly at the open to close their daily gaps.  It finds instruments that have gapped at the daily open.  If the instrument gaps down, we buy, and if the instrument gaps up, we sell short.  We then hold until the price retraces back to our target price of the previous close.  If the price never reaches our target, then we exit our position at the close of the day, hopefully still at a profit.

More specifically, in the backtest above, we are looking for the instrument to gap at least 4.5%, as seen in the signal of Rule 1...

(CL.1 - OP) / OP > 0.045

The second component of the Rule 1 signal deserves a closer look, as it's purpose may not be clear...

SET(V#1, CL.1)

This expression's purpose is to set our target (or exit) price.  V#1 will then be used as the rule price for the subsequent exit rule (Rule 2).  We are required to do this since the list of Rule Prices does not provide "Previous Close" as an option in the list.  The "SET" expression always returns TRUE and therefore does not have any effect on our signal.  This expression is going to give us our target, which we can now reference with V#1.

If our instrument passed Rule 1, then we are now long and move on to Rules 2 and 3 to see where we will exit the position.  If the instrument did not pass Rule 1, then we would be out of the market, and therefore, the two subsequent SELL rules (Rules 2 and 3) would be skipped.  Let's look at Rule 2 and Rule 3 now assuming that we did go long on Rule 1.

Rule 2 and Rule 3 are exact opposites of each other, and therefore, either one or the other will trigger every time, but never both.  The question is, are we gong to exit at our target price (Rule 2), or stop at the closing price (Rule 3).  First, let's look at Rule 2...

HI >= V#1

This rule triggers an exit if the price reached our target price at any point during the current day.  If it did, then we know we had an opportunity to exit our position at that level, and we will therefore assume we will do so, and sell at our target (V#1).  Since V#1 is just the previous close, this signal in essence generates an exit if the price retraced back to the previous close sometime during the session.  Now, let's look at the signal for Rule 3...

HI < V#1

This is the exception to Rule 2.  This signal will generate a stop at the day's close if we never reached our target price during the session.  There is still hope that we made a profit, but no guarantee.  And a more refined follow-up intraday trading system, which will be explored later in this project, will help minimize the losses as a result of triggering this signal.

Rules 4, 5, and 6 are mirror images of Rules 1, 2, and 3, except they are designed to trade the a gap up as opposed to a gap down.
 

Testing Results...
I tested this system on the 100 stocks represented in the Nasdaq 100 over the period of August 25, 2001 through October 25, 2001.  The results were very encouraging.  The system generated 287 trades, 70% of which were profitable.  Each of the 287 positions opened were under $5,000 with an average profit of $101/trade, after taking out $16/trade for commissions ($29,000 total).

This is a very raw system with much room for improvement.  The results are realistic and promising, but by refining this system with a follow-up intraday system, the profitable trades could be more profitable, and the losing trades could be minimized.  The intraday system must look for good entry points after the gap, and provide a stop to minimize the losses, possibly a trailing stop.  We will be developing this intraday system as the project moves along.
 

Disclaimer: The information presented in this site is not meant to be taken as investment advice.  The mention of any securities in this site is not to be taken as a recommendation to buy or sell those securities.  We urge you to form your own opinions using research and analytical tools such as Investor/RT.