<< . .

. 26
( : 30)

. . >>

orders (possibly three) are posted: the money management stop and profit target
limit orders, using the stop and limit prices calculated on the bar the entry was ini-
tially posted; and if the trade has been held for more than maxhold bars, an order
to exit on the close is also posted.


Test 4: MSES with Random Entries at Open. Table 13-5, which has the same
format as Tables 13-l through 13-3, provides data on the portfolio performance of
the modified standard exit strategy with trades entered randomly at the open, In-
sample, the average trade. lost $1,702, with a standard deviation of $365. The per-
centage of wins was 31.73%, with a standard deviation of 1.10%. The average
trade lost less than it did in the tests of the original, unmodified SES. The reduc-
tion in the loss on the average trade was undoubtedly caused by the ability of the
MSES to more quickly escape from bad trades, cutting losses short. The more
rapid and frequent escapes also explain the decline in the percentage of winning
trades. There were fewer wins, but the average loss per trade was smaller, an inter-
esting combination. Overall, the MSES should be regarded as an improvement on
the unmodified standard exit.
Out-of-sample, the average trade lost $836. Statistically, this was signifi-
cantly better than the in-sample performance. It seems that, in more recent years,
this exit provided a greater improvement than it did in earlier years. The markets
may be more demanding than they were in the past of the ability to close out bad
trades quickly. Other figures in Table 13-5 indicate a similar pattern of changes.

Market-by-Market Results for MSES with Random Entries at Open. Table 13-
6 contains the market-by-market results for the MSES with the best set of random
entries taken at the open. The best set was chosen from the randomizations shown
in Table 13-5. The Swiss Franc, Light Crude, Heating Oil, COMEX Gold, and
Live Cattle had positive returns both in- and out-of-sample. For some markets, the
MSES was able to pull consistent profits out of randomly entered trades! Many
more markets were profitable in both samples than when the unmodified SES was


Results for the Modified Standard Exit with Random Entries
at the Open
used, again a sure sign that the more responsive, modified exit is better. As usual,
and across both samples, the long side was more profitable (lost less) than the
short side. Surprisingly, out-of-sample, the long side actually turned a very small
whole-portfolio profit with this exit strategy; it is, however, nothing one would
want to trade.

TABLE 13-6

Market-by-Market Results for the Modified Standard Exit
with Random Entries at the Open

The results clearly demonstrate that many of the entry strategies tested in earlier
chapters using the SES were no better than random entries. Sometimes they were
worse. The results also indicate that the SES is not a great exit strategy. The
MSES, which simply lifts the restriction of the exit to the close, performed much
better and even managed to pull a small profit out-of-sample on the long side. The
MSES should still be considered a minimalist exit strategy, but the results support
the contention that a really good exit strategy is, more than anything else, the key
to successful trading. If the findings from this and previous studies are correct, it
should be possible to find an exit strategy that can actually extract substantial prof-
its from randomly entered trades, at least in some markets. Such an exit strategy
would substantiate what many great traders have said: An experienced trader,
skilled in money management, can make a profit even with a bad system, while a
novice trader, unskilled in money management, can lose everything trading a great
system (sysrem, in this context, usually referring to an entry model). In all the
remaining tests in this book, the MSES will replace the original, unmodified exit
strategy (SES).


. A good exit strategy is extremely important. It can even pull profits from
randomly entered trades! Think of what it could do for trades entered on
the basis of something better than the toss of the die.
. Even simple modifications can make a big difference, as evidenced by the
results above where slight changes proved effective.
. When combined with the suboptimal SES, many of the entry strategies
tested in the previous section of this book can be seen to perform no bet-
ter than the random one. Some even did worse! Of course, a few per-
formed dramatically better than did the random entry model.

Improvements on the Standard

In continuation of the endeavor to improve upon the standard exit strategy (SES)
and develop a good exit, a number of modifications are explored. In the previous
chapter, it was demonstrated that the exit strategy can have a substantial impact on
the overall performance of a trading system. To make it more compatible with the
kinds of exit strategies examined in this and the next chapter, the original SES
(used in the study of entries) was changed and became the modified SES (or
MSES): While maintaining consistency, the restriction of exiting at the close was
removed. It was no longer necessary to restrict the exit to the close, because in the
study of exits, entries are restricted to the open. In previous chapters, entries were
not restricted to the open. Therefore, to avoid ambiguity in the simulations, it was
necessary to restrict exits to the close. The MSES represents a kind of baseline,
minimalist exit that can serve as a standard for comparing better exit methods, as
well as provide some consistency and comparability with the unmodified SES. In
this chapter, variations, both small and large, of the MSES are explored in an
attempt to find a better exit strategy.

