. 5
( 9)


complete time series. The 50-bar average true range is calculated and saved in a
vector (exiratr); it will be used later for the placement of money management stops
and profit targets in the standard exit strategy. The average true range in this vec-
tor (or data series) is also used to normalize the price changes in the code that
immediately follows.
After calculating the average true range, normalized and clipped price
changes are calculated. Each bar in the seriespchg reflects the change in price from
the close of the previous bar to the close of the current bar. The price changes are
normalized by dividing them by the average true range. They are then clipped to
limit the influence of sharp spikes or statistical oudiers. Normalization is performed
because markets change in their volatility over time, sometimes very dramatically.
For example, the current S&P 500 has a price almost five or more times its price 15
years ago, with a corresponding increase in the size of the average daily move. If
the price changes were not normalized and represented in terms of recent volatili-
ty, any seasonal estimate conducted over a number of years would be biased. The
years with greater volatility would contribute more to the estimate than the years
with lesser volatility. In the case of the S&P 500, the most recent years would
almost totally dominate the picture. Using normalized price changes, each year
contributes about equally. Clipping to remove outhers is performed so the occa-
sional, abnormal price change does not skew the estimates. Clipping is performed
at -2 and f2 average true range units.
The modekype selection then determines which calculations occur next. A
modeltype of 1 selects the basic momentum model. The seasonals are computed
from the clipped and normalized price changes, the jackknife is used on the in-
sample period, and the all-past-years technique is used for the out-of-sample period.
These calculations are accomplished with a call to the function called
SeasonalAvg. The series of seasonal estimates is then smoothed using a moving
average of the type, specified by the parameter matype, and of a length set by
avglen, another parameter. A series of average absolute deviations of the seasonal
momentums is then computed. This series is nothing more than a lOO-bar simple
moving average of the absolute values of seasonal momentum, which is used in
later computations of threshold values. The modeltypes of 2,3, and 4 all represent
variations of the crossover model. The seasonals are computed, and then the sea-
sonal estimates of price change for every bar are integrated (a running sum is cal-
culated), creating a new series that behaves almost like a price series. The
synthesized, price-like series represents the movement in prices based on typical
behavior in previous and perhaps future years. Two moving averages are then
computed: ma1 (a moving average of the integrated seasonal time series of
CHAPTER 8 Seamnality 165

matype, having a length of avglen) and ma2 (used as a signal line for detecting
crossovers, calculated by taking a moving average of mal; the kind of average
taken is again specified by matype and the length by avglen). If the modeltype is
3 or 4, additional calculations are performed for models in which confirmation
and/or inversions are detected; in the current study, a 9-bar Fast %K is calculated
and saved in the vector sroch.
The next block of code consists of a loop that steps sequentially through all
bars in the data series. This loop is the same one that has been seen in every pre-
vious chapter on entry strategies. The first few lines of code deal with such issues
as updating the simulator, calculating the number of contracts to trade, and avoid-
ing limit-locked days. The next few lines generate entry signals for all the season-
ality-based entry models. Depending on the value of the modeltype parameter,
either of four different approaches is used to generate entry signals.
A modeltype of 1 represents the basic momentum threshold entry model. A
threshold is calculated by multiplying a threshold-determining parameter (thresh)
by the average absolute deviation of the seasonal momentum over the past 100 bars,
A long signal is issued if the seasonal momentum (savg), on the current bar plus a
displacement parameter (disp), crosses above the threshold. If the seasonal mornen-
turn, at the current bar plus the displacement, crosses below the negative of the
threshold, a sell signal is generated. In other words, if sufficiently strong seasonal
momentum is predicted for a given date, plus or minus some number of days or bars
(disp), then a trade is taken in the direction of the expected movement.
For modeltype 2, which represents the basic crossover entry model, the tnov-
ing averages of the integrated seasonals, at the current bar plus a displacement fac-
tor, are calculated. If the first moving average crosses above the second, a buy is
generated. If it crosses below, a sell is generated. The displacement factor allows
the model to look for such crossings some number of days down the line (ahead
in time). In this manner, the displacement can neutralize the lag involved in the
moving averages. Because the seasonal averages are based on data that is usually
a year old, it is perfectly acceptable to look ahead several days.
A modelrype of 3 represents the same crossover model, but with the addition
of confirmation. Confirmation is achieved by checking the Stochastic oscillator of
the actual price series to determine whether it is consistent with what one would
be expected if the market were acting in a seasonal fashion.
If modeltype is 4, the crossover model, with the addition of confirmation and
inversion, is selected. When there is a modeltype of 4, a buy signal is issued if the
first moving average crosses above the second, and the seasonal pattern is con-
firmed by a Stochastic of less than 25. The model assumes that an inversion has
occurred and issues a sell signal if the Stochastic is over 75. If the first moving
average crosses below the second moving average, and the normal seasonal pat-
tern is confirmed by a Stochastic that is over 75, a sell signal is issued. Inversion
is assumed and a buy signal issued if the Stochastic is less than 25.
Finally, the limit price (limprice) is set at the midpoint of the current bar. The
stop price (slppn™ce), for entry on a stop, is set at the close of the current bar plus
(if entering long) or minus (if entering short) one-half of the 50-bar average true
range. The remaining code blocks are identical to those in previous chapters: They
involve actually posting trades using the specified order (ordertype) and instruct-
ing the simulator to employ the standard exit strategy.

Tests are performed on two seasonality-based entry models: the crossover model
(both with and without confirmation and inversions) and the momentum model.
Each model is examined using the usual three entry orders: enter at open, on limit,
and on stop.
Tables 8-l and 8-2 provide information on the specific commodities that the
model traded profitably, and those that lost, for the in-sample (Table 8-l) and out-
of-sample (Table 8-2) runs. The SYM column represents the market being studied.
The rightmost column (COUNT) contains the number of profitable tests for a given
market. The numbers in the first row represent test identifiers. The last row
(COUNT) contains the number of markets on which a given model was profitable.
The data in these tables provide relatively detailed information about which markets
are and are not profitable when traded by each of the models: One dash (-) indicates
a moderate loss per trade, i.e., $2,000 to $4,ooO, two dashes (--) represent a large loss
per trade, i.e., $4,ooO or more; one plus sign (+) means a moderate profit per trade,
i.e., $1,000 to $2,000, two pluses (+ +) indicate a large gain per trade, i.e., $2,000
or more; and a blank cell means that the loss was between $0 and $1,999 or the prof-
it was between $0 and $1,000 per trade. (For information about the various markets
and their symbols, see Table II-1 in the “Introduction” to Part II.)

Tests of the Basic Crossover Model
A simple moving average (maI) of a specified length (av&n) was computed for the
integrated, price-like seasonality series. A second moving average (ma2) was taken of
the first moving average. A buy signal was generated when ma1 crossed above ma2.
A sell signal was generated when maI crossed below ma2. (This is the same moving-
average crossover model discussed in the chapter on moving averages, except here it
is computed on a predicted, seasonal series, rather than on prices.) The entries were
effected by either a market at open (Test l), a limit (Test 2), or a stop order (Test 3).
Optimization for these tests involved stepping the length of the moving aver-
ages (avglen) from 5 to 20 in increments of 5 and the displacement (disp) from 0
to 20 in increments of 1. For entry at the open, the best performance (in terms of
in-sample risk-to-reward ratio) was achieved with a moving average length of 20
and a displacement of 5. Entry on a limit was best with a length of 20 and a dis-

In-Sample Performance Broken Down by Test and Market

placement of 8. Entry on a stop required a length of 20 and a displacement of 6.
The model seemed to prefer longer moving averages (more smoothing), and some-
what earlier signals were required by the limit order when compared with the stop
or market-at-open orders.
In-sample, none of the results were profitable when both long and short posi-
tions were traded. However, the losses were much smaller on a per-trade basis than
those observed in many of the other tests presented in earlier chapters. The stop
order performed best. The market-at-open order performed worst. The limit order
came in not too far behind the stop. For both the stop and limit orders, trading was
Out-of-Sample Performance Broken Down by Test and Market

i_ i_ i_ i_ /_ i- i- i_ i+ i++ I_ I++ 1
. . ++ ++ ++ _ - - ++ + -
JY 1 I-
^.. I I II
- -
- - -I - ++
b" .c
˜0 _ - _ _ _ A- I.. I_ I_ I_ I- /- / 0
+ + ++ I- - I++ /- I- I- ,
CL .
,++ ,- , ,++ ,- ,- ,- ,
HO - ++ - ++
++ ++ ++ - - :
H" ++ ++ ++ ++ I
or + *+ ** .˜˜ I- I+ I- /- I I- I-
+ _ .- - + ++ ++ ++ ++
s il !_
, ++ ++ ++ ++ 8
I- I-
- - _
+ ++ ++ - - 0

