Evolutionary Single-Position Automated Trading

4 downloads 0 Views 402KB Size Report
of trading strategy, such an approach to automated trading may yield significant ..... 22. D(i). Stochastic oscillator. 11. EMA5(i). 5-day Exp. Mov. Avg. 23. RSI(i).
Evolutionary Single-Position Automated Trading Antonia Azzini and Andrea G.B. Tettamanzi University of Milan Information Technology Department - Crema, Italy {azzini,tettamanzi}@dti.unimi.it

Abstract. Automated Trading is the activity of buying and selling financial instruments for the purpose of gaining a profit, through the use of automated trading rules. This work presents an evolutionary approach for the design and optimization of artificial neural networks to the discovery of profitable automated trading rules. Experimental results indicate that, despite its simplicity, both in terms of input data and in terms of trading strategy, such an approach to automated trading may yield significant returns.

1

Introduction

Trading is the activity of buying and selling financial instruments for the purpose of gaining a profit [9]. Usually, such operations are carried out by traders by making bids and offers, by using orders to convey their bids and offers to the brokers or, more interesting, by developing automated trading systems that arrange their trades. Several works have been carried out in the literature by considering market simulators for program trading. Recently, Brabazon and O’Neill [4] explained that, in program trading, the goal is usually to uncover and eliminate anomalies between financial derivatives and the underlying financial assets which make up those derivatives. Trading rules are widely used by practitioners as an effective mean to mechanize aspects of their reasoning about stock price trends. However, due to their simplicity, individual rules are susceptible of poor behavior in specific types of adverse market conditions. Naive combinations of rules are not very effective in mitigating the weaknesses of component rules [14]. As pointed out in [14], recent developments in the automation of exchanges and stock trading mechanisms have generated substantial interest and activity within the machine learning community. In particular, techniques based on artificial neural networks (ANNs) [3,2] and evolutionary algorithms (EAs) [4,7,8] have been investigated, in which the use of genetic algorithms and genetic programs has proven capable of discovering profitable trading rules. The major advantages of the evolutionary algorithms over conventional methods mainly regard their conceptual and computational simplicity, their applicability to broad classes of problems,their potential to hybridize with other methods and their capability of self-optimization. Evolutionary algorithms can be easily extended to include other types of information such as technical and macroeconomic data as well as M. Giacobini et al. (Eds.): EvoWorkshops 2008, LNCS 4974, pp. 62–72, 2008. c Springer-Verlag Berlin Heidelberg 2008 

Evolutionary Single-Position Automated Trading

63

past prices: some genetic algorithms become useful to discover technical trading rules [1] or to find optimal parameter-values for trading agents [5]. Different kinds of evolutionary techniques can be used to solve global optimization problems, and several studies carried out in the literature demonstrate how these algorithms are a more integrated way of optimizing classifier systems since they do not require any expert knowledge of the problem. Much research has been undertaken on the combination of EAs and ANNs, giving rise to so-called evolutionary artificial neural network models (EANNs) [15,16]. EANNs have become well-established approaches for different financial problems in which the analytical solutions are difficult to obtain, and they are helpful in finding the optimal ANN design for a given financial problem. Some works focused on investigating the relationship between neural network optimization for financial trading and the efficient market hypothesis [12]; others examined the relationships between economic agents’ risk attitude and the profitability of stock trading decisions [10]; others focused on modeling the mutual dependencies among financial instruments [3]. In this work, an EANN approach, performing a joint evolution of neural network weights and topology, is applied to providing trading signals to an automated trading agent. This approach has already been validated on different benchmark problems, and then tested on several real-world problems [3,2], also comparing the performances of the EANN with random approaches.

2

Single-Position Automated Trading Problem

A so called Single-position automated day-trading is the problem of finding an automated trading rule for opening and closing a single position within a trading day. In such a scenario either short or long positions are considered, and the entry strategy is during the opening auction at market price. A profit-taking strategy is also defined in this work, by waiting until market close unless a stop-loss strategy is triggered. A trading simulator is used to evaluate the performance of a trading agent. While for the purpose of designing a profitable trading rule R, i.e., solving any static automated day trading problem, the more information is available the better, whatever the trading problem addressed, for the purpose of evaluating a given trading rule the quantity and granularity of quote information required varies depending on the problem. For instance, for one problem, daily open, high, low, and close data might be enough, while for another tick-by-tick data would be required. Generally, the annualized log-return of rule R when applied to time series X of length N is r(R, X) =