When specifying the original SES (as well as when modifying it so that inside-the-
bar stops and limits could be used), specifications for the tightness of the money
management stop and closeness of the profit target were arbitrary and fixed. For
long entries, the money management stop was placed at 1 average true range unit
below the entry price, while the profit target was placed 4 average true range units
above the entry price. For short entries, the placements were reversed. The inten-
tion was to place a stop fairly close in so that losing trades would quickly be taken

out, while placing the profit target far enough away so profits would not be cut
short on trades that were favorable. The first test below examines the performance
of the stop and profit target when the arbitrary settings are adjusted.
The second set of tests involves replacing the fixed money management stop
in the MSES with a more dynamic stop. The minimalist MSES lacks many desir
able characteristics. One of the features any good trader wants in an exit is the abil-
ity to lock in at least some of the paper profit that develops in the course of a
successful trade, i.e., to avoid having to watch profitable trades turn into losers.
Locking in some of the profit can be accomplished using a trailing stop: Instead
of having a money management stop placed a fixed distance from the entry price,
the stop moves toward current prices as the trade becomes profitable. As prices
move in the trade™s favor, the stop moves in along with them, locking in a propor-
tion of the developing profits. Should the market reverse, the trade will not be
closed out at a loss, as might have been the case with the tixed stop, but at a prof-
it, if the moving stop has gone into positive territory. There are several strategies
for the placement and relocation of a stop designed to prevent winning trades from
turning into losers and to lock in as much of the unrealized profit as possible. The
second set of tests explores such strategies.
Originally, the profit target in the MSES (and SES) was implemented as a
limit order with a fixed placement. In the third set of tests, the fixed profit target
is, like the stop in the previous tests, replaced with something more dynamic. It
would be desirable if the profit target could also move in toward the prices, espe-
cially in languishing trades. This would enable the trader to exit at a better price,
perhaps even with a small profit, in the absence of strong, favorable movement.
Exiting the market on spikes or noise should lead to more profitable trades than
simply exiting on a time constraint or waiting for the money management stop to
be hit. At the same time, the trader does not want the profit target to cut profits
short. A profit target that is too close might provide a higher percentage of win-
ning trades, but it will also significantly limit the size of the profits. In all likeli-
hood, it will cause the overall strategy to perform less well. It should be
advantageous to make the profit target dynamic in the same way that the stop was
made dynamic, i.e., to place the profit target far away from the market at the begin-
ning of the trade, or when the market is steadily moving in a favorable direction,
In this way, it would not be necessary to settle for a small profit on a potentially
very profitable trade; the trader could “let profits run.” Conversely, in trades that
are languishing, or when the market is exhibiting blow-off behavior, the profit tar-
get could be made to move in tight to close out the trade, and to do so at the best
possible price, before the market has a chance to reverse. Modifications of the
profit target limit order placement are studied below.
Finally, the time limit exit from the MSES model is adjusted and tested on
the assumption that, with effective dynamic stops and profit targets, a short time
limit is no longer so necessary. Trades will be exited quickly by other means if
they are languishing, but will be held for as long as possible if favorable move-
ment is occurring. The intention is to let profits develop and not be cut short sim-
ply because of an order to exit on an arbitrary time limit.

The MSES makes use of a fixed stop and profit target that do not change their place-
ments during a trade. Originally, the parameters for the placement of these stops
were somewhat arbitrxy and certainly not optimal. What happens when these para-
meters are stepped through a range of values in search of an optimal combination?
In this test, the money management stop parameter is stepped from 0.5 to 3.5
in increments of 0.5. The profit target limit parameter is also stepped from 0.5 to
5 in increments of 0.5. The profit target parameter is simply the multiple of the
average true range used in placing the profit target limit. Likewise, the money
management stop parameter is the multiple of the average true range used for plac-
ing the money management stop.