actually profitable for long positions. In all cases, ZO-bar moving averages provided
the best results, but the displacement varied depending on the order. A look-ahead
of 5 bars was optimal for entry at tbe open, 8 bars for entry on a limit, and 6 bars
for entry on a stop. This makes sense, in that one would want to post a limit order
earlier than a market-on-open order so as to give the limit some time to be filled.
Out-of-sample, the results showed the same ordering of overall performance as
measured by the average profit per trade ($TRD), with the stop order actually pro-
ducing a positive return of $576 per trade, representing an 8.3% annual retam on
account; this system, although not great, was actually profitable on recent data. For
the stop entry, both in- and out-of-sample trading was profitable when only the long
trades were considered, but the short side lost in both samples. This is a pattern that
has been observed a number of times in the various tests. The percentage of wins
for all orders and samples was between 40 and 43%.
It is interesting that, even for the losing variations, the losses here were much
smaller than what seems typical for many of the models so far tested.
With entry at the open, equity declined until November 1988. It retraced
approximately 50% of the way until July 1989, making a small U-shaped forma-
tion, with the second of a double-top around November 1990. Equity then declined
rather steeply until November 1992 and, in a more choppy fashion, throughout tbe
remainder of the in-sample period and the first third of the out-of-sample period.
The decline ended in April 1996 when equity gradually climbed throughout the
remainder of the out-of-sample period.
With entry on a limit, equity was fairly flat until January 1987, rose very
rapidly to a peak in May 1987, and then declined until November 1992. From then
through July 1994, equity rose steeply. Afterward, choppy performance was
observed with no significant trend.
The stop order produced strong equity growth until June 1988. Equity then
declined in a choppy fashion through most of the in-sample period and about the
first quarter of the out-of-sample period. It reached bottom in December 1995 and
then rose sharply through the end of the out-of-sample period in February 1999.
Across all three entry orders, the best-performing market was Unleaded
Gasoline, in which strong, consistent profits were observed in both samples.
Palladium was also a strong market for this model: Both the entry at open and entry
on limit produced profits in- and out-of-sample, with the entry on limit having
strong profits in both samples, and the entry on stop producing strong profits out-
of-sample and neutral results in-sample. Live Hogs was another good market to
trade seasonally: Every order type yielded profits in-sample, while two of the three
order types yielded profits out-of-sample; both the limit and stop orders were prof-
itable in both samples. Yet another good market to trade with this model is Coffee:
All three orders produced in-sample profits, while the market at open and stop
orders produced strong profits out-of-sample. Finally, Cotton did not do too badly:
The stop order yielded strong profits in both samples, and no order resulted in
strong losses in either sample. Finding good performance for Unleaded Gasoline is
totally in accord with expectations. What is moderately surprising is that Heating
Oil, for which there is a strong seasonal demand characteristic, was only profitable
in both samples when using the limit order. Coffee also traditionally has strong sea-
sonal patterns caused by, e.g., recurrent frosts that damage crops, create shortages,
and drive up prices. Surprisingly, the wheats did not produce many profits in-sample.
The only exception was a small profit for Minnesota Wheat with a limit order. More
profits in the wheat group were seen out-of-sample, where the limit order led to
profitable trading in all three wheat markets and the stop order in Kansas Wheat.
A number of other markets showed profitable, but less consistent, trading across
sample and order type. Again, it is impressive to see the great number of markets
that trade well across both samples, especially when compared with many of the
other models that have been tested in the preceding chapters.
It is also interesting that there is a discrepancy between the performance of the
seasonality model in the current tests and in our earlier tests of the S&P 500 (Katz
and McCormick, April 1997). The differences are probably due to such factors as
tuning. In the earlier tests, the moving averages were specifically toned to the S&P
500; in the current tests, they were tuned to the entire portfolio. Moreover, com-
pared with other markets, the seasonal behavior of the S&P 500 appears to involve
fairly rapid movements and, therefore, requires a much shorter moving average to
achieve optimal results. Finally, the earlier tests did not use separate exits and so a
seasonal trend lasting several weeks could be captured. In the current test, only the
first 10 days could be captured, after which time the standard exit closes out the
trade. It is likely that the performance observed, not just on the S&P 500, but on all
the markets in the portfolio, would be better if the standard exit were replaced with
an exit capable of holding onto a sustained trend.

Tests of the Basic Momentum Model
For the momentum model, the unintegrated seasonal price change series was
smoothed with a centered simple moving average of a specified length (avglen).
The centered average introduces no lag because it examines as many future data
points, relative to the current bar, as it does past data points. The use of a centered
moving average is legitimate, because the seasonality estimate at the current bar is
based on data that is at least 1 year away. For this series of smoothed seasonal
price changes, a series of average absolute deviations was computed: To produce
the desired result, the absolute value for each bar in the smoothed seasonal series
was computed and a loo-bar simple moving average was taken. A buy signal was
issued if the seasonal momentum, at the current bar plus some displacement
(disp), was greater than some multiple (thresh) of the average absolute deviation
of the seasonal momentum. A sell signal was issued if the seasonal momentum, at
the same displaced bar, was less than minus the same multiple of the average
absolute deviation. Entries were executed at the open (Test 4), on a limit (Test 5),
or on a stop (Test 6).
Optimization was carried out for the length of the moving averages, the dis-
placement, and the threshold. The length was stepped from 5 to 15 in increments
of 5; the displacement from 1 to 10 in steps of 1; and the threshold from 1.5 to 2.5
in increments of 0.5. The best in-sample performance was observed with a length
of 15 and a threshold of 2.5, regardless of entry order. For the market at open and
for the stop a displacement of 2 was required. The limit worked best with a dis-
placement of 1. In agreement with expectations, these displacements are much
smaller than those that were optimal for the crossover model where there was a
need to compensate for the lag associated with the moving averages.
Overall, the results were much poorer than for the seasonal crossover
model. In-sample, profitability was only observed with the stop order. No prof-
itability was observed out-of-sample, regardless of the order. The losses on a per-
trade basis were quite heavy. Interestingly, the long side performed less well
overall than the short side. This reverses the usual pattern of better-performing
long trades than short ones.
With both entry at open and on limit, equity declined in a choppy fashion
from the beginning of the in-sample period through the end of the out-of-sample
period. The decline was less steep with the limit order than with entry at open.
With the stop order, equity was choppy, but basically flat, until May 1990, when
it began a very steep ascent, reaching a peak in September 1990. Equity then
showed steady erosion through the remaining half of the in-sample and most of
the out-of-sample periods. The curve flattened out, but remained choppy, after
April 1997.
The model traded the T-Bonds, IO-Year Notes, Japanese Yen, Light Crude,
Heating Oil, Unleaded Gasoline, Live Hogs, and Coffee fairly well both in- and out-
of-sample. For example, T-Bonds and lo-Year Notes were very profitable in both
samples when using either the limit or stop orders. JapaneseYen performed best with
the stop, showing heavy profits in both samples, but was profitable with the other
orders as well. The same was true for Light Crude. Heating Oil showed heavy prof-
its with the entry at open and on stop in both samples, but not with entry on limit,
This was also true for Unleaded Gasoline. Live Hogs performed best, showing heavy
profits in both samples, with entry at open or on stop. This market was profitable
with all three orders in both samples. Coffee was also profitable with all three orders
on both samples, with the strongest and most consistent profits being with the stop.
For the most part, this model showed losses on the wheats.
In-sample, 15 markets were profitable to one degree or another using a stop,
13 using a market order at the open, and 9 using a limit. Out-of-sample, the num-
bers were 15, 16, and 16, respectively, for the stop, open, and limit.
Even though the momentum model performed more poorly on the entire
portfolio, it performed better on a larger number of individual markets than did the
crossover model. The momentum model, if traded on markets with appropriate
seasonal behavior, can produce good results.

Tests of the Crossover Model with Confirmation
This model is identical to the basic crossover model discussed earlier, except that
entries were only taken if seasonal market behavior was contirmed by an appropri-
ate reading of the Fast %K Stochastic. Specifically, if the seasonal crossover sug-
gested a buy, the buy was only acted upon if the Fast %K was below 25%; i.e., the
market has to be declining or near a bottom (as would be expected on the basis of
the seasonal buy) before a buy can occur, Likewise, a seasonal sell was not taken
unless the market was near a top, as shown by a Fast %K greater than 75%. As
always, the standard exits were used. Entries were executed at the open (Test 7), on
a limit (Test S), or on a stop (Test 9).
Optimization for these tests involved stepping the length of the moving averages
(avglen) from 5 to 20 in increments of 5 (PI) and the displacement (disp) from 0 to
20 in increments of 1 (P2). For entry at the open, a moving average length of 15 and
a displacement of 7 were best. Entry on a limit was best with a length of 15 and a dis-
placement of 6. Entry on a stop required a length of 20 and a displacement of 9.
On a per-trade basis, the use of confirmation by the Fast %K worsened the
results for both sampling periods when entry was at the open or on a limit; with
both of these orders, trades lost heavily in both samples. When the confirmed sea-
sonal was implemented using a stop order for entry, relatively profitable perfor-
mance in both samples was seen. In-sample, the average trade pulled $846 from
the market, while the average trade pulled $1,677 out of the market in the verifi-
cation sample. In-sample, 41% of the trades were profitable and the annual return
was 5.8%. The statistical significance is not great, but at least it is better than
chance; both long and short positions were profitable. Out-of-sample, 44% of the
trades were winners, the return on account was 19.6%, and there was a better than
77% chance that the model was detecting a real market inefficiency; both longs
and shorts were profitable. Compared with other systems, the number of trades
taken was somewhat low. There were only 292 trades in-sample and 121 out-of-
sample. All in all, we again have a profitable model. Seasonality seems to have
validity as a principle for entering trades.
The equity curve for entry at open showed a gradual decline until May 1989.
It was then fairly flat until August 1993, when equity began to decline through the
remainder of the in-sample period and most of the out-of-sample period. The limit
order was somewhat similar, but the declines in equity were less steep. For the stop
order, the picture was vastly different. Equity declined at a rapid pace until May
1987. Then it began to rise at an accelerating rate, reaching a peak in June 1995,
the early part of the out-of-sample period. Thereafter, equity was close to flat. The
greatest gains in equity for the stop order occurred between June 1990 and May
1991, betweenMay 1993 and September 1993, and between January 1995 and June
1995. The last surge in equity was during the out-of-sample period.
Compared with the previous two models, there were fewer markets with con-
sistent profitability across all or most of the order types. Lumber was the only mar-
ket that showed profitability across all three order types both in- and
out-of-sample. Unleaded Gasoline yielded profits across all three order types in-
sample, and was highly profitable out-of-sample with entry at open or on stop.
Coffee and Cocoa were profitable for all order types in-sample, but profitable only
for the stop order out-of-sample. For the stop order, the NYFE, Silver, Palladium,
CHAPIFR 8 Seasanality 173