Y N

N

r(R, X, i),

(1)

i=1

where r(R, X, i) is the log-return generated by the rule R on the ith day of time series X, and Y is the number of market days in a year. In this work, the log-return depends on a fixed take-profit return rT P , an algorithm’s parameter corresponding to the maximum performance that can be achieved by the

64

A. Azzini and A.G.B. Tettamanzi

automated trading simulation. For each day, a position is defined through two different operation thresholds θbuy and θsell , that correspond, respectively, to the maximum value of a network output for buying and to the minimum value for selling. In this automated trader application these thresholds are set, respectively, to 0.34 and 0.66, i.e., in such a way as to partition the output range into three equal-sized segments. If the output obtained from the evolutionary approach is less than θbuy , a long position is opened, while if the output is more than θsell a short position is opened. No position is taken in between. The trading rules defined in this approach use past information to determine the best current trading action, and return a buy/sell signal at current day depending on the information of the previous day. Such a rule is then used to define the log-returns of the financial trading on the current day. In the trading simulation the log-returns obtained are then used, together with the risk free rate rf and the downside risk DSR to calculate the Sortino ratio SRd [13], an extension of the Sharpe ratio [11], defined by: SRd (R, X) =

r(R, X) − rf . DSRrf (R, X)

(2)

SRd represents the measure of the risk-adjusted returns of the simulation, and it will be used in the evolutionary process in order to evaluate the fitness of an individual trading agent. At the beginning of the trading day, the trader sends to the trading simulator the order decoded from the output of the neural network. During the trading day, if a position is open, the position is closed as soon as the desired profit (indicated by a log-return rT P ) is attained (in practice, this could be obtained by placing a reverse limit order at the same time as the position-opening order); if a position is still open when the market close, it is automatically closed in the closing auction at market price.

3

EANN Approach

The approach implemented in this work defines a population of traders, the individuals, encoded through neural network representations. The evolutionary algorithm [3,2] considered in this approach evolves traders population by using the joint optimization of structure and weights of the NNs, and it takes advantage of the backpropagation algorithm (BP) as a specialized decoder. Such a simultaneous evolution underlines that an EA allows all aspects of a NN design to be taken into account at once, without requiring any expert knowledge of the problem, and can overcome possible drawbacks of each single technique combining their advantages. In this evolutionary algorithm only a specific subset of NN, Multi-Layer Perceptron (MLP), is considered for neural encoding, due to the simple structure that it needs to be represented. Indeed, MLPs are feedforward NNs with a layer of input neurons, a layer of one or more output neurons and zero or more “hidden” (i.e., internal) layers of neurons in between; neurons in a layer can take inputs from the previous layer only.

Evolutionary Single-Position Automated Trading

65

Table 1. Individual Representation Element l topology W(0) Var(0) W(i) Var(i) bij V ar(bij )

Description Length of the topology string, corresponding to the number of layers. String of integer values that represent the number of neurons in each layer. Weights matrix of the input layer neurons of the network. Variance matrix of the input layer neurons of the network. Weights matrix for the ith layer, i = 1, . . . , l. Variance matrix for the ith layer, i = 1, . . . , l. Bias of the jth neuron in the ith layer. Variance of the bias of the jth neuron in the ith layer.

Each individual is encoded in a structure in which basic information are maintained as illustrated in Table 1. The values of all these parameters are affected by the genetic operators during evolution, in order to perform incremental (adding hidden neurons or hidden layers) and decremental (pruning hidden neurons or hidden layers) learning. As described in detail in [3,2], all individuals have no pre-established topology, the population is initialized with different hidden layer sizes and different number of neurons for each individual by means of two exponential distributions, in order to maintain diversity between all the individuals in the new population. Such dimensions are not bounded in advance, even though the fitness function may penalize large networks. In the evolutionary process, after population definition and network initialization, the genetic operators are applied to each network until termination conditions are not satisfied, with the following steps: (i) select from the population (of size n) n/2 individuals by truncation, (ii) for all individuals of the population mutate the weights and the topology of the offspring, train the resulting network, calculate fitness on the test set (see Section 3.1), save the best individual, (iii) save statistic information about the entire evolutionary process. In the truncation selection, elitism is also considered, allowing the survival of the best individual unchanged into the next generation and the solutions to get better over time. In each new generation, a new population has to be created, and the first half of such new population corresponds to the best parents that have been selected with the truncation operator, while the second part is defined by creating offspring from the previously selected parents. Weights mutation perturbs the weights of the neurons before performing any structural mutation and applying BP to train the network. Then, Topology mutation is implemented with four types of mutation by considering neurons and layer addition and elimination. The elimination of a neuron is carried out only if the contribution of that neuron is negligible with respect to the overall network output, while the addition and the elimination of a layer and the insertion of a neuron are applied with three independent probabilities − + p+ layer , player , and pneuron .