float *lo, float '˜1s. float *vol. float *oi. float +dlrv, int nh,
TRDSIM fcts, float l eqcls) (

The code implements the standard random entry at the open and the modi-
fied standard exit strategy. The rules for the exit are as follows: A limit order exit
is placed a certain number of true range units above (long) or below (short) the
entry price. The number of true range units that the limit order is placed away from
the entry price is specified by the parameter ptlim. Besides the profit target limit,
an exit stop is placed a specified number of average true range units below (long)
or above (short) the entry price. The parameter mmsrp determines the number of
true range units that the stop is placed away from the entry price. Finally, maxhold
is a parameter that specifies the maximum time any position is held. If they were
not closed out ,earlier by the profit target limit or money management stop, all
trades will be closed out with an exit at the close after maxhold days or bars have
elapsed since entry. In the test, maxhold is fixed at a value of 10, the same value
used throughout the tests in this book.
Table 14-l shows the annualized risk-to-reward ratio (ARRR), the percent-
age of winning trades (WIN%), and the average trade profit or loss (AVTR), for
every combination of money management stop and profit target limit parameter
settings. At the right of the table, the AVG or average values (average taken over
all money management stop parameters) for all the performance figures are pre-
sented for each profit target limit parameter value. At the bottom of the table,
the AVG or averages (taken over all profit target limit parameters) for each of the
money management stops are shown.
A number of things are immediately apparent in the results. As the profit tar-
get limit got tighter, the percentage of winning trades increased; this was expected.
A tight profit target has a greater chance of being hit and of pulling a small profit
out of the market. However, the increased percentage of winning trades with
tighter profit targets was not sufficient to overcome the effects of cutting profits
short on trades that had the potential to yield greater profits. Looser profit targets
performed better than tight ones. For most of the profit target limits, there was an
optimal placement for the money management stop, between a value of 1.0 and
2.0 average true range units away from the entry price. As the stop got looser, the
percentage of winning trades increased, but the other performance figures wors-
ened. As it got tighter, the percentage of winning trades declined along with the
other measures of performance.
The overall optimal performance, in terms of both annualized risk-to-reward
ratio and average trade, was with a profit target limit of 4.5 and a money manage-
ment stop of 1.5. As deviation from the optimal combination occurred, the annu-
alized risk-to-reward ratio increased, as did the average loss per trade. There was
relatively little interaction between placement of the profit target and the money
management stop. The values that were optimal for one varied only slightly as the
parameter controlling the other was adjusted. Another almost equally good com-
bination of parameters was 1.5 and 4 (profit target and stop, respectively). This
provided a very slightly better average trade and a trivially worse annualized risk-
to-reward ratio. It is interesting that the arbitrarily assigned values came fairly
close to the optimal values, appearing only one cell away from the optimal cells in
Table 14-l. The optimal values, however, provided 6% more winning trades than
the arbitrary values of 4 (profit target) and 1 (stop).
TABLE 14-1

In-Sample Portfolio Performance with Modified Standard Exit and
Random Entry as a Function of Profit Target Limit (Left) and Money
Management Stop (Top) Parameters

The percentage of wins for the optimal solution was 39%. When the num-
bers were examined in relationship to those for a profit target limit of 0.5 (with the
same stop), 69% (instead of 39%) winning trades resulted, but with a much worse
risk-to-reward ratio and average trade. This clearly shows the importance of let-
ting profits run or, at least, not cutting them short.
No combinations of parameters yielded profitable results. Given that this is
a minimalist exit strategy, and that random entries were being used, such an out-
come was expected. Nevertheless, the performance of the exit strategy across dif-
ferent parameter combinations can be compared.

Profits should not be cut short even though a higher percentage of winning trades
might be gained. Doing so may make the average trade a larger loser or smaller
winner. In addition, there appears to be an optima1 placement for a fixed money
management stop. Too wide a stop increases the percentage of wins. However, it
also increases the overall loss. Too tight a stop keeps the individual losses small,
but drastically cuts the percentage of winning trades, again resulting in worse
overall performance. An optimal value provides a moderate percentage of winning
trades and the best performance. In this case, the optimal distance to place the
money management stop away from the entry price was 1.5 average true range
units. With some entry systems, the optima1 placement might be much closer.

In this group of tests, the fixed money management stop of the MSES is replaced
with what will; it is hoped, be a much better stop. The placement of the stop is
dynamically adjusted. The goal is to capture as much unrealized profit as possible,
while not turning potentially profitable trades into losing ones, as might happen
with an overly tight, fixed stop.
There are many ways to adjust the stop so that it follows or trails the market,
locking in some of the profit that develops in the course of a trade. One popular
method is, for long positions, to place the stop for the next bar at the lowest of the
lows of the current and previous bars. The stop is only placed at progressively
higher levels, never lower levels. For short positions, the stop is placed at the high-
est of the current bar™s and previous bar™s highs, It is only allowed to move down,
never up. This simple methodology is examined in the first test.
The second test is of a dynamic stop that mimics the fixed stop used in the
MSES. The stop is adjusted up (long) or down (short) based on the current price
minus (long) or plus (short) a multiple of the average true range. Unlike the stop
used in the MSES, where the placement was fixed, the placement revisions of
this stop are based on current market value. The revised placements may only
occur in one direction: up for long positions, down for short ones. The intention
is to keep the stop a similar statistical distance from the best current price
achieved at each stage of the trade, just as it was from the original entry price.
The stop for long positions is calculated as follows: (1) Subtract from the entry
price a parameter (mmstp) multiplied by the average true range (the result is the
stop for the next bar). (2) On the next bar, subtract from the current price anoth-
er parameter (stpa) multiplied by the average true range. (3) If the stop resulting
from the calculations in Step 2 is greater than the current stop, then replace the
current stop with the resultant stop: otherwise the stop remains unchanged. (4)
Repeat Steps 2 and 3 for each successive bar. In the stop for short positions, the
multiples of the average true range are added to the market prices and the stops
are ratcheted down.
The third test involves a more sophisticated approach. For long positions, the
stop is initialized a certain number of average true range units below the entry
price, as usual. The stop is then moved up an amount that is determined by how
far the current prices are above the stop™s current value. For short positions, the ini-
tialization occurs above the entry price, and the stop is moved down to an extent
determined by how far the current prices are below it. The stop initially moves in
quickly, losing momentam as it reaches the vicinity of the current price level. This
method involves nothing more than a kind of offset exponential moving average
(EMA), except that the moving average is initialized in a special way on entry to
the trade and is only allowed to move in one direction; i.e., the stop is never polled
further away from the market, only closer. The stop for long positions is calculat-
ed as follows: (1) Initialize the stop to be used on the entry bar by subtracting from
the entry price a parameter (mmstp) multiplied by the average true range. (2) At
the next bar, subtract from the high a parameter (stpa) multiplied by the average
true range; then subtract the current placement of the stop, and finally multiply by
another parameter (srpb). (3) If the resultant number from Step 2 is greater than
zero, then add that number to the value of the current stop; otherwise the stop
remains unaltered. (4) Repeat Steps 2 and 3 for each successive bar. In the stop for
short positions, the multiples of the average true range are added to the market
prices and only corrections that are negative are added to the stop prices.

static void Model (float *parms, float Wt. float *opn, float *hi.
float *lo, float l cls, float *vol. float *oi, float ˜dlrv, int nb,
TRDSIM as, float *eqclsl {

// Implements random entry tests of the standard exit
// strategy modified to use “dynamic” stops.
,, File = x20mod02.c
vector [I. .MAxPFm, Of parameters
// pa-s
vector [I. .nbl of dates in YYMMDD form
// d-L
vector [I. .rlbl Of opening prices
// opn

v e c t o r [l. .*I o f h i g h
vector Ll. .*I of low prices
- vector [l..nbl Of c1oaing prices
vector [I. .*I Of volumes
vector [i..nbl of open interest numbers
- vector [l..nh] of average dollar volatilities
number of bars in data series or vectors
trading simulator class instance
vector Il..*1 of closing equity levels

// declare local scratch variables
static int rc, cb. *contracts, maxhold, signal, ranseed;
static float stpa, stpb, matp, ptlim, limprice, stpprice;
static int entryposted, entrybar, modeltype;
static float exitatrM+XBAR+ll, mum, entryprice, tmp, at*;
static long iseed;

,, copy parameters to local variables for clearer reference
mmstp = parms[ll; // used to set the initial stop
= parms[2]; // additional stop parameter
stp!J = parms131; I/ additional stop parameter
ptlim = parma[61; I/ profit target limit in at* units
modeltype = parms˜71; // type of dynamic stop to use
= parmsL81; // maximum holding period in days
= parms˜91 ; ,, used to Select random seed

I/ perform whole-series calculations
˜˜gTruenange˜˜exitatr,hi,lo,cls.50,*˜; // ATR for exit

,, seed the random number generator
// _._ use a different seed for each tradeable
I/ t*.modelO returns a market index CSP=l, YX=2. .)
iwed = -(ranseed + 10 * ts.modelo,;
mum = rarOC&iseed);
case 2:
stpprice = min(stpprice, cls[cbl+stpa*a˜r˜;
case 3:
tmp = (lolcbl + stpa l atrl stpprice;

if˜mp < 0.0) stpprice += stptz * elnp;



tS.exit6hortlimit(˜*˜, limprice˜;

ts .exitdlortstop (˜J™ , stpprice1 i

iftch-entrybar >= maxhold) ts.exitshortclose(˜H™);



) ,/ process next bar


The code above implements the MSES with the original fixed stop replaced

<< . .

. 26
( : 30)

. . >>