Light Crude, Lumber, and Coffee were highly profitable in both samples. Again,
there was no profitability for the wheats. There was enough consistency for this
model to be tradable using a stop order and focusing on appropriate markets.

Tests of the Crossover Model with Confirmatlon and
This model is the same as the crossover model with confirmation. However, addi-
tional trades were taken where inversions may have occurred; i.e., if a seasonal
buy was signaled by a crossover, but the market was going up or near a top (as
indicated by the Fast %K being greater than 75%), a sell signal was posted. The
assumption with this model is that the usual seasonal cycle may have inverted or
flipped over, where a top is formed instead of a bottom. Likewise, if the crossover
signaled a sell, but the Fast %K indicated that the market was down by being less
than 25%, a buy was posted. These signals were issued in addition to those
described in the crossover with confirmation model. Entries were executed at the
open (Test IO), on a limit (Test 11). or on a stop (Test 12).
Optimization for these tests involved stepping the length of the moving
averages (avglen) from 5 to 20 in increments of 5 (PI) and the displacement
(disp) from 0 to 20 in increments of 1 (PZ). For entry at the open, a moving-
average length of 15 and a displacement of 2 were best. Entry on a limit was
best with a length of 20 and a displacement of 4. Entry on a stop again required
a length of 20 and a displacement of 9.
For entry at the open, the equity curve showed a smooth, severe decline from
one end of the sampling period to the other. There was a steeply declining equity
curve for the limit order, although the overall decline was roughly half that of the
one for entry at open. For entry on stop, the curve declined until May 1987. It then
became very choppy but essentially flat until August 1993. From August 1993
until June 1995, the curve steeply accelerated, but turned around and sharply
declined throughout the rest of the out-of-sample period. Adding the inversion ele-
ment was destructive to the crossover model. The seasonal patterns studied appar-
ently do not evidence frequent inversions, at least not insofar as is detectable by
the approach used.
Adding the inversion signals to the model dramatically worsened perfor-
mance on a per-trade basis across all entry orders, Losses were seen for every
combination of sample and order type, except for a very small profit with a stop
in the out-of-sample period. There were no markets that showed consistently good
trading across multiple order types in both samples, although there were isolated
instances of strong profits for a particular order type in certain markets. The NYFE
again traded very profitably with a stop order, as did IO-Year Notes, in both sam-
ples. Platinum and Silver also traded well in- and out-of-sample with a stop order.
Soybeans traded very profitably with a stop order in-sample, but only somewhat
profitably out-of-sample. There were consistent losses, or no profits at all, across
all orders and samples for the wheats.

Summary Analyses
Results from the different tests were combined into one table and two charts for
overall analysis. Table 8-3 provides performance numbers broken down by sample,
entry order, and model. For each model, there are two rows of numbers: The first
row contains the figures for annualized return-on-account, and the second row con-
tains the average dollar profit or loss per trade. The two rightmost columns contain
averages across all order types for the in-sample and out-of-sample performance.
The last two rows contain the average across all models for each type of order.
Of the three types of orders, it is evident that the stop performed best. The
limit and entry at open performed about equally well, but much worse than the stop.
In fact, for the stop, the average across all four models actually showed a positive
return and small profits on a per-trade basis both in-sample and out-of-sample.
When examining models averaged across all order types, the in-sample per-
formance was best using the crossover-with-confirmation model and worst for
the crossover-with-confirmation and inversion model. Out-of-sample, the basic
crossover model showed the best performance, while the crossover with confir-
mation and inversion had the worst.
As can be seen, in-sample the best performance was observed when the stop
order was used with the crossover-with-confirmation model. This is also the com-
bination of order and model that performed best out-of-sample.


Performance of Seasonal Entry Models Broken Down by Model,
Order, and Sample
In earlier chapters, other types of entry models were tested and the limit
order was usually found to perform best. In the case of seasonality, the stop order
had a dramatic, beneficial impact on performance, despite the additional transac-
tion costs. Previously it appeared that countertrend principles may perform better
when combined with some trend-following or confirming element, such as an
entry on a stop. lt seems that, with seasonality, the kind of confirmation achieved
by using something like a stop is important, perhaps even more so than the kind
achieved using the Fast %K. In other words, if, based on seasonal patterns, the
market is expected to rise, confirmation that it is indeed rising should be obtained
before a trade is entered.
Overall, it seems that there is something important about seasonality: It has
a real influence on the markets, as evidenced by the seasonality-based system with
the stop performing better, or at least on par, with the best of the entry models.
This was one of the few profitable entry models tested. Seasonal phenomena seem
to have fairly strong effects on the markets, making such models definitely worth
further exploration.
It would be interesting to test a restriction of the seasonality model to mar-
kets on which it performed best or to markets that, for fundamental reasons, would
be expected to have strong seasonal behavior. From an examination of the market-
by-market analysis (discussed earlier in the context of individual tests), there is
quite a bit ofprimafacie evidence that certain markets are highly amenable to sea-
sonal trading. When breakout models were restricted to the currencies, dramatic
benefits resulted. Perhaps restricting seasonal models to appropriate markets
would be equally beneficial.
When looking over all the tests and counting the number of instances in
which there were significant, positive returns, an impression can be obtained of
the markets that lend themselves to various forms of seasonal trading. Across all
tests, Coffee had one of the highest number of positive returns in-sample and no
losses-true also for its out-of-sample performance. Coffee, therefore, appears
to be a good market to trade with a seasonal model, which makes sense since
Coffee is subject to weather damage during frost seasons, causing shortages and
thus major increases in price. For Coffee, I1 out of the 12 tests in-sample and 8
out of 12 tests out-of-sample were profitable. Unleaded Gasoline was another
commodity that had a large number of positive returns across all tests in both
samples: in-sample 8 and out-of-sample 11. Light Crude had 8 in-sample but
only 4 out-of-sample positive returns. Live Hogs was another market showing a
large number of positive returns in both samples.
Figure 8-l illustrates equity growth broken down by type of order and aver-
aged across all models. As can be seen, the stop order performed best, while entry
at open performed worst, and the limit order was in between the two.
Figure 8-2 shows equity growth broken down by model, with averaging done
over orders. The crossover-with-confirmation model had the overall best perfor-
mance, especially in the later half of the testing periods. The basic crossover model

Equity Growth as a Function of Order Type

started out the best, but after 1990, performance deteriorated. However, the equity
trend seemed to reverse to the upside after 1995 in the out-of-sample period, a time
when the other models tended to have declining equity when considered across all
order types.

These explorations into seasonality have demonstrated that there are significant
seasonal effects to be found in the markets. Decisions about how to trade can be
made based on an examination of the behavior of the market at nearby dates for a
number of years in the past. The information contained on the same date (or a date
before or a date after) for a number of years in the past is useful in making a deter-
mination about what the market will do in the near future. Although the seasonal
effect is not sufficient to be really tradable on the whole portfolio, it is sufficient
to overcome transaction costs leading to some profits. For specific markets, how-
ever, even the simple models tested might be worth trading. In other words, sea-
sonal phenomena appear to be real and able to provide useful information. There
are times of the year when a market rises and times of the year when a market falls,

Equity Growth as a Function of Model

and models like those tested in the chapter can capture such seasonal ebbs and
flows in a potentially profitable manner.
Seasonality, as defined herein, has been demonstrated to be worthy of seri-
ous consideration. If the kinds of simple entry models illustrated above are elabo-
rated by adding confirmations and by using an exit better than the standard one,
some impressive trading results are likely to result.


a Recurrent seasonal patterns appear to have real predictive validity and are
definitely worthy of further study.
n The usefulness of seasonal patterns for trading varies from market to

market, with certain markets being particularly amenable to seasonal trad-
ing. Trading a basket of seasonally reactive markets could be a highly
lucrative endeavor.
n To obtain the best results, raw seasonal information should be combined

with some form of confirmation or trend detection. Making use of additional
information can improve the performance of an unadorned seasonal model.

Lunar and Solar Rhythms

I n the previous chapter, seasonal rhythms were defined as recurrent phenomena
connected to the calendar. Seasonality involves the orbital position and tilt of the
earth in relation to the sun. Every year, on approximately the same date, the earth
reaches a similar phase in its movement around the sun. Other solar bodies gener-
ate similar rhythms, most notably the moon, with its recurrent phases, and
“sunspot” phenomena. In this chapter, market cycles determined by external forces
will again be analyzed, but this time the relationship between market behavior and
planetary and solar rhythms will be examined.