66

3.1

A. Azzini and A.G.B. Tettamanzi

Fitness Function

As in the previous approaches [3,2], the fitness function used in this work depends on the cost of each individual. So, the convention that the best fitness corresponds to the lowest fitness is adopted, defining the objective of each task as a cost minimization problem. The fitness function also works as a controller and selector, because it penalizes large networks. In this application, the fitness function depends on the risk-adjusted return obtained by the considered trader, and is calculated, at the end of the training and evaluation process, by f = λkc + (1 − λ) ∗ e−SRd ,

(3)

where λ corresponds to the desired tradeoff between network cost and accuracy, and it has been set experimentally to 0.2 to place more emphasis on accuracy, since the NN cost increase is checked also by the entire evolutionary algorithm. This parameter also represents the measure of the correlation between the fitness value and the measure of the risk-adjusted return considered e−SRd . k is a scaling constant set experimentally to 10−6 , and c models the computational cost of a neural network, proportional to the number of hidden neurons and synapses of the neural network. It is important to emphasize that the Sortino ratio used in the fitness function, defines “risk” as the risk of loss. Following the commonly accepted practice of machine learning, the problem data will be partitioned into training, test and validation sets, used, respectively for network training, to stop learning avoiding overfitting, and to to test the generalization capabilities of a network. The fitness is calculated according to Equation 3 over the test set. 3.2

Setting of the Data

The input values of the dataset are defined by considering the quotes of the daily historical prices and 24 different technical indicators for the same financial instrument, that correspond to the most popular indicators used in technical analysis. These indicators also summarize important features of the time series of the financial instrument considered, and they represent useful statistics and technical information that otherwise should be calculated by each individual of the population, during the evolutionary process, increasing the computational cost of the entire algorithm. The list of all the inputs of a neural network is shown in Table 2, and a detailed discussion about all these technical indicators can be easily found in the literature [6]. Generally, technical indicators can be directly incorporated as model inputs, or, alternatively, they can be preprocessed to produce an input by taking ratios or through the use of rules. The last case is a combinatorial problem and traditional modeling methods can provide an infinite number of possibilities, in some cases problematic. This suggests that an evolutionary algorithm in which the model structure and model inputs are not defined a priori will have potential for generating trading operations drawn from individual technical indicators [4].

Evolutionary Single-Position Automated Trading

67

Table 2. Input Technical Indicators Index Input Tech. Ind. Description Index Input Tech. Ind. Description 1 Open(i) Opening value 13 EMA20(i) 20-day Exp. Mov. Avg 2 High(i) High value 14 EMA50(i) 50-day Exp. Mov. Avg 3 Low(i) Low value 15 EMA100(i) 100-day Exp. Mov.Avg 4 Close(i) Closing value 16 EMA200(i) 200-day Exp.Mov. Avg 5 MA5(i) 5-day Mov. Avg 17 MACD(i) Mov. Avg Conv./Div. 6 MA10(i) 10-day Mov. Avg 18 SIGNAL(i) Exp. Mov. Avg on MACD 7 MA20(i) 20-day Mov. Avg 19 Momentum(i) Rate of price change 8 MA50(i) 50-day Mov. Avg 20 ROC(i) Rate Of Change 9 MA100(i) 100-day Mov. Avg 21 K(i) Stochastic oscillator K 10 MA200(i) 200-day Mov. Avg 22 D(i) Stochastic oscillator 11 EMA5(i) 5-day Exp. Mov. Avg 23 RSI(i) Relative Strength Index 12 EMA10(i) 10-day Exp. Mov. Avg 24 Close(i − 1) Closing val. on (i − 1)

