Genetic programs, data-snooping, and technical analysis, страница 5

For these reasons, simple profitability is used to measure fitness instead of returns. The fitness measure used is

T

                                                                       p a (pt1  pt)It f abs(It  It1)                                        (2)

t

where It  [1, 0, 1] is a trinary signal variable that indicates the trading position at time t and f is the transactions cost. As suggested by Neely et al. (1997), higher transactions costs discourage rules which over-trade, which may be a symptom of overfitting. They recommend using a transaction cost that is higher than otherwise may be realistic for training and selection, and a more realistic rate for out-of-sample testing. Lukac et al. (1988a) suggest commissions of $100 per round-turn, accounting for both commissions and liquidity costs, although they suggest that this number is likely too high. Therefore, transaction costs of $100 per round-trip are used for training and selection, and $50/round-trip are used in out-of-sample testing.

SIMULATION RESULTS

Very flexible estimation methods require increased amounts of data for fitting, otherwise the model may be overfitted, and its out-of-sample performance artificially biased downwards. To determine the optimal size of the data set for construction of the rules, a simulation study is performed.

From an econometric perspective, the technical trading rule in Figure 1 is analogous to a threshold auto-regressive model with three regimes,

yt  yt1 mt Pt

a : yt1  (1  k)n1 gni1 yti1 mt  •b : yt1  (1  k)n1 gni1 yti1

                                                                    0 : otherwise                                                           (3)

Pt  iid(0, s2)

For this simulation study, a 0.5, b  0.5, n  10, k  0.02, and s2  1. Using the model in Equation (3), 100 data series are generated using lengths of 750, 1500, 2250, and 3000 observations, approximately corresponding to 3, 6, 9, and 12 years of futures price data. Each simulated data set is subdivided into three equally sized subsamples, called the training, selection, and testing data. Following the procedure of AK and NWD, each generation of rules is evolved and evaluated using the training data; the best rule is applied to the selection data, if it is fitter than the best rule from the prior generation, the new rule is retained, otherwise the rule of the prior generation is retained. For each simulation, the process terminates when 25 generations fail to improve the retained rule, to a maximum of 200 generations. The resulting “best” rule is then evaluated using the testing data to measure its out-of-sample fit. Rule fitness is measured by profits, as in Equation (2), but transactions costs are excluded to better ascertain the ability of genetic programming to identify the data-generating process.

Table III reports the results of the simulation at different data lengths. The first set of results is the average daily profits from applying the rule in Figure 1 to the simulated data. The second set of results is the out-of-sample results obtained using genetic programming. The third set of data report the proportion of correctly identified positions, i.e., the proportion of dates on which the GP rule held the same position as

TABLE III

Results of Estimating Models With Simulated Price Data

Simulation length

                                                             T  250                         T  500                         T  750                      T  1000

Daily returns using the rule in Figure 1

Mean           0.3237    0.3242    0.3136    0.3061 SD            0.1520    0.1436    0.1369    0.1342

                         Median                       0.3215                        0.2943                        0.3108                       0.3180

Daily returns using ex ante optimal trading rules