<< . .

. 11
( : 30)

. . >>

Would restricting breakout models to long positions improve their performance?
How about trading only the traditionally trendy currencies? Would benefit be
derived from a trend indicator to filter out whipsaws? What would happen without
m-entries into existing, possibly stale, trends? The last question was answered by
an unreported test in which entries took place only on breakout reversals. The
results were so bad that no additional tests were completed, analyzed, or reported.
The first three questions, however, are addressed below.

Long Positions Only
In the preceding tests, the long side almost always performed better than the short
side, at least on in-sample data. What if one of the previously tested models was
modified to trade only long positions? Test 10 answers that question.

Test IO: Vohdity Breakout with Limit Entry Zkading Only Long Posilims. T h e
best in-sample model (Test 8) was modified to trade only long positions. A genetic
algorithm optimized the model parameters. Band-width (bw) was optimized from 1.5
to 4.5, with a grid of 0.1; the period of the average true range (arrlen) from 5 to 50,
with a grid of 1; and the length of the moving average (malen) from 1 to 25, with a
grid of 1. Optimization was halted after 100 generations.
In-sample, the model performed well. The best parameter values were: band-
width, 2.6; moving average length, 15; and average true range period, 18. The best
parameters produced an annualized return of 53.0%, and a risk-to-reward ratio of
1.17 (p < 0.0002; p < 0.02, corrected). There were 1,263 trades, 48% profitable
(a higher percentage than in any earlier test). The average trade lasted 7 days, with
a $4,100 profit after slippage and commissions. Even suboptimal parameter val-
ues were profitable, e.g., the worst parameters produced a 15.5% return!
Out-of-sample, despite the high levels of statistical significance and the
robustness of the model (under variations in parameter values when tested on in-
sample data), the model performed very poorly: There were only 35% wins and a
loss of -14.6% annually. This cannot be attributed to in-sample curve-fitting as all
in-sample parameter combinations were profitable. Suboptimal parameters should
have meant diminished, but still profitable, out-of-sample performance. Additional
tests revealed that no parameter set could make this model profitable in the out-of-
sample period! This finding rules out excessive optimization as the cause for out-
of-sample deterioration. Seemingly, in recent years, there has been a change in the
markets that affects the ability of volatility breakout models to produce profits,
even when restricted to long positions. The equity curve demonstrated that the
model had most of its gains prior to June 1988. The remainder of the optimization
and all of the verification periods evidenced the deterioration.
As before, most currencies traded fairly well in both samples. The average
currency trade yielded $5,591 in-sample and $1,723 out-of-sample. If a basket of
oils were traded, profits would be seen in both samples. Coffee was also profitable
in both samples.
Overall, this system is not one to trade today, although it might have made a
fortune in the past; however, there may still be some life in the currency, oil, and
Coffee markets.

Currencies Only
The currency markets are believed to have good trends, making them ideal for
such trend-following systems as breakouts. This belief seems confirmed by the
tests above, including Test 10. Test I1 restricts the model to the currencies.

Test 11: Vokztility Breakout with Limit Entry Trading Only Currencies. This
model is identical to the previous one, except that the restriction to long trades
was removed and a new restriction to trading only currencies was established.
No optimization was conducted because of the small number of markets and,
consequently, data points and trades; instead, the best parameters from Test 8
were used here.
This is the first test where a breakout produced clearly profitable results in
both samples with realistic transaction costs included in the simulation! In-sam-
ple, the model returned 36.2% annually. Out-of-sample, the return was lower
(17.7%), but still good. There were 268 trades, 48% wins, with an average profit
per trade (in-sample) of 53,977. Out-of-sample, the model took 102 trades, won
43%, and averaged 52,106 per trade.
The equity curve in Figure 5-2 contimts the encouraging results. Almost all equi-
ty was gained in five thrusts, each lasting up to a few months. This model is potential-
ly tradeable, especially if the standard exit was replaced with a more effective one.

ADX Trend Filter
One problem with breakouts is the tendency to generate numerous whipsaw trades
in which the breakout threshold is crossed, but a real trend never develops. One
possible solution is to use a trend indicator to filter signals generated by raw break-
outs; many traders do this with the ADX, a popular trend indicator. Test 12 exam-
ines whether Wilder™s ADX is beneficial.