One target value is then defined for each day i of the time series considered with a value between 0 and 1, corresponding to the operation that should be carried out by the automated trader on that day. Three possible operations are taken into account, and correspond to buy, sell and no operations.

4

Experiments and Results

The database for this automated trader application was created by considering all daily quotes and the 24 technical indicators described in Table 2 for the ordinary stock of the Italian car maker FIAT, which is traded at the Borsa Italiana stock exchange. All the daily data are related to the period from the 31th of March, 2003, through the 1st of December, 2006. Training, test and validation sets have been created by considering, respectively, the 66, 27 and 7% of all available data. All time series of the three datasets are preprocessed by considering a normal distribution with mean 0 and standard deviation set to 1, although no future knowledge has been considered in the dataset definition. For each run of the evolutionary algorithm, up to 800,000 network evaluations (i.e., simulations of the network on the whole training set) have been allowed, including those performed by BP. The risk free rate rf has been set for all runs to 0.0344 (i.e., the current ECB discount rate of 3.5%), while different settings have been also considered for the log-return values of the take profit, for both target output and trading simulator settings, in order to define the combination that better suits to the results obtained by the evolutionary process to provide the best automated trader. A round of experiments, summarized in Table 3, was aimed at determining whether using a different take-profit log-return for generating the target in the learning dataset used by BP than the one used for simulating and evaluating the trading rules could bring about any improvement of the results. For this reason the best individual found for each setting is saved, and the Sortino ratio and the correlated log-returns on the validation set are reported. The conclusion is that runs in which the take profit used to construct the target is greater than the actual target used by the strategy usually lead to more profitable trading rules, although exceptions can be found: as a matter of

68

A. Azzini and A.G.B. Tettamanzi

Table 3. A comparison of validation Sortino ratio and log-return for different combinations of target and simulation take profits Target Validation Take Profit Set

0.0046 0.006 0.008

worst SRd -0.6210 Log-Return -0.3336 SRd -0.1288 Log-Return 0 SRd -0.0620 Log-Return 0

0.0046 avg 0.2149 0.1564 -0.0303 0.0218 0.2137 0.1484

best 1.2355 0.6769 0.0712 0.0737 0.7859 0.4531

Simulation Take Profit 0.006 worst avg best -0.3877 -0.0027 0.5294 -0.1973 0.0628 0.3192 -0.0620 0.4035 1.2289 0.0363 0.2559 0.6768 -0.0620 0.2803 0.9327 0 0.1850 0.5312

worst -0.3605 -0.1770 -0.0043 0.0320 0.0395 0.0562

0.008 avg 0.0050 0.0225 0.3863 0.3041 0.3683 0.2311

best 0.5607 0.3424 1.2432 0.6773 1.2237 0.6695

fact the best combination turned out to be a simulation take profit of 0.008 and a target take profit of 0.006. 4.1

Tenfold Cross-Validation

To validate the generalization capabilities of the automated trading rules found by the approach, a tenfold cross-validation has been carried out as follows. The training and test sets have been merged together into a set covering the period from March 31, 2003 to August 30, 2006, representing the 93% of the entire period, since no validation set has been considered in the merging process. That set has been divided into 10 equal-sized intervals. Each interval has been used in turn as the validation set, while the remaining 9 intervals have been used to create a training set (consisting of 6 intervals) and a test set (3 intervals). The 10 (training, test, and validation) datasets thus obtained have been used to perform 10 runs each of the evolutionary algorithm, for a total of 100 runs. The best performing take-profit settings found during the previous round of experiments have been used for all 100 runs, namely a target take profit of 0.006 and a simulation take profit of 0.008. Table 4 reports the average and standard deviation of the best fitness obtained during each run; the best individual found in each run was applied to its relevant validation set, and the resulting Sortino ratio and log-return are reported in the table. It can be observed that the results are consistent for all ten dataset used in the cross-validation, with Sortino ratios often greater than one, meaning that the expected return outweighs the risk of the strategy. This is a positive indication of the generalization capabilities of this approach. 4.2

Discussion

The evolutionary approach presented in this work is elementary and minimalistic in two respects. First, the data considered each day by the trading agent to make a decision about its action is restricted to the open, low, high, and close quotes of the last day, plus the close quote of the previous day; any visibility of the rest of the past time series is filtered through a small number of popular and quite standard technical indicators. Second, the trading strategy an agent can follow is among the simplest and most accessible even to the unsophisticated

