TRADING TECHNIQUES

Seasonality
And Trading


by Jeffrey Owen Katz, Ph.D., with Donna L. McCormick

This month, this trader and consultant looks at seasonality as the basis of a trading system.


My search for successful systems began with the brute-force application of neural network technology. I wanted to see if I could get a profitable trading system by using neural networks to generate trading signals based simply on recent price changes. As I anticipated, I found that this simplistic approach does not work very well.

I then moved to simple rule-based systems, initially working with rules rooted in theory (for example, the thrust-retracement hypothesis). This provided better results: The systems worked but were not particularly tradable because the per-trade profit was on the small side. However, the results encouraged me enough to proceed with a more complex data-mining approach to rules. Instead of using rules based purely on theory, I let a genetic algorithm (GA) find the rules' parameters (the lookbacks and thresholds) in a simple price-comparison model. I obtained better results, more tradable than the previous system, but still not ideal.

Next, I took the data-mining method to the limit, engaging in what some might consider to be a rocket-science approach to trading system development. I let a genetic algorithm discover not only the appropriate rule parameters, but also the optimal combinations of rules from a set of rule templates I provided. Even when using fairly simple kinds of rules (price comparisons, price to moving average comparisons, new highs, new lows, Commitments of Traders or COT indices being above or below certain thresholds), I got very good results.

If a market participant has deep pockets and can withstand the drawdown on a market like the S&P 500, this system may be traded and yield a fairly decent return.

WHAT IS SEASONALITY?
The term seasonality is used in many different ways by systems developers. For example, market analyst Murray Ruggiero includes weather patterns under the general category of seasonality, while others construe seasonality as events that are strictly tied into the four seasons -- for example, the increased demand for heating oil in the winter. Certain kinds of cycles are even regarded by some as being seasonal. But while all seasonality is cyclic, not all cycles are seasonal.

For our purposes here, seasonality is defined as cyclic or recurrent phenomena that are consistently tied in some way to the calendar. I am using seasonality to mean market behavior related to the time of the year or tied to particular dates, including the anniversaries of critical events (for instance, the October 1987 stock market correction). I will construe seasonality as calendar-related cyclic phenomena. In this article, I am going to examine the influence of seasonal effects on two time frames: intraday (open to close) and end of day.






DefineDLLFunc:"TSNNL.DLL",INT,"SetVecQQ",INT,INT,FLOAT;
DefineDLLFunc:"TSNNL.DLL",INT,"GetVecQQ",INT,INT,LPFLOAT;

Inputs: Disp(1), Wind(6), Thr(.5);
Vars: HistChg(0), HistPct(0), HistCnt(0), YCount(0);

Value1 = A_Season_1 (Disp, Wind);

GetVecQQ (1, 1, &HistCnt);
GetVecQQ (1, 2, &HistPct);
GetVecQQ (1, 3, &HistChg);
GetVecQQ (1, 4, &YCount);

If HistCnt > 2 And YCount=Wind Then Begin
    If HistPct > 70  And HistChg > Thr Then
        Buy At Market;
    If HistPct < 30 And HistChg < -Thr Then
        Sell At Market;
End;

FIGURE 1: EASY LANGUAGE CODE FOR THE INTRADAY SYSTEM. The system TASC_ART5_1 implements the date-specific, open-to-close trading model. It has three inputs: Disp (displacement), Wind (lookback window) and Thr (threshold). The system first calls the function A_Season_1, passing it the displacement and lookback window inputs. Calls are then made to retrieve the results from the vector registers in the Scsi Computational Server. Normal TradeStation functions can only return single values, making the use of the vector registers necessary for functions such as A_Season_1 that need to return several values at once. Finally, code generates trading decisions based on those values.

INTRADAY IMPLEMENTATION
The system Tasc_Art5_1 (shown in Figure 1) implements the date-specific, open-to-close trading model. It has three inputs: Disp (displacement), Wind (lookback window) and Thr (threshold). The system first calls the function A_Season_1 (discussed earlier), passing it the displacement and lookback window inputs. Calls are then made to retrieve the results from the vector registers in the SCSI Computational Server. Normal TradeStation functions can only return single values, making the use of the vector registers necessary for functions such as A_Season_1 that need to return several values at once. Finally, code generates trading decisions based on those values.


Jeffrey Owen Katz is a professional trader and consultant in Selden, NY. His firm, Scientific Consultant Services (516 696-3333), specializes in custom programming, provides expert consultation on systems development and the use of Omega Research's tools, and develops publicly available software for traders.
Donna L. McCormick is a writer and vice president of Scientific Consultant Services.
Excerpted from an article originally published in the April 1997 issue of Technical Analysis of STOCKS & COMMODITIES magazine. All rights reserved.
© Copyright 1997, Technical Analysis, Inc.

Return to April Contents