Discussion of planetary influences conjures up images of what some regard as
astrological nonsense. However, it seems arrogant to dismiss, a priori, the™possible
infhrence of lunar, solar, and other such forces, simply because of the pervasive
belief that astrology (which Webster defines as “the pseudo-science which claims
to foretell the future by studying the supposed influence of the relative positions of
the moon, sun, and stars on human affairs”) is ludicrous. Such beliefs are often
based on the absence of knowledge. But what is already known about so-called
astrology, especially in the form of planetary and solar effects on earthly events?
Scientists have demonstrated some correlation between personality and plan-
etary positions. In one study (Mayo, White, and Eysenck, 1978), published in the
Journal of Social Psychology, researchers tested the claim that introversion and
extroversion are determined by the zodiac sign a person is born under. A personal-
ity test was given to 2,324 individuals to determine whether they were introverts or
extroverts. The hypothesis was that individuals born under the signs Aries, Gemini,
Leo, Libra, Sagittarius, and Aquarius were likely to be extroverts, while those under
Taurus, Cancer, Virgo, Scorpio, Capricorn, and Pisces, tend to be introverts, The
results of the study were significantly consistent with the hypothesis, as well as
with other related studies (Gauquelin, Gauquelin, and Eysenck, 1979).
It is also known that the moon™s gravitational force influences the aquatic,
terrestrial, and atmospheric tides of the earth. The moon has been shown to affect
when coral spawn, when oysters open, when certain crimes are likely to be more
prevalent, and when “lunatics” (derived from the Latin word “luna,” which trans-
lates as “moon”) become more agitated. Moreover, women give birth and/or ovu-
late more frequently during the full moon.
When faced with the facts, the possibility of the moon influencing market
behavior is not so outlandish. Even Larry Williams (1979) found that the prices of
Silver, Wheat, Corn, and Soybean Oil rally when the moon is full and drop when
the moon is new!
Every amateur radio operator knows, “sunspots” exert a major influence on
long distance radio transmission. Sunspots appear as dark spots on the surface of
the sun. One theory is that they are produced by peculiarities in the gravitational
influences of neighboring planets on the Sun™s tidal rhythms. Another theory
explains sunspots as due to shifts in the sun™s magnetic poles. During high sunspot
activity, “skip” occurs: Short wavelength radio transmissions, which normally
carry only as far as line-of-sight, bounce off the ionosphere and may span dis-
tances of up to several thousand miles. Many have experienced this phenomenon
when watching television: A signal from a distant station will appear superim-
posed on a local one. Conversely, during low solar activity, long distance commu-
nication is much less likely at short wavelengths; anyone trying to achieve “DX”
(long distance communications), will need longer wavelengths.
Sunspot activity and solar flares are also correlated with terrestrial magnetic
storms that can disrupt sensitive electronics equipment and even knock out power
grids. Magnetic storms induced by solar eruptions in March I989 shut down the
Hydra-Quebec power system, blacking out parts of Montreal and Quebec for up
to nine hours (Space Science Institute, 1996).
Changes in solar activity are even suspected of causing major fluctuations in
the earth™s climate, as when the “Little Ice Age” occurred in the 1600s after 100
years of attenuated solar activity (Center for Solar and Space Research, 1997).
More relevant to traders: Edward R. Dewey, who established the Foundation
for the Study of Cycles in 1940, believed that there was a relationship between
sunspots and industrial production. Perhaps such a relationship is mediated by cli-
matological effects on agriculture, making it worthwhile to examine the correla-
tion between solar activity and agricultural commodity prices.
Our interest in sunspots peaked upon noticing that, during 1987, there
were only three days when the sunspot number (an index of solar activity) was
greater than 100. Two of those days were October 15 and 16! The probability
of the correspondence between Black Monday and heightened solar activity is
less than one in 100.
In the section below on “Lunar Cycles and Trading,” the impact of the lunar
phase on prices is examined. The impact of solar activity is examined in “Sunspots
and Market Activity.”

In a previous study (Katz and McCormick, June 1997), we found that lunar cycles
could be used to profitably trade the NYFE. From 1990 to 1997, a simple lunar
system produced a net profit of $75,550. There were 170 trades, 60% profitable.
The average one contract trade made $444.41; the return-on-account was 365%
(not annualized). The long side performed better (520%) than the short (-37%).
The signals often marked turning points to the very day. Silver also responded
well, with signals picking off exact tops and bottoms; both longs and shorts were
profitable with a 190% return over the same period as for the NYFE. Even Wheat
traded profitably long and short with a 242% return. Given only one parameter (a
displacement in days since the full or new moon), and many trades, the results are
impressive and probably robust.
Our results were encouraging enough to justify further study of entries based
on these phenomena. The study will involve the phases of tbe moon, i.e., full
moon, fast quarter, last quarter, new moon, and all phases in between. Can the
lunar phase predict whether the market is bottoming or topping? Do bottoms (or
tops) form at the time of the full moon, or perhaps five days before the full moon,
or at the new moon? Since the lunar cycle may affect different markets differently,
the adaptive approach taken with seasonality is again used.