Equity Curve for HHLL Breakout, Entry on Limit, Currencies Only
Test 12: Volatility Breakout with Limit Entry and Trend Filter. The same
model from Tests 10 and 11 is used; instead of restriction to long positions or
currencies, the signals are “filtered” for trending conditions using the Average
Directional Movement index (or ADX; Wilder, 1978). By not entering trend-
less markets, whipsaws and languishing trades, and the resultant erosion of
capital, can hopefully be reduced. The ADX was implemented to filter break-
outs as suggested by White (1993). Trending conditions exist as long as the
18-bar ADX makes a new 6-bar high, and entries are taken only when trends

As in previous tests, a genetic algorithm optimized the parameters. All 100
parameter combinations except one produced positive returns in-sample; 88
returned greater than 20%, demonstrating the model™s tolerance of parameter vari-
ation. The best parameters were: bandwidth, 2.6; moving average length, 8; and
average true range period, 34. With these parameters the in-sample return was
68.3%; the probability that such a high return would result from chance was less
than one in two-thousand, or about one in twenty-nine instances when corrected
for optimization. There were 872 trades and 47% wins. The average trade gener-
ated about $4,500 in profit. Out-of-sample the average trade lost $2,415 and only
36% of all trades taken (373) were winners. The return was -20.9%, one of the
worst out-of-sample performances. The ADX appears to have helped more in the
past than in current times.
Most currencies, Heating Oil, Coffee, Lumber, and lo-Year Notes were prof-
itable out-of-sample. The S&PSOO, Kansas Wheat, and Comex Gold were profitable
out-of-sample, but lost money it-sample. The pattern is typical of what has been
observed with breakout systems, i.e., the currencies, oils, and Coffee tend to be con-
sistently profitable.

Table 5-3 summarizes breakout results broken down by model, sample, and order
type. ARRR = the annualized risk-to-reward ratio, ROA = the annualized return
on account, and AVTR = the average trade™s profit or loss.

Breakout Types
In the optimization sample (1985 to 1995). volatility breakouts worked best, the
highest-high/lowest-low breakout fell in-between, and the close-only breakout did
worst: this pattern was consistent across all three order types. In the verification
period (1995 through 1998), the highest-higMowest-low continued to do slightly
better than the close-only, but the volatility model performed much worse. For rea-
sons discussed earlier, optimization cannot account for the relatively dramatic
deterioration of the volatility breakout in recent years. Perhaps the volatility break
out deteriorated more because of its early popularity. Even the best breakout mod-
els, however, do poorly in recent years.
When broken down by model, three distinct periods were observed in the aver-
aged equity curves. From August 1985 through June 1988, all models were about
equally profitable. From June 1988 to July 1994, the HHLL and close-only models
were flat and choppy. The volatility model showed a substantial gain from August
1992 through July 1994. From July 1994 until December 1998, the HHLL and
close-only breakouts were choppy and slightly down, with the HHLL model some-
what less down than the close-only model; equity for the volatility model declined

Entry Orders
Both in- and out-of-sample, and across all models, the limit order provided the
greatest edge; the stop and market-at-open orders did poorly. The benefit of the
limit order for entering the market undoubtedly stemmed from its ability to
obtain entries at more favorable prices, The dramatic impact of transaction costs
and unfavorable entry prices is evident in Tests 1 and 2. Surprisingly, the limit
order even worked with a trend-following methodology like breakouts. It might
be expected that too many good trends would be missed while waiting to enter
on a limit; however, the market pulls back (even after valid breakouts) with
Summary of Breakout Entry Results Arranged for Easy

enough frequency to enter on a limit at a better price without missing too many
good trends.
The same three periods, evident when average equity was broken down by
breakout type, appeared when entry orders were analyzed. For the limit and stop
entries, equity surged strongly from August 1985 to June 1988. Equity increased,
but to a lesser extent, with a stop order. For entry at the open and on a stop, equity
was choppy and down-trending from June 1988 to July 1994, when the limit
order modestly gained. From July 1994 to December 1998, equity for entry at the
open mildly declined, the stop evidenced a serious decline, and the limit had no
consistent movement. The stop did better than average during the first period and
much worse than average during the third, more decay in performance over time
occurred with a stop order than with the other orders. In all periods, the limit
order performed best.
When equity was analyzed for all models and order types combined, most of
its gains were in the first period, which covered less than the first third of the in-
sample period. By the end of this period, more than 70% of the peak equity had
already accumulated. In the second period, equity drifted up a little. In the third
period, equity declined, at first gradually and then, after July 1997, at a faster pace.

