back start next
[start] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54] [55] [56] [57] [58] [59] [60] [61] [62] [63] [64] [65] [66] [67] [68] [69] [70] [71] [72] [73] [74] [75] [76] [77] [78] [79] [80] [81] [82] [83] [84] [85] [86] [87] [88] [89] [90] [91] [92] [93] [94] [95] [96] [97] [98] [99] [100] [101] [102] [103] [104] [105] [106] [107] [108] [109] [110] [ 111 ] [112] [113] [114] [115] [116] [117] [118] [119] [120] [121] [122] [123] [124] [125] [126] [127] [128] [129] [130] [131] [132] [133] [134]
111 One very promising approach in the search of new trading strategies is provided by genetic programming (GP) method (Koza, 1992; Banzhaf et al, 1998). This is an evolutionary algorithm that allows to automatically discover computer programs that solve a given problem. Evolutionary algorithms tend to find globally satisfactory solutions to the problem and, much in the same way as in nature, populations of organisms tend to adapt to their surrounding environment. Such an approach has been applied to stock indices, as noted in Allen and Karjalainen (1999), and to exchange rates, as noted in Oussaidene et al. (1997); Neely et al. (1997); Bhattacharyyaetal. (1998). Individual programs in GP are represented as parse trees with ordered branches in which the internal nodes are functions (with subtree branches as function arguments) and the leaves or terminal nodes are variables. The functions are chosen from a userdefined function set, those that are a priori believed to be useful for the problem at hand, and the leaves are selected from a terminal set containing the principal variables or constants of the problem. Once an initial population has been created, the genetic algorithm enters a loop. At the end of each iteration (or generation), a new population has been created by applying a certain number of stochastic operators to the members of the previous population. A selection operator is first applied in order to extract some aboveaverage individuals for reproduction. When a population of parents has been extracted, two reproduction operators are used: crossover and mutation. As shown on Figure 11.2, the crossover operator starts by selecting a random crossover point in each parent tree (a and b) and then exchanging the subtrees, giving rise to two offspring trees (c and d). The crossover sites, cT and c2, are usually chosen with nonuniform probability, in order to favor internal nodes with respect to leaves. In the same figure we can observe that from two parents trees, which are not interesting, the crossover is able to generate the offspring (c), which correspond to a wellknown simple trading strategy using the difference between two moving averages. After crossover, a certain proportion of the offspring are subject to mutation. The mutation operator is implemented by randomly removing a subtree at a selected point and replacing it with a randomly generated subtree. In the basic genetic programming approach, it is generally required that all elements of a tree return the same data type, so as to allow arbitrary subtrees to be recombined by the crossover and mutation operators. This closure property (Koza, 1992) can be a potential limitation in some applications like the trading strategies search process. In earlier studies, on the use of GP for searching new trading strategies (Oussaidene et al, 1997), a large proportion of the population members were noted to be irrelevant and resulted in a wasteful search. For instance, if you carefully study the different GP trees in Figure 11.2, you can easily conclude that only the offspring (c) corresponds to a reasonable indicator. As mentioned, trading models are a function of the price history. In the case of the FX market, it is common to consider the logarithmic middle price x, which possesses an exact symmetry x >> x, corresponding to the interchange of the expressed and exchanged currencies. Consider the U.S. Dollar to German Mark
(c) (d) FIGURE 11.2 Crossover operator. (USDDEM) exchange rate. A trading model that is optimum for the USDDEM rate is also expected to be optimum for the inverted DEMUSD rate. For this to hold, the model for the inverted DEMUSD rate should provide a signal, at any time /, that has exactly the reverse sign than the one for the USDDEM rate. It means the output signal gt(x) of a consistent trading model must be an antisymmetric function of the return. Enforcing the symmetry condition on the trading model thus requires that gt(x) * gt(x) = g,(x). Maintaining this property in a GP tree requires tracking the symmetry property at individual nodes in the tree, and forms the basis for defining syntactic restrictions. To enforce the symmetry, three possible types are defined: Antisymmetric type A (e.g., a moving average of x): A(x) = A(x) Symmetric type S (e.g., a volatility): S(x) = S(x) Constant type (numerical constants) Constants are in essence of symmetric type; however, there are many advantages to considering the constant type separately. In specifying a GP trading model,
 1+   A i S 1 ]   A S   A "   A S  S 1 A 1 A   s  j  A S J S >J s 1 
FIGURE I I.3 Syntactic restrictions for basic arithmetic operators. every node evaluation is considered to return both a value and a type (A, S, or as defined above). The typing mechanism is used to categorize the symmetry properties. A variety of functions may be considered for formulating trading models. Each function must be specified in terms of syntactic restrictions relating to symmetry, and guiding their combination with terminals and other functions. As an example, the syntactic restrictions for the basic arithmetic operators are provided in Figure 11.3. In these tables, the first row and column correspond to the type of the two arguments, with the intersection cells showing the type of the result. The symbol "" represents a combination of arguments that is disabled. Operation on two constants is generally disabled to avoid wasteful computation of constants through the regular crossover and mutation operators (Evett and Fernandez, 1998). The constants are generally mutated using specific nonuniform mutation operators (Michalewicz, 1994). Other classes of functions are useful in the construction of the trading strategies. The important one is the class of the time series convolution operators described in Section 3.3. For instance, in Figure 11.2, we see exponential moving averages of the middle logarithmic price x for the two ranges of 20 and 40 days. Such operators can be used as function nodes if their syntactic restrictions are provided. They can also be used directly as input variables of the antisymmetric or symmetric type, depending on their symmetry properties when x is replaced by x. In the case of a moving average operator, syntactic restrictions are forced to have the same symmetry type for the input and output signals. Other operators often used in trading strategies are the classes of: Logic operators: AND, OR, Comparison operators: greater than, smaller than, Conditional operators: IFthen, IFthenelse. As we expect an asymmetric output trading signal, it is suitable to use for these operators a ternary Boolean logic, Oussaidene et al. (1997). In using such trading strategies, like in Bhattacharyya et al. (1998), we clearly depart from the closure property. In fact, we consider here a strongly typed GP approach (see Montana, 1995), where the evolution procedure needs to define a random tree initialization routine, and crossover and mutation operators respecting the defined restrictions. As an example, we describe a study by Chopard et al. (2000) who analyze five exchange rates (USDDEM, USDJPY, USDCHF, GBPUSD, and USDFRF),
[start] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54] [55] [56] [57] [58] [59] [60] [61] [62] [63] [64] [65] [66] [67] [68] [69] [70] [71] [72] [73] [74] [75] [76] [77] [78] [79] [80] [81] [82] [83] [84] [85] [86] [87] [88] [89] [90] [91] [92] [93] [94] [95] [96] [97] [98] [99] [100] [101] [102] [103] [104] [105] [106] [107] [108] [109] [110] [ 111 ] [112] [113] [114] [115] [116] [117] [118] [119] [120] [121] [122] [123] [124] [125] [126] [127] [128] [129] [130] [131] [132] [133] [134]