Evolutionary Single-Position Automated Trading

69

Table 4. 10-Fold validation: experimental results for different settings of the algorithm parameters Setting Parameter Setting − + p+ layer player pneuron

1

2

3

4

5

6

7

8

0.05 0.05 0.1 0.1 0.2 0.2 0.2 0.05 0.05 0.1 0.1 0.2 0.2 0.2 0.05 0.05 0.1 0.1 0.2 0.2 0.2 0.05 0.05 0.1 0.1 0.2 0.2 0.2 0.05 0.05 0.1 0.1 0.2 0.2 0.2 0.05 0.05 0.1 0.1 0.2 0.2 0.2 0.05 0.05 0.1 0.1 0.2 0.2 0.2 0.05 0.05 0.1 0.1 0.2 0.2 0.2

0.05 0.1 0.1 0.2 0.05 0.1 0.2 0.05 0.1 0.1 0.2 0.05 0.1 0.2 0.05 0.1 0.1 0.2 0.05 0.1 0.2 0.05 0.1 0.1 0.2 0.05 0.1 0.2 0.05 0.1 0.1 0.2 0.05 0.1 0.2 0.05 0.1 0.1 0.2 0.05 0.1 0.2 0.05 0.1 0.1 0.2 0.05 0.1 0.2 0.05 0.1 0.1 0.2 0.05 0.1 0.2

0.05 0.05 0.05 0.05 0.05 0.2 0.2 0.05 0.05 0.05 0.05 0.05 0.2 0.2 0.05 0.05 0.05 0.05 0.05 0.2 0.2 0.05 0.05 0.05 0.05 0.05 0.2 0.2 0.05 0.05 0.05 0.05 0.05 0.2 0.2 0.05 0.05 0.05 0.05 0.05 0.2 0.2 0.05 0.05 0.05 0.05 0.05 0.2 0.2 0.05 0.05 0.05 0.05 0.05 0.2 0.2

Take Profit Log-Return =0.008 favg Std. Dev. Log-Return SRd 0.1518 0.1491 0.1598 0.1502 0.1494 0.1645 0.1532 0.1892 0.1768 0.1786 0.1749 0.1765 0.1864 0.1799 0.1780 0.1790 0.1880 0.1858 0.1894 0.1845 0.1840 0.1909 0.2026 0.1866 0.1831 0.2011 0.2212 0.1923 0.2520 0.2237 0.2213 0.2169 0.2295 0.2364 0.2200 0.1932 0.2183 0.2303 0.2094 0.2168 0.2320 0.2186 0.2020 0.2171 0.2081 0.2042 0.2050 0.2187 0.2153 0.2109 0.2018 0.1845 0.1956 0.2172 0.1856 0.1888

0.0101 0.0267 0.0243 0.0190 0.0256 0.0115 0.0129 0.0251 0.0293 0.0342 0.0274 0.0188 0.0210 0.0306 0.0290 0.1003 0.1364 0.1683 0.1363 0.1013 0.1092 0.0315 0.0234 0.0300 0.0293 0.0379 0.0283 0.0340 0.0412 0.0245 0.0327 0.0331 0.0416 0.0316 0.0287 0.0478 0.0339 0.0312 0.0444 0.0268 0.0445 0.0495 0.0268 0.0227 0.0184 0.0381 0.0375 0.0235 0.0353 0.0370 0.0460 0.0369 0.0338 0.0300 0.0365 0.0366

0.7863 4840 0.2012 0.7304 0.7399 0.9002 0.3186 0.9920 0.6362 0.9726 0.7652 0.7391 0.5362 0.7099 0.6655 1.0537 0.8727 0.3767 0.5434 0.6544 0.6882 0.7800 0.8400 0.9303 0.8194 1.0497 0.5146 0.9758 0.6825 0.5403 0.4932 0.4748 0.5796 0.4449 0.5799 0.3892 0.8521 0.6858 0.6375 0.6776 0.8312 0.3634 0.5196 0.6727 0.9178 0.6905 0.6653 0.8449 0.8321 0.3534 0.6068 0.8938 0.5846 0.4137 0.5516 0.8130