Interactions seemed strongest between breakout types and time. The most
notable was between volatility breakouts (versus the others) and time (in-san-
ple versus out-of-sample). Volatility breakouts performed best early on, but
later became the worst. The volatility breakout with stop entry deteriorated
more in recent years than it did with entry on a limit, perhaps due to the com-
mon use of stops for entry in trend-following models. Finally, the highest-
higMowest-low breakout sometimes favored a stop, while the volatility model
never did.

Restrictions and Filters
Restricting trades to long positions greatly improved the performance of the
volatility breakout in-sample, and improved it to some extent out-of-sample.
Breakout models do better on the long side than on the short one. The ADX
trend filter had a smaller benefit in-sample and provided no benefit out-of-
Restricting trading to currencies produced lessened in-sample perfor-
mance, but dramatic improvements out-of-sample. The gain was so great that
the model actually profited out-of-sample, which cannot be said for any of the
other combinations tested! The currencies were not affected by the rising effi-
ciency other markets had to simple breakout systems, perhaps because the cur-
rency markets are huge and driven by powerful fundamental forces. The poorer
in-sample performance can be explained by the reduced number of markets

Analysis by Market
Net profit and annual return were averaged for each market over all tests. The cal-
culated numbers contained no surprises. Positive returns were seen in both samples
for the Deutschemark, Swiss Franc, Japanese Yen, and Canadian Dollar, and for
Light Crude and Heating Oil. Trading a basket of all six currencies, all three oils, or
both, would have been profitable in both samples. Although no other market group
demonstrated consistent profitability, some individual markets did. In order of min-
imum net profit, Coffee, Live Hogs, and Random Lumber had positive retarns.
The S&P 500, NYFE, Comex Gold, Corn, and the wheats had positive out-
of-sample returns with in-sample losses. The index markets™ profitability may
have resulted from the strong trends that developed out-of-sample. Positive in-
sample returns, associated with out-of-sample losses, were somewhat more
common; T-Bonds, IO-Year Notes, Palladium, Feeder Cattle, Pork Bellies,
Soybeans, Soybean Meal, Bean Oil, Oats, Orange Juice, and Cotton had this pat-
tern. T-Bills, Silver, Platinum, Live Cattle, Cocoa, and Sugar lost in both sam-
ples. A correlation of 0.15 between net in-sample and net out-of-sample profits
implies markets that traded well in the optimization period tended to trade well
in the verification period.

No technique, except restricting the model to the currencies, improved results
enough to overcome transaction costs in the out-of-sample period. Of course,
many techniques and combinations were not tested (e.g., the long-only restriction
was tested only with the volatility breakout and not with the HHLL breakout, a
better out-of-sample performer), although they might have been effective. In both
samples, all models evidenced deterioration over time that cannot be attributed to
overoptimization. Breakout models of the kind studied here no longer work, even
though they once may have. This accords with the belief that there are fewer and
fewer good trends to ride. Traders complain the markets are getting noisier and
more countertrending, making it harder to succeed with trend-following methods.
No wonder the countertrend limit entry works best!
Overall, simple breakout models follow the aforementioned pattern and do
not work very well in today™s efficient markets. However, with the right combina-
tion of model, entry order, and markets, breakouts can yield at least moderate prof-
its. There are many variations on breakout models, many trend filters beyond the
ADX, and many additional ways to improve trend-following systems that have not
been examined. Hopefully, however, we have provided you with a good overview
of popular breakout techniques and a solid foundation on which to begin your own

If possible, use a limit order to enter the market. The markets are noisy and

usually give the patient trader an opportunity to enter at a better price; this
is the single most important thing one can do to improve a system™s prof-
itability. Controlling transaction costs with limit orders can make a huge
difference in the performance of a breakout model. Even an unsophisticated
limit entry, such as the one used in the tests, can greatly improve trading
results. A more sophisticated limit entry strategy could undoubtedly pro-
vide some very substantial benefits to this kind of trading system.
. Focus on support and resistance, fundamental verities of technical
analysis that are unlikely to be “traded away.” The highest-high/lowest-
low breakout held up better in the tests than other models, even though

