Applied stochastic models in business and industry. Stock timing using genetic algorithms, страница 2

The purpose of this paper is to discover a quasi-optimal set of trading rules and to investigate its efficiency with no a priori about its economic relevance. The aim is to mix different categories of technical trading rules and let an automatic evolution process decide which rules are to be used for particular time series. This difficult task can be achieved by using genetic algorithms (referred to as GA in the following); they permit the creation of (artificial) experts taking their decisions from an optimal (in a sense to be defined) subset of the previously mentioned trading rules. The GA, based on the survival of the fittest, do not guarantee a global optimum but they are known to constitute an effective approach in optimizing non-linear functions. The fitness function used to evaluate experts in the population is explicitly tailored to stock trading. The evolutionary approach presented here whereby knowledge-based trading systems building are to be built, is evaluated on real financial time series.

Application of GA to stock trading has already been evaluated by a number of researchers. Fyffe et al. [11] applied such an algorithm to identify ex-ante optimal trading rules. Neely et al. [12] reported significant profits when using rules generated by the same kind of techniques on the foreign exchange markets (see also References [13,14]).

Our paper is then structured in the following way. Some of the most well-known trading strategies used by technical analysts are briefly described in Section 2. In Section 3, the GA used to define the trading expertsk are presented in detail. Section 4 is devoted to a performance study of this approach. We apply the model to French market stock prices; the period under study is divided into a learning period and a test period, the latter following immediately the former. The separating date between the two sub-periods is randomly chosen so as not to induce a bias related to the choice of this date. Half of the 40 stocks included in the CAC40 index of the Paris Stock Market are considered in this analysis. Section 5 concludes the paper and proposes some extensions.

2.  EXAMPLES OF TECHNICAL TRADING RULES

All the rules that are included in the genetic algorithm (in excess of 200) cannot be presented here, but with only a few categories of rules (see Reference [17,2] for an extensive presentation); in fact, almost all these decision rules depend on the parameters and the advantage of a technique like a genetic algorithm is to let the program choose the best parameters in a set of inputs.

2.1.  Price channels

This rule compares the current price to a fixed number of past prices. Let Pt1;...;Ptn denote the n preceding prices; for a given threshold e; if Pt > maxk ðPtkÞ  e then buy and if Pt5mink ðPtkÞ þ e then sell. In other cases, do nothing. The intuition is that, in the first case, this is the beginning of an increasing tendency. It is clear that many price channel rules can be used by varying n: In our set of rules, the range 5–50 days is considered for n:

2.2.  Moving averages

The idea underlying this kind of rule is very simple; consider a price process P ¼ ðP1;...;Pt;...Þ and define the t1-moving average (t1-MA) at date s by

1 Xs

                                                                      Mst1 ¼               Pt

t

t¼stþ1

Mt1 will react quickly to changes in price if t1 is small and will exhibit inertia if t1 is large; consequently, a simple trading rule can be defined, for t15t2 as

                                     If fMst1 14Mst2 1 þ eg       and       fMst1 > Mst2  eg       then buy

                                      If fMst1 15Mst2 1  eg        and       fMst15Mst2 þ eg      then sell

The short moving average is more reactive than the long one; consequently, if Mst1 1 becomes greater than Mst2 1 and is believed that prices follow trends, one therefore thinks that a bull period is about to start, so one buys. Conversely, if the short-term t1-MA crosses the t2-MA to become lower, you sell the stock because you interpret this move as the beginning of a bear