|
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.
|