1.4326 0.8105 0.2899 1.3235 1.3307 1.6834 0.5037 1.8991 1.1229 1.8707 1.3965 1.3340 0.9355 1.2751 1.2008 2.0371 1.6569 0.6347 0.9474 1.1784 1.2551 1.4484 1.5745 1.7543 1.5384 2.0417 0.8842 1.8647 1.2430 0.9552 0.8545 0.8201 1.0335 0.7644 1.0251 0.6407 1.5979 1.2407 1.1418 1.2254 1.5614 0.6671 0.8740 1.1781 1.7002 1.2214 1.1619 1.5530 1.5207 0.5823 1.0832 1.6860 1.0402 0.6968 0.9617 1.5059

70

A. Azzini and A.G.B. Tettamanzi Table 4. (continued)

9

10

0.05 0.05 0.1 0.1 0.2 0.2 0.2 0.05 0.05 0.1 0.1 0.2 0.2 0.2

0.05 0.1 0.1 0.2 0.05 0.1 0.2 0.05 0.1 0.1 0.2 0.05 0.1 0.2

0.05 0.05 0.05 0.05 0.05 0.2 0.2 0.05 0.05 0.05 0.05 0.05 0.2 0.2

0.2010 0.1997 0.2007 0.2300 0.2170 0.2252 0.1930 0.2161 0.2017 0.2154 0.2138 0.2079 0.2063 0.2113

0.0263 0.0252 0.0312 0.0373 0.0429 0.0248 0.0441 0.0168 0.0312 0.0333 0.0424 0.0230 0.0288 0.0323

0.9420 0.2538 0.7444 0.8998 0.7192 0.9606 0.9813 0.4443 0.8144 0.8133 0.9079 0.6604 0.6148 0.7083

1.7953 0.4051 1.3792 1.6987 1.3175 1.8470 1.8860 0.7558 1.5233 1.5007 1.7118 1.1749 1.0804 1.2787

individual trader; its practical implementation does not even require particular kinds of information-technology infrastructures, as it could very well be enacted by placing a couple of orders with a broker on the phone before the market opens; there is no need to monitor the market and react in a timely manner. Nonetheless, the results clearly indicate that, despite its simplicity, such an approach may yield, if carried out carefully, significant returns, in the face of a risk that is, to be sure, probably higher than the one the average investor would be eager to take, but all in all proportionate with the returns expected. By simulating individual trading rules, we observed that the signal given by the neural network is correct most of the times; when it is not, the loss (or draw-down) tends to be quite severe — which is the main reason for the low Sortino ratios exhibited by all the evolved rules. Table 5 shows the history of a simulation of a trading strategy combining by majority vote the seven best trading rules discovered when using a target take-profit of 0.006 and a simulation take-profit of 0.008 on the validation set. Only days in which the majority took a position are shown. Table 5. A simulation of the strategy dictated by the majority of the best trading rules (one for each of the 7 parameter settings of Table 4) obtained by running the algorithm with a combination of target take-profit of 0.006 and a simulation take-profit of 0.008. The action in the Action column refers to the (short)-selling or buying of FIAT. The r column shows the log-return realized by the strategy for each day. Only days in which the strategy took a position are shown. Date 09/08/2006 09/11/2006 09/12/2006 09/13/2006 09/14/2006 09/26/2006 10/18/2006 10/19/2006 11/02/2006 11/03/2006 11/06/2006 11/07/2006

Output of the best ANN found with each parameter 1 2 3 4 5 6 0.37289 0.30866 0.36189 0.19916 0.11058 0.34688 0.37288 0.17984 0.24793 0.036435 0.42759 0.25281 0.37287 0.13193 0.22707 0.025921 0.17347 0.19494 0.37287 0.00572 0.14981 -0.0524 0.11109 0.16788 0.33293 0.19561 0.38577 0.030935 0.47942 0.39281 0.37292 0.33825 0.39093 0.18484 0.35414 0.29081 0.37287 -0.06376 0.086698 -0.07738 0.42974 -0.09006 0.37287 -0.12859 -0.08951 -0.08207 0.28453 -0.07239 0.37287 0.33471 0.42151 0.25141 0.09108 0.36179 0.37287 0.064807 0.39822 -0.0423 0.089449 0.18745 0.37287 0.22927 0.42214 0.06885 0.26745 0.3251 0.37287 0.21738 0.42549 0.095818 0.33432 0.39917