There are many ways to time entries based on the lunar rhythm. Two approach-
es are employed in the tests: momentum and crossover. To calculate momentum,
a series of price changes is computed and then a centered smoothing (one that
induces no delays or phase shifts) is applied. For normalization, each price
change in the smoothed series is divided by the 50-day average true range. For
each bar, we ask: “What phase is the moon in currently?” As many past instances
as possible are found in which the moon was in the identical phase and the
momentum of prices on the corresponding bars is examined. The average of the
momentums becomes the value placed in the lunar momentum series, which
reflects the expected rate-of-change (momentum) in prices at a given time based
on historical price movement at the phase of the moon existing on the current
bar. Each number in the lunar momentum series is determined only by events
about 27 or more days ago; this is why centered smoothing, and other techniques
that look ahead in time relative to any specified bar, are permissible. Entries are
taken when momentum crosses above a positive threshold (a buy signal is
issued), or when momentum crosses below a negative threshold (a sell is post-
ed). Buying or selling can take place at the open, on a limit, or on a stop. The
momentum calculations and generation of entries closely follow those for sea-
sonality, but, instead of looking to previous instances of the same date in earlier
years, previous instances of the moon having a phase identical to that on the tar-
get bar are examined.
Entries can also be generated by computing the price differences, normaliz-
ing them, and integrating the series to obtain a pseudo-price series based on pre-
vious instances of the correct lunar phase. A moving average crossover model is
then applied to that series. Because the value at any bar in the series is determined
only by bars roughly 27 or more days ago, the delay in the crossovers can be com-
pensated for by looking ahead a small number of bars.
Both methods are adaptive in that no specific information is required
about the phase of the moon on which to place a buy or sell order. The adaptive
quality is important because different markets respond to the moon differently,
as seen in our earlier study. Both methods differ from the previous research,
where buys or sells occurred a fixed number of days before or after a full or a
new moon.
Several rules for handling confirmations and inversions are also tested to
determine whether better results can be obtained over the basic models. An exam-
ple of co@mation is the following: If a buy signal occurs on a given bar and
everything behaves as expected, the market should bottom around the time of the
buy; if instead it tops, the buy signal might be suspect, i.e., the market may not
be adhering to its typical seasonal or lunar timing. The crossover with cunfirmu-
rion model implements the crossover model with an additional rule that must be
satisfied before a buy or sell can be issued. lf a buy signal occurs, the Slow %K
on the signal bar must be less than 25%, meaning the market is near the bottom
of its recent historical range. Likewise, if the model generates a sell signal, a
check is made to see whether Slow %K is greater than 75%, indicating that the
market is near the top of its range, as would be expected if it is responding to
lunar influence. The con@nation and inversion model adds another element: If
a buy is signalled, and the market is near the top of its range (Slow %K greater
than 75%), then an inversion is assumed and, instead of issuing a buy, a sell order
is posted. If a sell is signalled, but the market is near the bottom of its recent
range, a buy order is issued.
The characteristics of lunar entries are similar to seasonal entries: Both are
predictive, rather than responsive, and thus lend themselves to countertrend trad-
ing. And, as with any predictive entry, they may be out of tune with market behav-
ior. As with seasonal entries, cycle or rhythm inversions may occur.
All tests were performed using lunar entries to trade a diversified portfolio. Can
lunar entry models result in profitable trades? How have such models fared over
time? Have they become more or less profitable in recent years? The tests will
address these questions.
The exits are the standard ones. Entry rules are discussed when presenting
individual tests. Trades are closed out when either an entry in the opposing direc-
tion takes place, or when the standard exit closes the trade, whichever comes first.
The following code implements the lunar-based entry models that underlie all tests.
if˜mode = = 1) ( // jacknife mode
fmc(i = 1; i c= n; i*+) ( ,, for each t a r g e t bar
cnt = 0;
sum = 0.0;
far(j = 2; j c 1000; j++) ( /I walk b a c k w a r d s
date = ˜unamquivmte (dt [il, -j) i // source d a t e
i f lsdate c dt (31) b r e a k ; I/ run to beginning
// find index
hunt˜dt, n, Klate, w;
if cs&lte > dt K 1 !c++;
sum += "[kl ; ,, aCC"m"late average
far(j = 2; j < 1000; j++) ( I/ walk forwards
sdate = LunarEquivDate Cdtlil, j); ,, sou*ce date
ifcsdate > In) break; // a v o i d 00s d a t a
// f i n d i n d e x
huntcdt, n, sdate, f&l i
if (sdate > dt Lkl 1 !c++;
cntit; 8”nl += “Kc1 ; // accumulate average

a [il = sum / Cent + tiny) ; //
else if˜mode = = 2) ( I/
for(i = 1; i <= n; i++) [ //
sun = 0.0; cnt = 0;
walk backwards
for(j = 2; j c 1000; j++l [ //
if(cnt >= m) break; // e n o u g h c a s e s run
sdat,e = LunarEquivDate(dt Lil , -j); ,, source date
i f (sdate c dtL31) break;r u n to beginning
hunt˜dt, n, s&ate, &k); I/ find index
if (date > at w 1 !c++;
cnttt; S”rn += vlkl; //
for(j = 2; j c 1000; j++) [ /I
if(cnt >= ml break; J/
sdate = LunarEquivDate Cdt [il ,
hunttdt, n, sclate. &k, ; //
if(sdate a dtkll ki+;
cnt++; sum += “Lkl ; I/
a[il = s u m / (cnt + t i n y ) I/
static void yodel (float *parms, float *dt, float *op. float 'hi.
float *cl=, float *vol. float *oi, float *dlrv, int nb.
float *lo,
TRDSIM .Lts, float %3&s) {

I/ Implements a variety of lunar-cycle trading models.
,, File = X13mod01.c
vector ˜l..MAxPRMI of parameters
// p==ms
vector [l..llb, Of dates in YYmDD form
// dt
vector [I. .nbl of opening prices
/I opn
vector Ll..nbl of high prices
// hi
YeCtOr [I. .rlb, Of low prices
// lo
vector Ll. .*I of closing prices
// ClS
Ye&or Ll. .nbl Of volumes
// VOl
vector [l..llb, Of open interest numbers
// oi
// dk" vector Il..nbl of average dollar volatilitiea
number of bars in data series or vectors
// nb
trading simulator class instance
// ts
vector Ll..nb, Of closing equity levels
/I eqcls

,, declare local Scratch variables
static int rc, cl,, ncontracts. maxhold. ordertrpe. signal;
static int avglen, disp, k, modeltype, matype, mktindx;
static float mmstp. ptlim. stpprice. limprice, tmp, thresh;
static float exitatr MAXBAR+ , savgM+XBAR+ll ;
static float Ina1 [MnxBan+ll, ma* mmxBAR+11, stochn"lAxBAR+ll;
static float *exitatrtabLMIUhlKT+ll, *savgtabWAXMKT+ll;

// copy parameters to local variables for clearer reference
avg1en = pans[ll; // length of moving averagea
= parms[*l ; // displacement factor
-d,resh = parmsl31; ,, threshold for mm"ent"m models
matype = parms [-II ; ,, average type:
// l=simple moving average
11 2=exponential
/I 3=front-weighted triangular
/, 4=criangu1ar
// S=centered simple
// 6=centered exponential
/I 7=centered triangular
modeltype = parms L81 ; ,, model type:
,, 1=momentunl
,/ 2=crossoYer
I/ 3=crossover with confirm
I/ 4=˜rossover with confirm and inversions
ordertype = parms[9l; ,, entry: 1=open. 2=1imit, 3=stop
maxhold = 10; // maximum holding period
I/ profit target in volatility units
ptlim = 4;
mstp = 1; /I stop loss in volatility units

/I Perform whale-series computations that are unaffected by
// any parameter*. These may be performed once for each
// market, and saved in tables for repeated "se, thereby
// dramatically reducing execution time.
titindx = ts.modelo; /I market index
// allocated ?
if (exitatrtab hktindxl == NULL1 (
exitaCrtablmktindx1 = vector(l, nbl ; // exitatr table
savgtab lmktindxl = vector (1, nbl ; // savg table
AvgTrueRanges (exitafrtab [tnktindxl ,
hi, lo. ClS, 50, nb) i ,, SO-bar atr
float *p&g = vector(1, "b,i ,, .cx?.-LCh vector
pctlg˜1, = 0.0;
fcx(Cb = 2; Cb <= nb; cb++) (
tmp = ClS˜Cbl ClsLch-11; /I price change
tmp /= exiearrtab[titindxl L&l; // normalization
pchg[cbl = clipctmp, -2.0, 2.0); // clipping
,, lunar seasonal
p&g, dt, 2, 60, nbb);
free_"ector(pchg. 1, nb);
prinff(wkt: $d\n", mktindx); ,, show progress

// perform other whole-series computations
memcpy(exitatr, exitatrtabLmktindx1, sizeof(floati*nb);
memcpy(savg. sa"gtabImktindxl. sizeof(floatl*nbi
swiCch(modeltypeJ (
/I series for momentum model
case 1:
/I smoothing avg
for(cb = 1; cb <= nb; cbtt)
ma2Lcbl = fabskz"g[cblI;
/I avg deviation
Mo"?+"gmal, ma*, 1, 100, n!J);
case 2: case 3: case 4: /I series for cro6so"er models
forccb = 2; cb c= nb; cb++)
sa"gLcbl += sa"gLcb-11; // integration
I/ smoothing avg
M˜"A"gLma2,mal,matype,a"glen,nb˜: I/ croesover avg
if(modeltype == 3 11 modeltype == 4) /I stochastic 08c
StDchOBc(stoch,hi.lo,˜˜*,˜,˜,˜b˜; // g-bar Past %K
default: nrerrori"˜˜˜˜SMOD: invalid modeltype");
Several functions required to calculate lunar rhythms for any market in an
adaptive manner precede the code implementing the trading model. The imple-
mentation function, Model, follows the standard conventions: After declarations,
parameters are copied into local variables for easier reference. Comments indicate
what the parameters control. The hext block computes the SO-bar average true
range (exitatrrab), used in the exits and for normalization, as well as the lunar sea-
sonal series (savgrab), the predicted price changes for each bar. These series are
computed only once for each market and tabled; this may be done as no relevant
parameters change from test to test as Model is repeatedly called. A second block
calculates the model-specific time series needed to generate entry signals. If mod-
eltype is 1, the simple momentum model is used; 2 = the crossover model; 3 =
crossover with confirmation; and 4 = crossover with confirmation and inversion.
Among the series that may be computed are: smoothed lunar momentum, integrat-
ed lunar momentum (price-like series), moving averages for the crossover model,
and Slow %K for models involving confnmation and inversion. Depending on
modeltype, several other parameters may become important. One parameter,
avglen, controls the length of all moving averages: For the momentum model, it
controls the length of the centered triangular moving average; and for the crossover
models, it controls the length of the two moving averages those models require.
Another parameter, disp, sets the displacement: This is the look-ahead used, e.g., to
compensate for the lag of the moving averages. The parameter thresh is the thresh-
old used in the momentum model for both short and long trades (short trades use
the negative of thresh). Variable matype controls the type of certain moving aver-
ages: 1 = simple, 2 = exponential, 6 = centered exponential, 7 = centered trian-
gular; other moving averages are available, but are not used in the analyses. After
all series are calculated, a loop is entered that steps, day by day, through the mar-
ket to simulate trading. This loop contains code to update the simulator, determine
the number of contracts, avoid trading on limit-locked days, etc. The next block,
appearing within the bat-stepping loop, generates entry signals. The rules are deter-
mined by modeltype. Finally, a block handles posting the appropriate trading order,
as selected by the ordertype: 1 = entry at open, 2 = on limit, 3 = on stop.

Tests were run on four entry models: crossover, momentum, crossover with contir
mation, and crossover with confirmation and inversions. Each model was studied
with entry at open, on limit, and on stop. Table 9-l summarizes the results of all tests,
broken down by sample, entry order, and model. For each model, there is a row of
numbers containing the annualized portfolio return, and a row with the average port-
folio dollar profit or loss per trade. Averages across all order types for in-sample and
out-of-sample performance are in the two rightmost columns. The last two rows con-
tain the average across aI models for each type of order.
Tables 9-2 and 9-3 present information for each of the 12 tests on the spe-
cific commodities that the model traded profitably and those that lost, for the in-
sample (Table 9-2) and out-of-sample (Table 9-3) runs. The first column, SYM, is
the market being studied. The last column (COUNT™) is the number of profitable
tests for a given market. The numbers in the first row are Test identifiers. The last
row (COUNZJ contains the number of markets profitable for a given model. Tables
9-2 and 9-3 provide information about which markets are and are not profitable
when traded by each model: One dash (-) indicates a loss per trade of $2,000 to
$4,000; two dashes (- -) represent a loss of $4,000 or more; one plus sign (+)
means a profit per trade of $1,000 to $2,000; two pluses (+ +) indicate gains of
$2,00O,or more; a blank cell means a loss between $0 and $1,999 or a profit
between $0 and $1,000 per trade.

Tests of the Basic Crossover Model
A moving average (mnl) was computed for the integrated, price-lie lunar series. A
second moving average (ma2) was taken of the first moving average. A buy signal
was generated when ml crossed above ma2. A sell signal was generated when ma1
crossed below ma2. This is the same moving average crossover model discussed in
the chapter on moving averages, except here it is computed on a lunar series, rather
than on prices. The entries were effected by either a market at open (Test l), a limit
(Test 2), or a stop order (Test 3).
Optimization involved stepping the length of the moving averages (avglen)
from 5 to 15 in increments of 5, and the displacement (disp) from 0 to 15 in incre-

Performance of Lunar Models Broken Down by Model, Order, and

In-Sample Performance Broken Down by Test and Market

107 108 It,,? 110 III Ii7 I COIINTI
k.YM iO1

“, . . . ”

CD + l + - - ++ ++ ++ 5
ED - - - __ __ - ++ - 1: 1
CL + + ++ + 5
++ + ++ + ++ ++ - 8

109 118 109 Ill 115 I
COUNT 108 115 107 108 108 109 111

Out-of-Sample Performance Broken Down by Test and Market
ments of 1. For entry at the open, the best performance (in terms of in-sample
risk-to-reward ratio) was achieved with a moving average length of 15 and a dis-
placement of 8: entry on a limit was best with a length of 15 and a displacement
of 6; entry on a stop required a length of 15 and a displacement of 12.
No tests showed profits in either sample. In-sample, best performance (least
average loss per trade) was with entry on limit; entry on stop produced poorer
results; entry at open was the worst. With the limit order, 43% of the 1,759 trades
were profitable. Out-of-sample, the limit order produced the smallest average loss
per trade and the stop yielded the largest loss. Overall, the system did not do well
on the entire portfolio. The relative performance of shorts and longs was incon-
sistent across orders and samples. In-sample, longs lost substantially more than
shorts, the opposite of what was frequently seen in tests of other models.
Equity steadily declined from the beginning to the end of the data series for
entry at open. For entry on limit, equity was choppy but up, peaking in September
1989. It then declined until July 1992, rose slightly until February 1994, and
declined steadily until July 1998, when it suddenly began increasing. With a stop,
equity showed a choppy decline from one end of the data series to the other.
In-sample, the number of markets with positive returns using a limit, a
market-at-open, and a stop were 15, 8, and 7, respectively. Out-of-sample, the
limit produced the best results (17) followed by the market-at-open (16), and
the stop (14). More market-order combinations produced profits out-of-sample
than in-sample; it seems that many markets are becoming more affected by lunar
rhythms in recent years. In-sample, only the Deutschemark and Light Crude
were profitable across all three entry orders. Out-of-sample, the Deutschemark
was highly profitable with limit and stop orders; Light Crude slightly lost with
the stop. T-Bonds strongly profitable in both samples with the limit. Pork Bellies
was profitable in both samples with entry at open and on limit. Considering only
the limit order, profit in both samples was observed for the Deutschemark, Swiss
Franc, Japanese Yen, Platinum, Palladium, Sugar, and Cotton.

Tests of the Basic Momentum Model
A centered moving average smoothed the unintegrated lunar price change series.
No lag was induced because the centered average examines as many future (rela-
tive to the current bar), as it does past, data points. This smoothing is legitimate
because, in the calculations, the lunar estimate at the current bar involves data at
least two lunar cycles (about two months) away. For the smoothed lunar price
changes, a series of average absolute deviations was computed and a loo-bar sim-
ple moving average was taken to produce the desired result. A buy was issued
when lunar momentum, at the current bar plus some displacement (d&p), was
greater than some multiple (thresh) of the average absolute deviation of the lunar
momentum. A sell was issued when lunar momentum, at the same displaced bar,
was less than minus the same multiple of the average absolute deviation. Entries
were executed at the open (Test 4), on a limit (Test S), or on a stop (Test 6).
Optimization was for the length of the moving averages (stepped from 5 to
15 in increments of 5), the displacement (1 to 10 in steps of l), and the threshold
(1.5 to 2.5 in steps of 0.5). Best results were achieved with the length, displace-
ment, and threshold parameters set to 10, 10, 2 for the market-at-open and 15, 9,
1.5 for the limit and stop.
Overall, results were worse than for the crossover model. Heavy losses
occurred in both samples across all order types. The same poor performance was
observed when seasonal effects were analyzed with the momentum model. Longs
again performed better than shorts.
With entry at open, portfolio equity declined smoothly and severely, with the
rate of loss gradually decreasing over time. With a limit order, equity steadily
decreased. With a stop, equity dropped sharply from the beginning of the sample
until August 1988, then declined gradually.
In-sample, the S&P 500, NYFE, Deutschemark, and Swiss Franc were
somewhat profitable across all orders. Out-of-sample, the S&P 500 and NYFE
neither profited nor lost, but the Deutschemark did well with entry at open, and the
Swiss Franc with entry on limit and on stop. As with the crossover model, there
were many more profitable market-order combinations.

Tests of the Crossover Model with Confirmation
This is identical to the basic crossover model except that entries were only taken
when an appropriate reading of the Fast %K Stochastic confirmed lunar market
behavior. Specifically, if the lunar crossover suggested a buy, it was only acted
upon if Fast %K was below 25%; before a buy occurred, the market had to be
down or near a bottom, as expected on the basis of the lunar rhythm. Likewise, a
lunar sell was not taken unless the market was near a possible top, i.e., Fast %K
greater than 75%. Entries were at the open, on a limit, or a stop (Tests 4 to 6,
The length of the moving averages (avglen) was optimized from 3 to IS in
increments of 3, and displacement (disp) from 0 to 15 in increments of 1. Best per-
formance was achieved for entry at the open, and on a limit, with a moving aver-
age length of 15 and a displacement of 12; the best stop entry occurred with a
length of 12 and a displacement of 5.
In-sample, the results were somewhat better than the basic crossover model:
When combined with the stop, the crossover with confirmation yielded about $234
per trade. Out-of-sample, however, the average loss was more than for either of the
previous two models, regardless of order. The stop showed the smallest loss per
trade and was best. This is another system not profitable on a whole portfolio
basis. The equity curves showed nothing but losses across all three orders.
In-sample, the JapaneseYen, Heating Oil, Soybeans, and Soybean Meal were
profitable with all three orders; out-of-sample, only losses or, at best, unprofitable
trading occurred in these markets. Kansas Wheat showed consistent behavior
across samples: Results were profitable with entry at open and on limit, and
unprofitable with entry on stop. Across samples, the British Pound and Swiss
Franc were profitable, as was the Canadian Dollar, Eurodollar, and Pork Bellies
with entry on a stop. Since the number of trades was fairly small for many mar-
kets and the whole portfolio, results are probably not trustworthy.

Tests of the Crossover Model with Confirmation
and Inversions
This is the same as the crossover model with confirmation, but additional trades
were taken at possible inversions. If a lunar buy was signalled by a crossover,
but the market was high (Fast %K being greater than 75%), a sell (not a buy) was
posted; the assumption is the usual lunar cycle may have inverted, forming a top
instead of a bottom. Likewise, if the crossover signalled a sell, but the market
was down, a buy was issued. These signals were posted in addition to those
described in the crossover with confirmation model. Entries occurred at the open
(Test lo), on a limit (Test ll), or a stop (Test 12).
The length of the moving averages (avg2en) was stepped from 3 to 15 in
increments of 3, and the displacement (disp) from 0 to 15 in increments of 1. For
entry at the open, the best moving average length was 15 and displacement, 12;
entry on a limit was best with a length of 15 and a displacement of 8; entry on a
stop required a length of 12 and displacement of 15.
This model lost heavily across samples and orders. As with seasonality,
inversions did not benefit performance. The equity curve paints a dismal picture.
In-sample, the NYFE was profitable across all three orders, but the S&P 500
lost for two of the orders and was flat for the other. The Swiss Franc was also prof-
itable in-sample across all three orders; out-of-sample, it was very profitable for
entry at open, but lost for the other two orders. There was a great deal of incon-
sistency in results between the samples.

When considered over all models, the stop performed best in both samples. The
worst performers were, in-sample, the open and, out-of-sample, the limit. In-sample,
when considered over all order types, crossover with confirmation was the best. Out-
of-sample, the basic lunar crossover model performed best and crossover with con-
tirmation worst.
There were many strong interactions between sample, model, and order. Some
of the results stem from the small number of trades. The best of the seasonal model-
order combinations yielded better and more consistent performance than the best of
the lunar ones.

When entire portfolios are considered, entry models based on lunar rhythms do
not do as well as those based on seasonal rhythms. The poor showing of the lunar
effect contradicts our earlier study (Katz and McCormick, June 1997). The differ-
ences may stem from two possible factors: entry models and exits. In the current
tests, the models were optimized on an entire portfolio, which may not be appro-
priate for the lunar rhythm (the earlier model entered the market a specified num-
ber of days after full or new moon). The methods used in this chapter were altered
from the previous study because of the need to optimize using common parame-
ters across all markets. Doing this with the earlier approach would require that
trades be entered n-days after the full or new moon, regardless of the market being
traded; since lunar rhythms are distinct for each market (as demonstrated in our
previous study), this approach was inappropriate. The earlier model was, there-
fore, redesigned to be self-adaptive, i.e., as it proceeds through lunar cycles, the
appropriate timing for trading is decided by analysis of previous lunar cycles.
Another possible reason for the conflicting results may be the interaction
between the exits and entries, The lunar model, and perhaps the seasonal model,
has the property of pinpointing tradeable tops and bottoms, but only a percentage
of the time. Such systems work best with very tight stops that quickly cut losses
when predictions go wrong, but that allow profits to accumulate when correct.
In general, the lunar models performed poorly, but there were individual mar-
kets with consistent, positive performance-encouraging, given the model was not
optimized to them. Results suggest that some great systems are hiding here if
entries were tailored to them, e.g., in our earlier study, the lunar model traded Silver
well; in the current study, Silver was not strongly responsive. Although the lunar
models lost money on the portfolio, they lost very much less on a per-trade basis
than did, for instance, most moving average and oscillator entry models.

An earlier study (Katz and McCormick, September 1997) examined the effects of
sunspots on the S&P 500 and Wheat. In-sample, a simple sunspot model pulled
$64,000 from the S&P 500 between 1984 and 1992. There were 67 trades, 31%
profitable. The average winning trade was $5,304.76, much larger than the average
loser (-$1,030.43). The average trade was $955.22 with a return of 561% (not annu-
alized). The long side was profitable, but the short side was substantially more so,
highlighting the tendency of unusual solar activity to coincide with market crashes.
The better performance of short trades is especially significant, since this market
was in a secular uptrend during most of the testing period. Profitability continued
out-of-sample, from 1993 through 1996, with a 265% return, 23 trades (30% prof-
itable), and with an average trade yielding $891.30. The results for Wheat were also
good across samples. In-sample, 57% of X4 trades were profitable with a $203.27
average trade and 859% return (not annualized). Out-of-sample, there were 29
trades, 55% profitable, a $260.78 average trade, and 406% return.
Our initial research suggested further study would be worthwhile. The tests
below examine the effects of solar activity on the standard portfolio. Daily sunspot
numbers from 1985 through 1999, from the Royal Observatory of Belgium, were
used to generate entries.


There are many ways to generate entries based on solar activity. The method used
below is a simple variation of a breakout model, applied to sunspot counts, not prices.
The rules are: If the current sunspot number is higher than the cument upper thresh-
old, and the sunspot counts for a certain number (I&?) of previous bars were lower
than their corresponding thresholds, then either a buy or sell signal (depending on
previous market behavior in response to upside breakouts in the sunspot numbers) is
issued. If the current sunspot number is lower than the current lower threshold, and
the sunspot counts for the same number of previous bars were all higher than their
corresponding thresholds, then either a sell or a buy signal (again, depending on pre-
vious market behavior) is issued. The signals are not responded to immediately, but
only after a specified number of days (disp). The breakout thresholds are determined
as follows: The upper threshold, used for a given bar, is the highest sunspot number
found in a certain larger number of previous bars (Ibl), while the lower threshold is
set at tbe lowest of the sunspot numbers in those previous bars. “Previous market
behavior” refers to whether the market was near the bottom or top of its near-future
range when a paaicular kind of breakout occurred. If a given direction of solar breal-
out is historically associated with the market being near the bottom of its near-future
range, a buy signal is generated, on the other hand, if the market is characteristically
near the top of its near-future range, a sell signal is generated.
Like lunar phenomena and seasonality, entries based on solar activity share
the assumption that market behavior is intluenced by external factors and that the
independent, influential variable has predictive value, i.e., market behavior is
anticipated rather than responded to. As with any predictive system, the forecasts
may be more or less correct. Trades resulting from incorrect predictions can be
incredibly bad, even if many trades resulting from correct predictions are perfect,
as is often the case with predictive systems. Being anticipatory, the models lend
themselves to countertrend entries, which means better tills, less slippage, and bet-
ter risk control, assuming appropriate stops are used (not done here because of the
need to maintain the standard exit).
CHAPTER 9 Lunar and mar Rhythms

The code for these tests is similar to that for lunar analysis and so is not pre-
sented here. It is available on the companion software CD (see offer at back of

Tests were performed on the solar entry model using entry at open (Test 1). on a
limit (Test 2), and on a stop (Test 3). The breakout look-back (Ibl) was stepped
from 25 to 40 in increments of 5; the repeat prevention look-back (lb,?) from 10 to
15 by 5; and the displacement (disp) from 0 to 2 by 1. For entry at the open, the
best in-sample performance was with a breakout look-back of 35, a repeat pre-
vention look-back of 15, and a displacement of 2. For the limit, a breakout look-
back of 40, a repeat prevention look-back of 15, and a displacement of 0 were
optimal. For the stop, the best values were: for the breakout look-back, 35; for the
repeat prevention look-back, 15; and for the displacement, 2.
Table 9-4 shows both the in- and out-of-sample performance for specific
commodities. The columns and rows contain the same kinds of data as in Tables
9-2 and 9-3 above.
The solar model performed about as well as the lunar ones and, in sample,
did best with a stop order. In-sample, entry at the open was worst (-$I631 per
trade); a limit was slightly better (-$1519), substantially so when only long trades
were considered. The stop order was the best, losing only $52 per trade; were it
not for transaction costs, this order would have been very profitable in-sample.
The mode1 required the theoretically expected displacement. The best dis-
placement for the limit was zero, understandable since the goal is to respond
quickly, before the market turns, when a limit can enter on the noise. With the stop,
a displacement of 2 was best: Movement needs to begin to trigger the stop and
cause entry. The average loss per trade worsened, from -$52 to -$2,000, when dis-
placement deviated just one or two bars from its optimal value. This implies a rela-
tionship between the timing of the market and solar events otherwise small
changes in the displacement should have little or no effect.
With the stop order, the highest percentage of wins (in-sample) was obtained
and the long side was actually profitable. Out-of-sample, the stop was again best,
but the average loss per trade was a substantial $1,329.
Equity was examined only for the stop, since the other orders performed so
poorly. Equity rose very rapidly until June 1988, then, until October 1990, it was
choppy and fairly flat. Between October 1990 and June 1994, equity declined
sharply, then was choppy and slightly down.
Interestingly, some of our previous findings (Katz and McCormick,
September 1997) were confirmed. With the stop, which generally performed best
on the whole portfolio, the S&P 500 was very profitable in both samples. The
average trade returned $4,991 in-sample: the return was 20.4% annualized; and,


PWformance Broken Down by Sample, Test, and Market

Iln-sample 1 1 Counil lout-of-sample 1 Count
SYM 101 102 103 1 I IO1 102 103
I I I++ I II - **
the t-test indicated a greater than 80% probability that the effect was real and
would hold up. Both long and short trades were profitable. In-sample there were
37 trades (40% winners). Out-of-sample, longs and shorts both continued to be
profitable; it was surprising that the shorts were profitable because the market was
in a steep up-trend during most of that period. Out-of-sample, the return was
39.5% annualized, with an 80% probability of being real; there were 11 trades
(45% winners), and the average trade returned $5,640. These are excellent results.
The observation that sharp down-turns can occur after solar flares has been
supported. With the stop order, Minnesota Wheat, Soybeans, and Cotton were also
profitable in both samples. Minnesota Wheat pulled 13.5% annually in-sample,
again with a better than 80% chance of the results being real, and 30.5% out-of-
sample, with almost an 85% probability of the effect not being due to chance.
Interestingly, Light Crude and Heating Oil were highly profitable in-sample, but
lost moderately out-of-sample. There were a few profits in other markets, but no
consistency between in- and out-of-sample performance with the stop.

Like seasonality and lunar phase, solar activity appears to have a real influence on
some markets, especially the S&P 500 and Minnesota Wheat. As with lunar
cycles, this influence is not sufficiently strong or reliable to be a primary element
in a portfolio trading system; however, as a component in a system incorporating
other factors, or as a system used to trade specific markets, solar activity is worth
attention. We personally do not believe solar influences directly determine the
market. We do suspect that they act as triggers for events that are predisposed to
occur, or as synchronizers of already-present market rhythms with similar period-
icities. For example, if a market is highly over-valued and unstable, as was the
S&P 500 in October 1987, a large solar flare might be sufficient to trigger an
already-imminent crash.


. Lunar and solar phenomena may have real impact on commodities mar-
kets. In the case of solar phenomena, such impact on the S&P 500 has
been conhrmed. With lunar phenomena, there is more inconsistency in
the results, but influence is clearly detectable.
n The phenomena are probably worth including in a more elaborate trading

model, e.g., as inputs to a neural network.
n Models that capture such influences almost certainly need to be tuned to

specific markets in a more effective way than has been done here. Such
market specificity might be the reason for the better results observed
when tests were conducted on individual markets.

. As with other countertrend models that pinpoint turning points (including
seasonality), it is probably necessary to use an exit that includes a fairly
tight stop. If a turning point is correctly identified, the stop is never hit
and the trade quickly turns profitable. On the other hand, when a predic-
tion error occurs, as frequently happens, the stop quickly kills the trade,
cutting losses short. The use of tight stops may be another factor that
accounts for better performance in our earlier studies (Katz and
McCormick, June and September 1997) than in the current tests.
. Given the highly probable influence of solar and lunar rhythms on certain
markets, it might be worth exploring some other planetary rhythms,
including the kinds of planetary configurations and cycles that are the
focus of astrologers.
. Entry orders interact with models. Limit orders, for example, do not
always perform best. It seems a stop order sometimes improves perfor-
mance. The reason may be that a stop order introduces verification of the
beginning of a trend before entry can occur, something that may be
important when using a prediction-based counter-trend strategy.

Cycle-Based Entries

A cycle is a rhythmic oscillation that has an identifiable frequency (e.g., 0.1
cycle per day) or, equivalently, periodicity (e.g., 10 days per cycle). In the previ-
ous two chapters, phenomena that are cyclic in nature were discussed. Those
cycles were exogenous in origin and of a known, if not fixed, periodicity.
Seasonality, one such form of cyclic phenomena, is induced by the periodicity and
recurrence of the seasons and, therefore, is tied into an external driving force.
However, while all seasonality is cyclic, not all cycles are seasonal.
In this chapter, cycles that can be detected in price data alone, and that do not
necessarily have any external driving source, are considered. Some of these cycles
may be due to as yet unidentified influences, Others may result only from reso-
nances in the markets. Whatever their source, these are the kinds of cycles that
almost every trader has seen when examining charts. In the old days, a trader
would take a comb-like instrument, place it on a chart, and look for bottoms and
tops occurring with regular intervals between them. The older techniques have
now been made part of modem, computerized charting programs, making it easy
to visually analyze cycles. When it comes to the mechanical detection and analy-
sis of cycles, ma*imum entropy spectral analysis (MESA) has become the preem-
inent technique.

Currently, there are at least three major software products for traders that employ the
maximum entropy method for the analysis of market cycles: Cycle Trader (Bressert),
MESA (Ehlers, 800.633.6372), and TradeCycles (Scientific Consultant Services,
516-696-3333, and Ruggiero Associates, 800-21 l-9785). This kind of analysis has

been found useful by many market technicians. For example, Ruggiero (October
1996) contends that adaptive breakout systems that make use of the maximum
entropy method (MEM) of cycle analysis perform better than those that do not.
Maximum entropy is an elegant and efficient way to determine cyclic activity
in a time series, Its particular strength is its ability to detect sharp spectral features
with small amounts of data, a desirable characteristic when it comes to analyzing
market cycles. The technique has been extensively studied, and implementations
using maximum entropy have become polished relative to appropriate preprocess-
ing and postprocessing of the data, as required when using that algorithm.
A number of problems, however, exist with the maximum entropy method,
as well as with many other mathematical methods for determining cycles. MEM,
for example, is somewhat finicky. It can be extremely sensitive to small changes
in the data or in such parameters as the number of poles and the look-back period.
In addition, the price data must not only be de-trended or differenced, but also be
passed through a low-pass filter for smoothing before the data can be handed to
the maximum entropy algorithm; the algorithm does not work very well on noisy,
raw data. The problem with passing the data through a filter, prior to the maximum
entropy cycle extraction, is that lag and phase shifts are induced. Consequently,
extrapolations of the cycles detected can be incorrect in terms of phase and timing
unless additional analyses are employed.

For a long time, we have been seeking a method other than maximum entropy to
detect and extract useful information about cycles. Besides avoiding some of the
problems associated with maximum entropy, the use of a novel approach was also
a goal: When dealing with the markets, techniques that are novel sometimes work
better simply because they are different from methods used by other traders. One
such approach to detecting cycles uses banks of specially designed band-pass fil-
ters. This is a method encountered in electronics engineering, where filter banks
are often used for spectral analysis. The use of a filter bank approach allows the
bandwidth, and other filter characteristics, to be tailored, along with the overlap
between successive filters in the bank. This technique helps yield an effective,
adaptive response to the markets.
A study we conducted using filter banks to explore market cycles produced
profitable results (Katz and McCormick, May 1997). Between January 3, 1990,
and November 1, 1996, a filter bank trading model, designed to buy and sell on
cycle tops and bottoms, pulled $114,950 out of the S&P 500. There were 204
trades, of which 50% were profitable. The return-on-account was 651% (not annu-
alized). Both the long and short sides had roughly equal profitability and a similar
percentage of winning trades. Various parameters of the model had been opti-
mized, but almost all parameter values tested yielded profitable results. The para-
meters determined on the S&P 500 were used in a test of the model on the T-Bonds
without any changes in the parameters, this market also traded profitably, retum-
ing a 254% profit. Given the relative crudeness of the filters used, these results
were very encouraging.
In that study, the goal was simply to design a zero-lag filtering system. The
filters were analogous to resonators or tuned circuits that allow signals of certain
frequencies (those in the pass-band) to pass through unimpeded, while stopping
signals of other frequencies (those in the stop-band). To understand the concept of
using@ers, think of the stream of prices from the market as analogous to the elec-
trical voltage fluctuations streaming down the cable from an aerial on their way to
a radio receiver. The stream of activity contains noise (background noise or “hiss”
and static), as well as strong signals (modulated cycles) produced by local radio
stations. When the receiver is tuned across the band, a filter™s resonant or center
frequency is adjusted. In many spots on the band, no signals are heard, only stat-
ic or noise. This means that there are no strong signals, of the frequency to which
the receiver is tuned, to excite the resonator. Other regions on the band have weak
signals present, and when still other frequencies are tuned in, strong, clear broad-
casts are heard; i.e., the filter™s center (or resonant frequency) corresponds to the
cyclic electrical activity generated by a strong station. What is heard at any spot
on the dial depends on whether the circuits in the radio are resonating with any-
thing, i.e., any signals coming in through the aerial that have the same frequency
as that to which the radio is tuned. If there are no signals at that frequency, then
the circuits are only randomly stimulated by noise. If the radio is tuned to a cer-
tain frequency and a strong signal comes in, the circuits resonate with a coherent
excitation. In this way, the radio serves as a resonating filter that may be tuned to
different frequencies by moving the dial across the band. When the filter receives
a signal that is approximately the same frequency as its resonant or center fre-
quency, it responds by producing sound (after demodulation). Traders try to look
for strong signals in the market, as others might look for strong signals using a
radio receiver, dialing through the different frequencies until a currently broad-
casting station-strong market cycle--comes in clearly.
To further explore the idea of resonance, consider a tuning fork, one with a
resonant frequency of 440 hertz (i.e., 440 cycles per second), that is in the same
room as an audio signal generator connected to a loud speaker. As the audio gen-
erator™s frequency is slowly increased from 401 hertz to 402 to 403, etc., the res-
onant frequency of the tuning fork is gradually approached. The nearer the audio
generator™s frequency gets to that of the tuning fork, the more the tuning fork
picks up the vibration from the speaker and begins to emit its tone, that is, to res-
onate with the audio generator™s output. When the exact center point of the fork™s
tuning (440 hertz) is reached, the fork oscillates in exact unison with the speak-
er™s cone; i.e., the correlation between the tuning fork and the speaker cone is per-
fect. As the frequency of the sound emitted from the speaker goes above (or
below) that of the tuning fork, the tuning fork still resonates, but it is slightly out
of synch with the speaker (phase shif occurs) and the resonance is weaker. As
driving frequencies go further away from the resonant frequency of the tuning
fork, less and less signal is picked up and responded to by the fork. If a large
number of tuning forks (resonators or filters) are each tuned to a slightly differ-
ent frequency, then there is the potential to pick up a multitude of frequencies or
signals, or, in the case of the markets, cycles. A particular filter will resonate very
strongly to tire cycle it is tuned to, while the other filters will not respond because
they are not tuned to the frequency of that cycle.
Cycles in the market may be construed in the same manner as described
above-as if they were audio tones that vary over time, sometimes stronger, some-
times weaker. Detecting market cycles may be attempted using a bank of filters
that overlap, but that are separate enough to enable one to be found that strongly
resonates with the cyclic activity dominant in the market at any given time. Some
of the filters will resonate with the current cyclic movement of the market, while
others will not because they are not tuned to the frequency/periodicity of current
market activity. When a filter passes a signal that is approximately the same fre-
quency as the one to which it is tuned, the filter will behave like the tuning fork,
i.e., have zero lag (no phase shift); its output will be in synchrony with the cycle
in the market. In addition, the filter output will be fairly close to a perfect sine
wave and, therefore, easy to use in making trading decisions. The filter bank used
in our earlier study contained Butterworth band-pass filters, the code of which was
rather complex, but was fully disclosed in the Easy Language of TradeStation.

Butterwo˜h Filters
Butterworth filters are not difftcult to understand. A low-pass Bunenvorthfilter is
like a moving average: It both attenuates higher-frequency (shorter-periodicity)
signals (or noise) and passes lower-frequency (higher-periodicity) signals unim-
peded; in other words, it smooths data. While an exponential moving average has
a stop-band cutoff of 6 decibels (db) per octave (halving of the output for every
halving of the signal™s period below the cutoff period), a 4-pole Butterworth filter
(the kind used in our May 1997 study) has a stop-band attenuation of 18 decibels
per octave (output drops by a factor of 8 for every halving of a signal™s period
below the cut-off period). The sharper attenuation of unwanted higher-frequency
(lower-periodicity) activity with tire Butterworth filter comes at a price: greater lag
and distorting phase shifts.
A high-pass Burrenvorthfilrer is like a moving-average difference oscillator
(e.g., X - MA(X), where X is the input signal): Both attenuate lower-frequency sig-
nals (e.g., trend), while passing higher-frequency signals unimpeded. The attenua-
tion in the stop-band is sharper for the 4-pole Butterworth filter (18 db per octave)
than for the moving-average oscillator (6 db per octave). Both the moving-average
oscillator and the Butterworth high-pass filter produce lead (rather than lag) at the
expense of increased noise (short-period activity) and distorting phase shifts.
If both high-pass and low-pass filters are combined by connecting the output
of the first to the input of the second, a band-pass fifilrer is obtained: Frequencies
that are higher or lower than the desired frequency are blocked. A signal with a
frequency (or periodicity) that falls in the center of the filter™s “pass-band” is
passed with little or no attenuation, and without lag. The phase shifts of the high-
pass (lead) and low-pass (lag) component filters cancel out; this is comparable to
the behavior of the tuning fork, as well as to the MACD, which is actually a rudi-
mentary band-pass filter built using moving averages. Also, like moving averages,
the stop-band attenuation of the MACD is not very sharp. The stop-band attenua-
tion of the Butterworth band-pass filter, on the other hand is very sharp. Because
only a small range of frequencies pass through such a filter, its output is very
smooth, close to a sine wave. Moreover, because the lag and lead cancel at the cen-
ter frequency, there is no lag. Smooth output and no lag? That sounds like the per-
fect oscillator! But there is a catch: Only the filter with a center frequency that
matches the current cyclic activity in the market can be used.
The output from an appropriately tuned filter should be in synchronization
with the cyclic activity in the market at a given time. Such output will be very
smooth, leading to solid trading decisions with few or no whipsaws, and should be
usable in the generation of trading signals. In fact, if a filter is chosen that is tuned
to a slightly higher frequency than the filter with the most resonance, there will be
a slight lead in the filter output, which will make it slightly predictive.
One problem with band-pass filters constructed using Butterworth high- and
low-pass components is the dramatically large phase shifts that occur as the period-
icity of the signal moves away from the center of the pass-band. Such phase shifts can
completely throw off any attempt at trade timing based on the output of the titter

Wavelet-Based Filters
Butterworth filters are not necessarily the optimal filters to use when applying a
filter bank methodology to the study of market cycles. The drawbacks to using
Butterworth filters include the fact that they do not necessarily have the response
speed desired when trading markets and making quick, timely decisions. Problems
with measuring the instantaneous amplitude of a particular cycle are another con-
sideration. And as noted earlier, the phase response of Butterworth filters is less
than ideal. Wavelets, on the other hand, provide an elegant alternative.
The theory of filter banks has recently become much more sophisticated
with the introduction of wavelet theory. On a practical level, wavelet theory
enables the construction of fairly elegant digital filters that have a number of
desirable properties. The filters used in the tests below are loosely based upon the
Moreler wavelet. The Morelet wavelet behaves very much like a localized Fourier
transform. It captures information about cyclic activity at a specific time, with as
rapid a decrease as possible in the influence (on the result) of data points that have
increasing distance from the time being examined. Unlike Butterworth filters,
Morelet wavelets are maximally localized in time for a given level of selectivity or
sharpness. This is a very desirable feature when only the most current information
should influence estimates of potentially tradable cycles. The filters constructed
for the tests below also have the benefit of a much better phase response, highly
important when attempting to obtain accurate market timing in the context of vary
ing cycles. The advanced filters under discussion can easily be used in banks,
employing a methodology similar to the one used in our May 1997 study.
The kind of wavelet-based filters used in the tests below are designed to


. 5
( 9)