it did not always produce the greatest returns. Stay away from popular
volatility breakouts unless they implement some special twist that
enables them to hold up, despite wide use.
. Choose “trendy” markets to trade when using such trend-following mod-
els as breakouts. In the world of commodities, the currencies traditionally
are good for trend-following systems. The tests suggest that the oils and
Coffee are also amenable to breakout trading. Do not rely on indicators
like the ADX for trendiness determination.
. Use something better than the standard exit to close open positions.
Better exit strategies are available, as will be demonstrated in Part III. A
good exit can go a long way toward making a trading system profitable.

Moving Average Models

Moving averages are included in many technical analysis software packages and
written about in many publications. So popular arc moving averages that in 1998,
5 of the 12 issues of Technical Analysis of Stocks and Commodities contained art-
cles about them. Newspapers often show a 50-day moving average on stock charts,
and a 20.day moving average on commodities charts.

To help understand moving averages, it is first necessary to discuss time series,
i.e., series of data points that are chronologically ordered. The daily closing prices
for a commodity are one example: They form a string of “data points” or “bars”
that follow one another in time. In a given series, a sample of consecutive data
points may be referred to as a “time window.” If the data points (e.g., closing
prices) in a given time window were added together, and the sum divided by the
number of data points in the sample, an “average” would result. A moving aver-
age is when this averaging process is repeated over and over as the sampling peri-
od is advanced, one data point at a time, through the series. The averages
themselves form a new time series, a set of values ordered by time. The new series
is referred to as “the moving average of the original or underlying time series” (in
this case, the moving average of the close). The type of moving average just
described is known as a simple moving average, since the average was computed
by simply summing the data points in the time window, giving each point equal
weight, and then dividing by the number of data points summed.
A moving average is used to reduce unwanted noise in a time series so that the
underlying behavior, unmasked by interference, can be more clearly perceived; it
serves as a data smoother. As a smoothing agent, a moving average is a rudimen-
tary low-passJ%er, i.e., a filter that permits low frequency activity to pass through
unimpeded while blocking higher frequency activity. In the time domain, high fre-
quency activity appears as rapid up-and-down jiggles, i.e., noise, and low fre-
quency activity appears as more gradual trends or undulations. Ehlers (1989)
discusses the relationship between moving averages and low-pass filters. He pro-
vides equations and compares several formal low-pass filters with various moving
averages for their usefulness. Moving averages may be used to smooth any time
series, not just prices.

Besides their ability to decrease the amount of noise in a time series, moving aver-
ages are versatile, easy to understand, and readily calculated. However, as with
any well-damped low-pass filter or real-time data smoothing procedure, reduced
noise comes at a cost: lag. Although smoothed data may contain less noise and,
therefore, be easier to analyze, there will be a delay, or “lag,” before events in the
original time series appear in the smoothed series. Such delay can be a problem
when a speedy response to events is essential, as is the case for traders.
Sometimes lag is not an issue, e.g., when a moving average of one time series
is predictive of another series. This occurs when the predictor series leads the series
to be predicted enough to compensate for the lag engendered by the moving aver-
age. It is then possible to benefit from noise reduction without the cost of delay.
Such a scenario occurs when analyzing solar phenomena and seasonal tendencies.
Also, lag may not be a serious problem in models that enter when prices cross a
moving average line: In fact, the price must lead the moving average for such mod-
els to work. Lag is more problematic with models that use the slope or turning
points in the average to make trading decisions. In such cases, lag means a delayed
response, which, in turn, will probably lead to unprofitable trades.
A variety of adaptive moving averages and other sophisticated smoothing
techniques have been developed in an effort to minimize lag without giving up
much noise reduction. One such technique is based on standard time series fore-
casting methods to improve moving averages. To eliminate lag, Mulloy (1994)
implements a linear, recursive scheme involving multiple moving averages. When
the rate of movement in the market is appropriate to the filter, lag is eliminated;
however, the filters tend to “overshoot” (an example of insufficient damping) and
deteriorate when market behavior deviates from filter design specifications.
Chande ( 1992) took a nonlinear approach, and developed a moving average that
adapts to the market on the basis of volatility. Sometimes lag can be controlled or
eliminated by combining several moving averages to create a band-pass filter.
Band-pass filters can have effectively zero lag for signals with periodicities near
the center of the pass-band; the smoothed signal can be coincident with the origi-
nal, noisy signal when there is cyclic activity and when the frequency (or period-
icity) of the cyclic activity is close to the frequency maximally passed by the filter.