setting 7 0.23212 0.088654 0.079639 0.073001 0.095375 0.095379 0.069613 0.0692 0.07453 0.069529 0.07085 0.071313

Action Buy Buy Buy Buy Buy Buy Buy Buy Buy Buy Buy Buy

r

FIAT -0.00087 FIAT 0.00605 FIAT 0.008 FIAT 0.008 FIAT 0.008 FIAT 0.008 FIAT 0.008 FIAT 0.008 FIAT 0.008 FIAT 0.008 FIAT 0.008 FIAT 0.008

Evolutionary Single-Position Automated Trading

71

This case shows how with FIAT instruments few operations are enough to gain a profit from the strategy. Indeed, the compounded return is really attractive: the annualized log-return of the above strategy, obtained with target take-profit of 0.006 and actual take-profit of 0.008, corresponds to a percentage annual return of 39.87%, whereas the downside risk is almost zero (0.003).

5

Conclusion and Future Work

An application of a neuro-genetic algorithm to the optimization of very simple trading agents for static, single-position, intraday trading has been described. The approach has been validated on the trading of stock of Italian car maker FIAT. Experimental results indicate that, despite its simplicity, both in terms of input data and in terms of trading strategy, such an approach to automated trading may yield significant returns. Furthermore, this opens up the opportunity for many extensions, improvements, and sophistications both on the side of input data and indicators, and of the technicalities of the trading strategy.

References 1. Allen, F., Karjalainen, R.: Using genetic algorithms to find technical trading rules. Journal of Financial Economics 51, 245 (1999) 2. Azzini, A., Tettamanzi, A.: A neural evolutionary approach to financial modeling. In: Proceedings of the Genetic and Evolutionary Computation Conference, GECCO 2006, vol. 2, pp. 1605–1612. Morgan Kaufmann, San Francisco (2006) 3. Azzini, A., Tettamanzi, A.: Neuro-genetic single position day trading. In: Workshop Italiano di Vita Artificiale e Computazione Evolutiva, WIVACE 2007 (2007) 4. Brabazon, A., O’Neill, M.: Biologically Inspired Algorithms for Financial Modelling. Springer, Heidelberg (2006) 5. Cliff, D.: Explorations in evolutionary design of online auction market mechanisms. Electronic Commerce Research and Applications 2, 162 (2003) 6. Colby, R.: The Encyclopedia Of Technical Market Indicators, 2nd edn. McGrawHill, New York (2002) 7. Dempster, M., Jones, C.: A real-time adaptive trading system using genetic programming. Quantitative Finance 1(4), 397–413 (2001) 8. Dempster, M., Jones, C., Romahi, Y., Thompson, G.: Computational learning techniques for intraday fx trading using popular technical indicators. IEEE Transactions on Neural Networks 12(4) (2001) 9. Harris, L.: Trading and Exchanges, Market Microstructure for Practitioners. Oxford University Press, New York (2003) 10. Hayward, S.: Evolutionary artificial neural network optimisation in financial engineering. In: Proceedings of the Fourth International Conference on Hybrid Intelligent Systems, HIS 2004, IEEE Computer Society Press, Los Alamitos (2004) 11. Sharpe, W.: The Sharpe ratio. Journal of Portfolio Management 1, 49–58 (1994) 12. Skabar, A., Cloete, I.: Neural networks, financial trading and the efficient markets hypothesis. In: Proceedings of the Australian Computer Science Conference 2002, vol. 4, pp. 241–249. Australian Computer Science Inc. (2002)

72

A. Azzini and A.G.B. Tettamanzi

13. Sortino, F., der Meer, R.V.: Downside risk – capturing what’s stake in investment situations. Journal of Portfolio Management 17, 27–31 (1991) 14. Subramanian, H., Ramamoorthy, S., Stone, P., Kuipers, B.: Designing safe, profitable automated stock trading agents using evolutionary algorithms. In: Proceedings of the Genetic and Evolutionary Computation Conference, GECCO 2006, vol. 1, pp. 1777–1784. Morgan Kaufmann, San Francisco (2006) 15. Yao, X.: Evolutionary Optimization. Kluwer Academic Publishers, Norwell, Massachusetts (2002) 16. Yao, X., Liu, Y.: A new evolutionary system for evolving artificial neural networks. IEEE Transactions on Neural Networks 8(3), 694–713 (1997)

Suggest Documents