All moving averages, from the simple to the complex, smooth time series data by
some kind of averaging process. They differ in how they weigh the sample points
that are averaged and in how well they adapt to changing conditions. The differ-
ences between moving averages arose from efforts to reduce lag and increase
responsiveness. The most popular moving averages (equations below) are the sim-
ple moving average, the exponential moving average, and the front-weighted tri-
angular moving average. Less popular is Chande™s adaptive moving average

ai = (2m + 1 - k) si-k] / ( J?u (2m + 1 - k) ] Front-weighted triangular

In the equations, aj represents the moving average at the i-th bar, si the i-th
bar or data point of the original time series, m the period of the moving average,
and c (normally set to 2 / (m + I)) is a coefficient that determines the effective
period for the exponential moving average. The equations show that the moving
averages differ in how the data points are weighted. In a simple moving average,
all data points receive equal weight or emphasis. Exponential moving averages
give more weight to recent points, with the weights decreasing “exponentially”
with distance into the past. The front-weighted triangular moving average
weighs the more recent points more heavily, but the weights decline in a linear
fashion with time; TradeStation calls this a “weighted moving average,” a pop-
ular misnomer.
Adaptive moving averages were developed to obtain a speedier response. The
goal was to have the moving average adapt to current market behavior, much as
Dolby noise reduction adapts to the level of sound in an audio signal: Smoothing
increases when the market exhibits mostly noise and little movement (more noise
attenuation during quiet periods), and smoothing declines (response quickens) dur-
ing periods of more significant market activity (less noise suppression during loud
passages). There are several adaptive moving averages. One that seems to work
well was developed by Mark Jurik (www.jurikres.com). Another was “VIDYA”
(Variable Index Dynamic Moving Average) developed by Chande.
A recursive algorithm for the exponential moving average is as follows: For
each bar, a coefficient (c) that determines the effective length (m) of the moving
average is multiplied by the bar now being brought into the average and, to the
result, is added 1.0 - c multiplied by the existing value of the moving average,
yielding an updated value. The coefficient c is set to 2.0/(1.0 + m) where m is the
desired length or period. Chande (1992) modified this algorithm by changing the
coefficient (c) from a fixed number to a number determined by current market
volatility, the market™s “loudness,” as measured by the standard deviation of the
prices over some number of past bars. Because the standard deviation can vary
greatly between markets, and the measure of volatility needs to be relative,
Chande divided the observed standard deviation on any bar by the average of the
standard deviations over all bars on the S&P 500. For each bar, he recomputed the
coefficient c in the recursive algorithm as 2.0 / (1.0 + m) multiplied by the rela-
tive volatility, thus creating a moving average with a length that dynamically
responds to changes in market activity.
We implemented an adaptive moving average based on VIDYA that does not
require a fixed adjustment (in the form of an average of the standard deviations over
all bars) to the standard deviation. Because markets can change dramatically in their
average volatility over time, and do so in a way that is irrelevant to the adaptation of
the moving average, a fixed normalization did not seem sound. We replaced the stan-
dard deviation divided by the normalizing factor (used by Chande) with a ratio of
two measures of volatility: one shorter term and one longer term. The relative
volatility required for adjusting c, and hence the period of the adaptive moving aver-
age, was obtained by dividing the shorter term volatility measure by the longer term
volatility measure. The volatility measures were exponential moving averages of the
squared differences between successive data points. The shorter moving average of
squared deviations was set to a period of p, an adjustable parameter, while the peri-
od of the longer moving average was set top multiplied by four. If the longer term
volatility is equal to the most recent volatility (i.e., if their ratio is 1). then the adap-

<< . .

. 11
( : 30)

. . >>