Expert Systems with Applications 42 (2015) 6699–6716
Contents lists available at ScienceDirect
Expert Systems with Applications journal homepage: www.elsevier.com/locate/eswa
Boosting Trading Strategies performance using VIX indicator together with a dual-objective Evolutionary Computation optimizer José Matias Pinto, Rui Ferreira Neves, Nuno Horta ⇑ Instituto de Telecomunicações, Instituto Superior Técnico, Lisboa, Portugal
a r t i c l e
i n f o
Article history: Available online 30 April 2015 Keywords: Time series prediction Multi-Objective Optimization Stock market forecast Technical analysis Financial markets Dynamic systems Multiple technical indicators
a b s t r a c t In this study a Multi-Objective Evolutionary System is used to predict the future tendency of assets price. Therefore, a framework using a Multi-Objective Genetic Algorithm (GA) in its core to optimize a set of Trading or Investment Strategies (TSs) was developed. The investigated framework is used to determine potential buy, sell or hold conditions in stock markets, aiming to yield high returns at a minimal risk. The Volatility Index (VIX), indicators based on the VIX and other Technical Indicators (TI) are optimized to find the best investment strategy. Additionally, fair and established metrics are used to evaluate both the return and the linked risk of the optimized TSs. Furthermore, these strategies are evaluated in several markets using data from the main stock indexes of the most developed economies, such as: NASDAQ, S&P 500, FTSE 100, DAX 30, and also NIKKEI 225. The achieved results clearly outperform both the Buy&Hold and Sell&Hold. Additionally, the Pareto-Fronts obtained with the training data during the experiments clearly show the inherent trade-off between risk and return in financial. In this paper the option of using an adaptive approach was chosen, which led to the development of a framework able to operate continuously and with minimal human intervention. To sum up, the developed framework is able to evolve a set of TSs suitable for the diverse profiles of investors from the most risky to the most careful with interesting results, which suggests great potential in the framework generalization capabilities. The use of the VIX enables the system to increase the stock return compared to traditional Technical Indicators by avoiding losses when the stress in the stock market increases. The GA enables the system to adapt to different types of markets. The algorithm achieves a return of higher than 10% annual for the period of 2006– 2014 in the NASDAQ and DAX indexes, in a period that includes the stock market crash of 2008. Ó 2015 Elsevier Ltd. All rights reserved.
1. Introduction Time-ordered sequences of data (time series data) have arisen in a broad range of applications in nearly all domains, spreading from biological to financial and meteorological data; examples include patient’s medical observation data, economic indexes in stock markets, or weather forecast. Hence, the relationship analysis and forecasting of tick-by-tick temporarily ordered series of data arises as a fundamental, essential and useful task, thus worth researching. In this study, extensive experiments using real world data obtained from one of the most dynamic environments are used – financial markets. To name, the developed forecasting strategies are evaluated in several financial markets using data from the main stock indexes of the most developed economies: NASDAQ, S&P 500, FTSE 100, DAX 30 and NIKKEI 225. ⇑ Corresponding author. E-mail addresses:
[email protected] (J.M. Pinto),
[email protected] (R.F. Neves),
[email protected] (N. Horta). http://dx.doi.org/10.1016/j.eswa.2015.04.056 0957-4174/Ó 2015 Elsevier Ltd. All rights reserved.
In artificial intelligence (Whitley, 1994), Genetic Algorithms (GAs) are a family of computational techniques that apply the Darwinian theory of evolution to develop and optimize a possible solution to a given problem. These algorithms encode a probable problem solution on a data structure and apply selection (survival of the fittest) and recombination operators (crossover and mutation) to these data structures. These GA machine-learning techniques begin with a set of potential solutions (population) to the problem and are used to optimize them according to a fitness function that evaluates each solution depending on its ability to perform or solve a specified task. Genetic Algorithms are often viewed as function optimizers although the variety of problems to which Genetic Algorithms can be useful is fairly wide. Besides some unfavorable judgments (Fama, 1970; Korczak & Roger, 2002), Technical Indicators (TIs) are still widely used as tools to carry out the technical analysis of financial markets, exploiting the existence of trends to establish potential buy, sell or hold conditions. Although (Achelis, 2000) has made a complete reference that fully explains the most important TIs that one can
6700
J.M. Pinto et al. / Expert Systems with Applications 42 (2015) 6699–6716
identify and use, this study is still very tricky for several reasons. The main difficulty of an indicator usage is deciding its suitable parameter values, as number of days of periods, in order to take advantage of the market and improve your likelihood of success. In financial practice, it is not uncommon to see analysts conducting extensive manual analysis of historically well performing indicators. This search for hidden interactions among variables that perform well in combination is often kept as a private secret when someone finds one of these interactions. Thus, Evolutionary Computation (Chen, 2002) appear as a highly suitable alternative to extend the technical analysis of financial markets to tune the parameters of some chosen TI or a set of TIs so that the desired goals are achieved to the maximum possible extent. In this environment, what should be done by the system can be viewed as a form of predicting future stock prices. Consequently, Evolutionary Computation emerges as a stochastic search technique able to deal with highly complicated and non-linear search spaces. In the last decade several financial crises have caused broad consequences on the financial assets valorization, which has warned investors that risk should also be taken into consideration when making any decision. As a result, the main motivation for this study emerged: to tune a set of Investment or Trading Strategies (TSs) able to achieve the highest returns with minimal risk. The simultaneous achievement of both these goals is supposed to lead us to obtain more robust solutions. The main contributions of the present study are: 1 – The use of clear and transparent metrics to evaluate the dual conflicting goals: return and risk. 2 – The use of the VIX and indicators based on the VIX in conjunction with several other Technical Indicators to decide when to buy or sell. 3 – The use of a Multi-Objective GA adaptive approach able to operate continuously and almost autonomously (that is: with minimal human intervention). Consequently, in this study, a Multi-Objective Evolutionary Optimization approach will be presented and used to simultaneously optimize two conflicting objectives: the maximization of the Return on Investment (ROI), and the minimization of the related risk. The proposed framework will be tested using data from the main stock indexes of the most developed economies, the results will be presented and some possible conclusions outlined. The next section will present the related work on the Genetic Algorithms applied to financial markets. Section 3 explains the system architecture, and the roles of the most relevant modules used to build the proposed framework as well the TIs used to build the underlying strategies. Section 4 presents the results and highlights the most relevant outcomes. Finally, the conclusions of this study and the direction of possible future efforts are presented in Section 5.
2. Related work Stock market analysis has been one of the most attractive and active research fields where many machine learning techniques are adopted. Generally speaking one can distinguish two methods for anticipating future stock prices and the time to buy or sell; one is technical analysis (Murphy, 1999) and the other is Fundamental Analysis (Graham, Zweig, & Buffett, 2003). Fundamental Analysis looks at stock prices using the financial statements of each company, economic trends and so on; it requires a large set of financial and accounting data that is difficult to obtain, released with some delay and often suffers of low consistency. Technical analysis numerically analyzes stock prices’ past movement; it is based on the use of technical stock market indicators that work on a series of data, usually stock prices or volume (Achelis, 2000); it is
accurate, on time, and relativity easy to obtain. Consequently, this paper will be focused on the use of technical analysis to anticipate future stock price movements. One of the earliest proposals, in which Genetic Programming was applied to generate technical trading rules in stock market, was published in Allen and Karjalainen (1995) and in Allen and Karjalainen (1999). Later, many approaches based on Evolutionary Computation have been proposed and applied to diverse fields of Financial Computing to predict market trends. Financial markets prediction has been a subject of many studies, and in recent years a combination of algorithms and methods has been extensively used. Table 1 summarizes some of the relatively recent approaches found in the vast available literature. In Table 1, the term B&H (Buy and Hold strategy) stands for a commonly used TS that simply invests all available cash into the asset at the start of the investment period and keeps it there until the end of the investment period. Conversely a related strategy called S&H (Sell and Hold) can also be used. It does the same but bets on the decline of the market, this means that it sells the assets at the start of the investment period without owning them and repurchases them at the end (of the investment period). In this later case the return is the decline in the price of the assets between the sale and the repurchase. In this later case the return is the decline in the price of the assets between the sale and the repurchase. Note that the B&H strategy achieves a return equal to the difference in the price between the last day of the time interval and the first day. The decade of 1990–2000 is an example of a stable rising period, when the B&H strategy was the simple way to invest in the market. The S&H strategy is used when the stock is decaying over a period. To summarize, in most of the works (listed in Table 1) the generated returns are exclusively used as the only fitness metric without accounting for the related risk. Some examples are the use of GAs to optimize Technical Indicators (TIs) parameters, such as Fernández-Blanco, Bodas-Sagi, Soltero, and Hidalgo (2008) or to develop Trading Strategies (TSs) based on the use of TIs, for example Bodas-Sagi, Fernández, Hidalgo, Soltero, and Risco-Martín (2009), Gorgulho, Neves, and Horta (2009), Yan and Clack (2007). According to what was stated for the first time in Markowitz (1952), any TS should have the highest possible profit with the minimal risk. Sadly, these two metrics are intrinsically conflicting due to the risk-return trade-off. Some previous articles proposed the combination of the two conflicting objectives into one single metric, particularly the proposals by Bodas-Sagi et al. (2009) that use the Chicago Board Options Exchange (CBOE) Volatility Index (VIX) to gauge the risk. Also Schoreels and Garibaldi (2006) propose the use of the Capital Asset Pricing Model (CAPM) (William, 1964) system, based on Markowitz (1952) portfolio theory to reduce risk, through a balanced selection of securities. More recently, Pinto, Neves, and Horta (2011) propose and study several alternatives to the classical fitness evaluation functions. Using real Multi-Objective Optimization some studies can be found, such as Hassan and Clack (2009) where a Multi-Objective system to maximize return, as the annualized average of the returns, and minimize risk, as the standard deviation of the annualized average of the returns, was presented. Genetic Programming (GP) was used to model equations that combine the time-series input data to score a given stock. Additionally, low-frequency trading was used as the training data consisted of monthly data. In another paper by Chiam, Tan, and Mamun (2009) a Multi-Objective system to maximize the total returns and minimize risk was used. The proposed framework was tested using data obtained from only one stock market, the Singapore Exchange stock market (Straits Times Index (STI)). In this study, when analyzing the experimental results, the authors suggest that the positive connection between the gains with training data and test data,
Table 1 Investment approaches. Methodology
Heuristics
Metrics
Risk aware
Results evaluation
Kind of Data from data used
Period
Performance
Annualized return (average)
Investment strategy
Wuthrich et al. (1998)
k-NN and NN
ROI
No
B&H & mutual founds
News
DJI, Nikkei, FTSE, HSI, STI
20.8%
Long and short
‘‘Wrapper approach’’ (classification) and voting Trading Heuristics and correlate data
Prediction Accuracy
No
v2-Statistic, information gain, ReliefF, symmetrical uncertainty and CFS
Price
Korean and Taiwan stock markets indexes
6-12-1997 to 6-31998 6-1990 to 5-1991
14–30%
Huang, Yang, and Chuang (2008)
Key words found in financial newspapers published on the Web 23 TIs
64.79–80.28% prediction accuracy
Unknown
Unknown
ROI
No
B&H
1934– 2005
–
Unknown
Unknown
Chiam et al. (2009) Multi-Objective GA Several TIs
Total returns
Risk Exposure
Return and B&H
Index: DJIA and Price S&P500 and volume Price STI
Sum of total returns from 44.48 to 37.64
Unknown
Long and short
Garcia, Fernandez, GP and GA (GAP) de la Cal, and Garcia (2010) Butler and Kazakov PSO (2010)
Decision Tree, based on TIs (MA, EMA, ROC, RSI, SO) BB, MA, EMA
Sharpe ratio
B&H and other
Price
S&P500 index
Long
B&H and BB with typical parameters
Price
DJI
1990– 2004
7.7–0.28%
Long and short
ARIMA, NN, regression GA
Several
Sharp Ratio, Sortino Ratio, Accuracy No
Return
Several
Long
B&H and random strategy
2.23–3.27%
Long and short
HLP-NN
Unknown
Prediction error
No
Prediction error
Price and volume Price shanghai index
Kim and Ahn (2012)
Uses GA to optimize NN
Selected features (several TIs)
Prediction accuracy
No
Prediction Accuracy
Price
2003– 2007 1-1-2003 to 31-62009 11-181991 to 210-2009 1-1989 to 12-1998
4.4–19.6%
No
HSI, DJI, and other data 30 stocks from the DJI
Mean accumulated return of 37.02% 61.5–101.44 (return in 5 years) Sharp ratio from 0.127 to 3.616 16,68–25.29%
Unknown
Cho (2010)
Mean accumulated return ROI, Sharp, Sortino, accuracy Accuracy and ROI ROI
11-081992 to 30-122005 1988– 2005
Canelas, Neves, and Horta (2013)
GA
Pattern discovery
ROI
No
B&H and other
Price
Leigh and Purvis (2008)
Gorgulho, Neves, and Horta (2011) Wang and Wang (2011)
Spike Volume
EMA, HMA, ROC, RSI, MACD, TSI, OBV
Korea composite stock price index (KOSPI). 99 stocks from 1998– the S&P500 index 2004
7,16–9.65% Unknown (prediction error) 50.6–66.1% prediction accuracy 36,4–62.8% (average ROI)
Long
Unknown
Unknown
6.00–9.57%
Long and short
J.M. Pinto et al. / Expert Systems with Applications 42 (2015) 6699–6716
Paper
6701
6702
J.M. Pinto et al. / Expert Systems with Applications 42 (2015) 6699–6716
usually implied in single-objective proposals, may not necessarily hold true in all circumstances. The goal of this paper is to tune TSs using a Multi-Objective GA. By using this methodology stronger solutions should be uncovered, and consequently the results using out-of-sample data ought to be better too. Simultaneously, the risk is supposed to be reduced. 3. Methodology The proposed system, which was fully implemented and tested, is based on a Multi-Objective Genetic Algorithm, which is linked to a market return evaluation module. The market return evaluation module is in charge of performing the fitness evaluation for each chromosome of the evolved population. The fitness evaluation is carried out based on the estimation of the two conflicting objectives, risk and return, in the chosen market and in the specified time frame, as presented in Fig. 1. In short, the complete process can be summarized as follows: The user starts by specifying the stock market to analyze. Next he/she chooses the training and testing periods on which the framework will be used. Afterwards the Multi-Objective algorithm optimizes several Trading Strategy (TS). During this process the parameters of the initially randomly generated TSs, i.e., the Technical Indicators to use and their parameters, are optimized to be used on the chosen market, using only training data. Finally, for each entire framework run, the final generation Pareto-Frontier, the training and testing returns and their related Risk as well as the evolved optimized strategies and several other useful information are output so that the user can analyze it. In the next subsections the most important modules will be described while some implementation details are also presented. 3.1. Multi-Objective Optimization Kernel This study is focused on the optimization of TSs that must simultaneously attend two objectives: the maximization of a Return Metric and the minimization of a Risk Metric. Therefore,
in this situation the proposed framework must consider and simultaneously balance the two goals as they interact with each other and are conflicting. To deal with this kind of problem, an Evolutionary Algorithm based technique have already been developed which is called Multi-Objective Optimization (MOEA) (Deb, 2001). Multi-Objective (MO) optimization is the process of finding a set of solutions that optimize several objectives. The notion of an optimum solution is different in MO problems from what is usually used in single-objective problems since in MO optimization, instead of obtaining a single global optimum (or solution), a set of solutions or trade-offs is supplied to the user. In MO optimization, it is not always possible to say when one solution is better than another. It is straightforward to say whether one solution might be better at one specification or if another solution could be better at another objective. However, a matter arises: ‘‘– How to do that for many solutions?’’ To help understand what follows, some terms of general use in MO optimization should be introduced, such as: One solution dominates another if it is not worse than the second in all objectives and, at the same time, it is better than the second in at least one objective. It is important to underline that the domination relation is not a concept of ordering (or sorting) and that two solutions can be mutually non-dominating if neither dominates the other. This can be mathematically formulated for a ‘‘m’’ objectives minimization problem, as defined in Eqs. (1) and (2). In the concrete case of Eqs. (1) and (2), when both equations are simultaneously satisfied we say that solution ~ x dominates y: solution ~
xÞ 6 f i ð~ yÞ; f i ð~
8i ¼ 1; 2; . . . ; m
ð1Þ
9i 2 f1; 2; . . . ; mg : f i ð~ xÞ < f i ðyÞ
ð2Þ
And:
In the previous equations, the fi functions map the decision space RN to R and represent the objective functions, which should be minimized. ~ x ¼ ½x1 ; x2 ; . . . ; xn T and ~ y ¼ ½y1 ; y2 ; . . . ; yn T are vectors representing all decision variables. The set of solutions that are not dominated by any of the other solutions is called the Pareto-Frontier (PF) (or Pareto-Optimal Set or simply
Fig. 1. System overall architecture.
6703
J.M. Pinto et al. / Expert Systems with Applications 42 (2015) 6699–6716
Pareto-Front). This set of solutions ultimately represents the best set of solutions that address all the trade-offs considered in the problem. Hence, unlike single-objective optimization the optimal solutions to a Multi-Objective Optimization problem are in the form of a set of solutions (PF), and this set consists of all non-dominated solutions and are the ones that best balance all trade-offs. A given solution belonging to the PF can only have one of its objective components improved by degrading at least one of its other objective components. In this specific study, the decision space consists of all possible values that the chromosome parameters can have in order to find the best possible set of trade-offs (Risk and Return) using training data (from the training period). Therefore, the formulation can be expressed as shown in Eqs. (3) and (4). maximise f 1 ðxÞ! :¼ AnnualisedðROIÞ ð3Þ Multi-Objective Formulation ! minimise f 2 ðxÞ :¼ Risk Exposure ð3Þ Subject to: g j ð~ xÞ 6 0; j ¼ 1; 2; . . . ; m
ð4Þ
xÞ ¼ 0; k ¼ 1; 2; . . . ; p ð4Þ Multi-Objective Constraint Formulation hk ð~
Whereas f1 represents the objective function linked to return, which should be maximized according to Eq. (6), and f2 does a similar role in what concerns the objective function coupled with risk, which should be minimized and is calculated according to Eq. (7). In the previous equations ~ x ¼ ½x1 ; x2 ; . . . ; xn T represents the chromosome parameters as introduced in Tables 3–13. Finally, gi, hk map RN ! R and symbolize the constraint functions of the problem (j = 1, 2, . . ., m), (k = 1, 2, . . ., p). To illustrate some examples of x1, x2, x3, gi and hk functions, consider the specific case of the Sample Moving Average Crossover (SMAC) TI (described in Section 3.3.1 and presented in Table 3, some constraints for this particular situation, are: x1 2 Rþ (x1 (Weight of the SMAC indicator) is positive real number), x1 6 0; 25 (x1 (Weight of the SMAC indicator) is not greater than 0.25), x2;3 2 Nþ 0 (x2 and x3 (Fast and Slow MA parameters) are non negative natural numbers), 0 6 x2;3 6 32 (The interval of values for x2 and x3 is between 0 and 32), x2 6 x3 (The period of the fast MA cannot be greater than the period of the slow MA). Additional problem specific constraints should be considered, as, for instance: does not make sense to have a strategy that could be simultaneously on the market long and short, cannot invest
Table 2 Multi–objective optimization kernel parameters. Algorithm type
Generational
Selection type Method of selection Tournament size Number of genes Number of objectives Population size Crossover Probably of crossover Mutation Probably of mutation Termination criterion
Elitist Tournament 2 60 2 248 Multipoint crossover 0.8 Individual gene perturbation 0.1 200 generations
Table 3 SMAC chromosome representation. Parameter
Weight
Fast MA
Slow MA
Chromosome
0.0. . .0.25
0. . .32
0. . .32
more than the available cash, and so on, but this kind of constraints can only be considered when the simulation is done by the ‘‘Investment Simulator’’. The Multi-Objective fitness evaluation process is concerned with finding the optimal set of trade-offs between the Risk Metric and the linked Return Metric for each TS in the evolving population of chromosomes during the set trading period. During this trading period, the performance of each TS is evaluated by simulating its actions of buying or selling the assets and its related score is afterwards calculated. The Multi-Objective Genetic Algorithm chosen for this study is a version of the Non Dominated Sorting Genetic Algorithm 2 (NSGAII) (Deb, 2001; Deb, Pratap, Agrawal, & Meyarivan, 2002). The main set values for the Multi-Objective Genetic Algorithm parameters are as presented in Table 2. These parameters have been selected based on preliminary investigation and parameter tuning. The NSGAII algorithm was the selected Evolutionary Algorithm because this MOEA is acknowledged as one of the most efficient and most commonly, incorporating several prominent characteristics to speed up the search and the solution space exploration (Ghiasia, Pasinia, & Lessard, 2010; Sayyad & Ammar, 2013). Therefore, the proposed framework comprises a Multi-Objective Optimization Kernel coupled with an Investment Simulator. The communication between the two modules is made through the fitness functions. In the next subsections some details of the fitness evaluation will be discussed. 3.2. Fitness evaluation The fitness evaluation process is concerned with simulating the performance of each trading agent in the evolving population and calculating the corresponding total returns and related risk. The resultant fitness values of the trading agent must be evaluated under some established and clear metric, as we will analyze in the next subsections. 3.2.1. Return Metric The profits generated by any given TS can be measured in different ways. For instance, the potential profits can be estimated by simply summing the area under the total asset graph during the trading period (Schoreels & Garibaldi, 2005a, 2005b). Alternatively, another Return Metric could be the total final assets; this means the available capital plus the value of all holdings at the end of the investment period (Kendall & Su, 2003; Wang & Chen, 1998). Regrettably, both preceding metrics struggle with the problem of always being attached to the cash invested initially. Therefore, there is an alternative metric that instead of considering the absolute value of the holdings considers its relative value. This metric is a ratio, which is called the Rate of Return (ROR) also known as the Return on Investment (ROI), rate of profit or just return. This ratio represents the money gained or lost (whether realized or not) in an investment in respect to the amount of money invested. ROI is usually expressed as a percentage and for one period of time by definition, it is calculated as formulated in (5). In this equation Profit is the amount of money gained or lost and is sometimes referred to as interest, gain/loss, or net income/loss. Initial Investment is the money invested, and may alternatively be identified as the asset or capital.
6704
J.M. Pinto et al. / Expert Systems with Applications 42 (2015) 6699–6716
Profit Final Assets Initial Inv estiment ¼ Initial Inv estment Initial Inv estiment Final Assets ¼ 1 Initial Inv estiment
ROI ¼
ð5Þ
For multi-period investments, it is difficult to compare the ROI with the results one would get in a single period of time. Therefore, a metric that could be compared to similar alternative investments, as investment funds or bank deposits, should be used. In this study, the Annualized ROI will be used. The Annualized ROI is nothing more than the ‘‘Geometric Average of the Ratio of the Returns’’, also known as the ‘‘True Time-Weighted Rate of Return’’. Mathematically an investment lasting for N periods with full reinvestment is computed as defined in Eq. (6):
AnualisedðROIÞ ¼
p ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi N ðROI þ 1Þ 1
ð6Þ
In this equation N is the number of periods or more precisely the number of years the investment lasts. 3.2.2. Risk Metric Risk is usually seen as the volatility or the uncertainty of the expected returns over the investment period. Therefore, the linked risk of any investment technique can be estimated in several ways, as examined below. The most traditional Risk Metric is inherited from statistics and from the Markowitz Mean–Variance Model (Markowitz, 1952). It consists of the use of the results variance as a metric for risk. This variance can be calculated using the standard deviation or the variance between returns. In finance, this statistical measure of the dispersion of the results is usually named volatility. Conversely, risk can also be computed as the time the investment is on the market (Weissman, 2005). Explicitly, risk can be measured by the proportion of trading days a position is kept opened on the market in respect to the total available trading time. Mathematically, the Risk Exposure is the ratio between the time the agent is on the market and the total available trading time (as formulated in (7)). Basically, staying in the market longer corresponds to a higher exposure to risk, such as market crashes, while shorter periods in the market correspond to lower Risk Exposure and greater liquidity (as the capital is engaged for a smaller time period). In Eq. (7), ti, exit and ti,entry respectively denote the time at which the trading agent enters and exits the market, for each ith trade and T refers to the total length of the trading period.
Risk Exposure ¼
n 1X ðti;exit ti;entry Þ T i¼1
ð7Þ
Other alternative metrics have been proposed and used like, for instance, the use of Maximum Drawdown (MDD) as an estimate for risk. The Drawdown (DD) (Steiner, 2010) calculates the decline from a past historical peak in our variable (the evaluation of the total assets) compared to its current value. The DD can be calculated in terms of absolute or relative values. Fig. 2 presents how the DD and the corresponding Maximum Drawdown (MDD) are calculated in terms of relative values: Additional alternative metrics for risk can be found in the literature, such as the use of some risk-adjusted Return Metrics, like the Sharpe ratio (also known as the Sharpe index), Sortino ratio, Sterling ratio (SR), Calmar ratio (CR), or VIX. All previous metrics compute the net profitability after discounting the associated risk (Korczak & Lipinski, 2004; Neely, 2003). In short, these Risk Metrics are, in fact, alternative methods to combine into one single objective (or metric) the two conflicting goals faced in this kind of problems (risk and return). In addition, (Pinto & Neves, 2012) studied the effect of the fitness evaluation function selection on the out of sample results. In this study the authors presented the results
Fig. 2. Pseudo-code for DD and MDD calculation.
they observed, using several alternative functions they proposed and used to substitute the classical fitness evaluation function. Thus, in preparation for this study, some preliminary tests were conducted using several combinations of the previously presented metrics (return and risk). The decision was to use the Risk Exposure to gauge the risk calculated according to Eq. (7). The next paragraphs justify why this option was taken. In the first stage the metrics that combine the two conflicting objectives into one single metric (SR, CR, VIX . . .) were discarded. Since the goal of this study is to do Multi-Objective Optimization, the use of a metric that combines two conflicting objectives does not make sense. In addition to being unhelpful, this could also correspond to benefiting one of the objectives while the other one is harmed. Some preliminary tests have been conducted using the MDD as a metric for risk. However, strange behavior was perceived in the results. This odd behavior can also be confirmed by the very varied results obtained in O’Neill, Brabazon, and Ryan (2002). One must recall that MDD records the maximum of losses in the trading period. Consequently, this metric is not a worthy representative of the overall performance, since the TS can perform well almost of the time, but if even for a small period of time some losses are incurred, it can affect the overall result. Although this metric can be used as an auxiliary or extra metric to further evaluate a given strategy, computationally speaking and as a Multi-Objective goal, it presents several drawbacks if used as the main Risk Metric. Before conducting any tests using the volatility to gauge the risk (either the standard deviation or the variance between the returns), one must decide how the study period should be subdivided in order to calculate its variance (days, weeks, months, years, etc.) must be decided. At this point due to the lack of additional information, since this detail is frequently omitted from most of the available literature, the option was to use the ‘‘Annually adjusted standard deviation’’ of the ‘‘actual weekly profits’’ calculated exactly as shown in Eq. (8):
vffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ! u t u pffiffiffiffiffiffi 1 X Ann adj: std: dev : ¼ t ðr t hriÞ2 52 T 1 t¼1
ð8Þ
Here rt symbolizes the actual weekly returns or profits in the period of time t; T is the number of weeks in the trading period, coinciding with the period used for the calculation of profits; and hri represents the simple arithmetic mean of the actual profits in the trading period. By its turn, the actual weekly profits are weekly calculated as formulated in (9).
Actual profits ¼
Final Assets 1 Initial Assets
ð9Þ
6705
J.M. Pinto et al. / Expert Systems with Applications 42 (2015) 6699–6716
In the above equation Final Assets represents the total value of the holdings at the end of the reference period while Initial Assets stand for the value of the holdings at the start of the reference period. Therefore, it remains to be decided whether to use of the Variance (of the returns) or the Risk Exposure as the elected Risk Metric to be used in the remainder of this study. Consequently, some preliminary tests were conducted using either the weekly variance of the returns or the Risk Exposure. Afterwards, and in order to have a better understanding of how these two variables relate together as well as to opt for the one that could lead to better results, a correlation test between these two apparently uncorrelated variables was conducted. The method used to make this correlation test was the Monte Carlo method, which consisted in generating 15,000 random TSs. Subsequently the performance of the random generated TSs was evaluated in different markets according to these two objectives. The plot shown in Fig. 3 was built using training data from the Nikkei index, but similar graphs were also obtained using the other indexes tested in this study. The main conclusion drawn from the
plot in Fig. 3 is that these two, apparently uncorrelated, variables are in practice very highly linked together, showing a correlation coefficient between .87 and .93. Thus, the election of any of these Risk Metrics to be used in this study should have minimal influence on the final results. The decision was to choose the simplest one, which is the Risk Exposure since computationally speaking simpler functions and algorithms should be preferred as they consume less computer resources, are faster and less prone to errors (if coded properly). Consequently, in the remainder of this paper the Risk Exposure will be used to gauge the risk, more specifically the ratio between the number of trading days an open position is maintained in the market and the total available trading days, which is calculated according to Eq. (7). 3.3. Technical Indicators Module As already introduced, TSs based on the use of several Technical Indicators (TIs) are tuned in this paper. TIs are tools used in the technical analysis of financial markets that explore the existence NIKKEI225
1 0.9
Train Risk Exposure
0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0
0.02
0.04
0.06
0.08
0.1
0.12
0.14
Train Variance Fig. 3. Plots showing the correlation between Risk Exposure and Results Variance.
Fig. 4. Illustration of the SMAC operation.
0.16
0.18
6706
J.M. Pinto et al. / Expert Systems with Applications 42 (2015) 6699–6716
of trends and are used to determine potential buy, sell or hold circumstances. TIs are mathematical formulas that work on a series of data, usually stock prices or volume (Achelis, 2000). Although markets are often argued to move randomly (Fama, 1970), regularities appear, which are explored by the TIs. In the next subsections the TIs used in this paper are briefly presented as well as the chromosome structure adopted for each circumstance. 3.3.1. Sample Moving Average Crossover (SMAC) The Sample Moving Average Crossover (SMAC) is based on the use of two (Simple) moving averages (MA). Each of the MAs composing on SMAC TI are of different time periods. One of the MA is formed by the shorter of the two periods and is called the ‘‘Fast MA’’ whereas the other, with the longer period, is the ‘‘Slow MA’’. As the ‘‘Fast MA’’ reflects changes earlier than the ‘‘Slow MA’’ does, the traditional SMAC usage is as follows: a buying (or sell short) signal is generated when the Fast MA crosses over the Slow MA. Conversely, a sell (or a buy short) signal is generated when the Fast MA crosses under the Slow MA. This process is graphically illustrated in Fig. 4, this figure and the next figures explaining the Technical Indicators were built with data from finance.yahoo.com. Therefore, the parameters of the SMAC are the periods of the composing MAs. To speed up processing, and to avoid having to calculate all possible values to all MA periods, these are limited to the following set of values: 1, 4, 8, 12, 14, 16, 20, 24, 28, 32, 36, 40, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200 and 250 days, which are calculated at program start. In this set of values, the ones until 40 (inclusive) belong to the group of fast (short period) MAs, while the remaining ones belong to the group of the slow MAs. This set of periods has been chosen because it covers the most widely used long and short-term MA periods found on books and recommended by experts (Achelis, 2000; Murphy, 1999). Similar sets of values have been used in some previous papers (Schoreels & Garibaldi, 2005a, 2005b, 2006). The MA of 1 (one) day is not an MA, but the day’s security price, which is a trick to allow the GA to chose between one of the available MAs or the actual quote. Each TI can return three signals (+1, 0, or 1), therefore, in this paper, a neutral zone where the signal returned by the TI is neither to Buy long nor to Enter Short has also been considered. In this paper, a small enhancement to the traditional SMAC usage has been considered, as presented next. First, a threshold value that is equal to 5% current stock evaluation is considered; then, when the Fast MA is greater than the threshold plus the Slow MA, +1 is returned by the TI; when the Fast MA is lower than the Slow MA minus the threshold, 1 is returned by the TI; in all other cases (that is: when the Slow MA neither exceeds nor is exceeded by more than 5% by the Fast MA) the signal returned by this TI is 0. The chromosome structure (or Genetic Encoding) used for the SMAC TI is as summarized in Table 3. The entries are natural numbers in the interval of values between 0 and 32 as they encode, in one integer variable, the MA period as previously described. This is denoted in the chromosome representation by ‘‘0. . .32’’ (note the absence of a decimal point). In the same chromosome representation, the weight given to the current Technical Indicator is adjustable between 0.0 and 0.25, represented by ‘‘0.0. . .0.25’’. The values allowed are real ones, between 0.0 and 0.25 (note the existence of a decimal point). 3.3.2. Exponential Moving Average Crossover (EMAC) The working of the Exponential Moving Average Crossover (EMAC) TI is in everything similar to the previously presented SMAC TI, with the only replacement of the use of Simple MA by an Exponential MA (EMA).
The Genetic Encoding used for the EMAC TI is as summarized in Table 4. 3.3.3. Sample Moving Average Crossover, Version 2 (SMAC2) In this study another enhancement related to the traditional SMAC TI is proposed and studied. This time the previously described neutral zone is also made variable, which means that its value together with the periods of the MAs are adjusted by the GA. One should recall that the threshold value has been previously fixed at ±5% of stock evaluation. Therefore, the chromosome structure has to be adjusted in accordance, as summarized in Table 5. This time the threshold value can be adjusted between 0% and 100% of day stock quotation. This is denoted in the chromosome representation by ‘‘0.0. . .100. 0’’, and it means that in this case the values allowed are real values, i.e., all real values between 0.0 and 100.0 (note the presence of a decimal point). The same way the entries denoted in chromosome representation by ‘‘0. . .32’’ (absence of a decimal point) are natural numbers in the interval of values between 0 and 32, encoded as explained in Section 3.3.1. 3.3.4. Exponential Moving Average Crossover, Version 2 (EMAC2) The same applies to the Exponential version of this TI, as summarized in Table 6. 3.3.5. Bollinger Bands (BB) Bollinger Bands (BB) is a Technical Indicator that creates a price channel around the asset evaluation, as depicted in Fig. 5. This price channel can be used to identify if the asset is overbought or oversold and, thus, create trading signals for buying or selling. The main components of a BB are: 1 – an N days MA, called middle band; 2 – an upper band located k times above the standard deviation of the middle band; and 3 – a lower band which is k times below the standard deviation of the middle band. Therefore, BB Technical Indicator has two parameters to tune, which are the number of days (period) of the MA and the value of the k factor. Hence, the case used to exemplify the TI operation in Fig. 5 was built using data from the S&P index from April 2014 till the end of July 2014. In this graph one can observe that when the stock quotation touches or surpasses the upper BB, a Sell (or buy short) signal is generated, and conversely when the price touches the lower BB, a buy (or sell short) signal is generated. When the price of the asset is above the upper band, it is considered overbought, and equally, a stock, which is trading under the lower band, is oversold. Several different uses can be found in the available literature. Nevertheless, in this study the one used
Table 4 EMAC chromosome representation. Parameter
Weight
Fast EMA
Slow EMA
Chromosome
0.0. . .0.25
0. . .32
0. . .32
Table 5 SMAC2 chromosome representation. Parameter
Weight
Fast MA
Slow MA
Threshold [%]
Chromosome
0.0. . .0.25
0. . .32
0. . .32
0.0. . .100.0
Table 6 EMAC2 chromosome representation. Parameter
Weight
Fast EMA
Slow EMA
Threshold [%]
Chromosome
0.0. . .0.25
0. . .32
0. . .32
0.0. . .100.0
J.M. Pinto et al. / Expert Systems with Applications 42 (2015) 6699–6716
6707
MA and the value of the k factor.
Fig. 5. Illustration of the BB operation.
is as follows: when the price is above the MA plus k times Std. Dev., this indicator returns 1 (sell); when the quotation is below MA minus k times Std. Dev., this indicator returns +1 (buy), or else it returns 0 (hold). To conclude, in Table 7 the chromosome structure of the BB Technical Indicator is presented. 3.3.6. Bollinger Bands (BB), Version 2 (BB2) A small variation to the classical BB TI is also proposed and tested, which consists on smoothing the actual quote, this is done by passing it through a short period MA before triggering the remaining BB logic. Consequently, the chromosome structure is as presented in Table 8: To summarize, the working of the proposed TI is as follows: when the price MA is above the Middle Band MA plus k times Std. Dev., this TI returns 1 (sell). When the price MA is below Middle Band MA minus k times Std. Dev., it returns +1 (buy). In any other circumstances it returns 0 (hold). 3.3.7. Relative Strength Index (RSI) The Relative Strength Index (RSI) is a Technical Indicator that was developed by J. Welles Wilder. It is a momentum oscillator that, in short, compares the magnitude of recent gains to recent losses in an attempt to uncover oversold or over bought assets. RSI is calculated as defined in (10).
RSI ¼ 100 1
1 ð1 þ RSÞ Av erageGain RS ¼ Av erageLoss
From the previous equation, we can see that the RSI calculation is broken into three basic steps: Calculate RS, Calculate Average of Gains and Calculate Average of Losses. According to Wilder book, Average of Gains and Average of Losses should be calculated using an Exponential MA with a period of 14 samples. In this study the smoothing period is made variable, it is a parameter to be tuned by the GA, and the values are smoothed using an Exponential MA. The gains and losses are simply the differences between the previous values (observed in the last trading period) and the actual values of the asset under consideration. Thus, for each trading period an upward change U or downward change D is calculated. Up periods are characterized by their close value being higher than their previous one, and U and D are calculated as formulated in (11):
U ¼ closetoday closeprev ious D¼0
D ¼ closeprev ious closetoday
Parameter
Weight
Middle band MA
k
Chromosome
0.0. . .0.25
0. . .32
0.0. . .1.0
Table 8 BB2 chromosome representation. Parameter
Weight
Price MA
Middle band MA
k
Chromosome
0.0. . .0.25
0. . .32
0. . .32
0.0. . .1.0
ð11Þ
Conversely, a down period is distinguished by the close value being inferior to its value in previous period, and is calculated as formulated in (12). Note that in all cases U and D are always non-negative numbers.
U¼0 Table 7 BB Chromosome representation.
ð10Þ
ð12Þ
From Eq. (10) it is easily recognizable that RSI oscillates between zero and 100, and traditionally, according to Wilder’s original use, an asset is considered overbought when its RSI is above 70 and oversold when its RSI is below 30. In this study, both preceding parameters have been made variable so that the GA kernel can tune them. In Fig. 6 an example of the RSI operation is illustrated. The top line is the index stock evaluation of the DAX index from dates Feb 2014 till end of July 2014. At the button part of the same illustration, its RSI Technical Indicator value is presented. When the top and button levels are considered, respectively, at 80 and 20, several sell and buy points can be identified.
6708
J.M. Pinto et al. / Expert Systems with Applications 42 (2015) 6699–6716
Fig. 6. Illustration of the RSI operation.
Table 9 RSI chromosome representation. Parameter
Weight
Smoothing EMA period
Bottom level
Upper level
Chromosome
0.0. . .0.25
0. . .32
0.0. . .100.0
0.0. . .100.0
Finally, in Table 9 the chromosome structure adopted for the RSI indicator is presented. In the abundant literature available, there are several alternative interpretations and consequent uses for the RSI TI to conduct successful trading on financial markets. In this study two different uses have been implemented. The first one consists on Selling (1) when the RSI value is over the Upper Level, Buying (+1) once RSI is below Bottom Level, and keep the previous position (0-hold) when RSI is between Upper and Lower levels. 3.3.8. Relative Strength Index, Version2 (RSI_T) In the literature, another exploit of RSI TI is also of common use and consists on Buying (+1) when the RSI value crosses up the Bottom Level, Sell (1) when the RSI value crosses down the Upper Level and, in all other cases, keep the previous position (0). Therefore, the chromosome structure is the same, as already presented in Table 9. To conclude this TI presentation, the following equations sum up the RSI_T operation (Eq. (13)):
Buy : RSIðt 1Þ < BottomLev el & RSIðtÞ > BottomLev el Sell : TSIðt 1Þ > UpperLev el & RSIðtÞ < UpperLev el
ð13Þ
3.3.9. Stochastic Oscillator (SO) The Stochastic Oscillator is a momentum TI that indicates where the actual close value is in relation to the high-low asset price in a given number of trading periods. The periods can be days, weeks, months or intraday timeframes. The changes observed with
the SO can be used to predict future changes in the direction of the price tendencies. SO calculation is split in several steps. First, a K value is calculated as shown in (14).
KðnÞ ¼ 100
closetoday lowestCloseðnÞ highestHighðnÞ lowestLowðnÞ
ð14Þ
In this formula lowestLow(n) is the lowest price observed in the period of n look back periods and highestHigh(n) is the highest price observed in the same interlude of time. After K is calculated, a D value is also calculated, which is the value of K smoothed by a short period MA (formula (15)).
Dðn; mÞ ¼ MAðKðnÞ; mÞ
ð15Þ
SO is an oscillator TI that makes it easy to identify overbought and oversold levels, and no matter how fast a security advances or declines, the Stochastic Oscillator will always fluctuate within the range of values between zero and one hundred. To be usable two levels must be set so that outcomes above or below them are considered overbought or oversold conditions, and thus, opportunities to explore and make profits. Traditional SO use is to consider that values higher than 80 are overbought conditions and values below 20 are oversold opportunities. In this paper both levels are adjusted by the GA kernel in order to better explore market opportunities. In Fig. 7 an example of the SO operation is illustrated. The top line is the index stock evaluation of the DAX index from Feb 2014 till the end of July 2014, at the button part of the same illustration are presented its SO K and D values. Additionally, several overbought and overbought points are identified. Consequently, the SO parameters that were made variable so they could be tuned by the GA kernel are the look back interlude of time (n), the MA smoothing period (m), and the Lower and Upper Levels. In Table 10 the chromosome structure is presented. For the SO usage, multiple interpretations appear in literature. The main differences between them usually appear linked to different profiles of investment/risk, as it is implied in what follows.
J.M. Pinto et al. / Expert Systems with Applications 42 (2015) 6699–6716
6709
Fig. 7. Illustration of the SO operation.
Table 10 SO chromosome representation. Parameter
Weight
K period (n)
Chromosome 0.0. . .0.25 0. . .32
D smoothing Period (m)
Lower level
Upper level
0. . .32
0.0. . .100.0 0.0. . .100.0
The first SO usage is the most conservative one and consists on considering a buy signal when both SO_D and SO_K values are below the bottom level, and a sell signal when both SO_D and SO_K are above the upper level. In any other circumstances the previous position is held (hold). 3.3.10. Stochastic Oscillator, Version 2 (SO2) The second interpretation is a more risky and aggressive one so it buys when either SO_D or SO_K values are below the bottom level, and sells when either SO_D or SO_K are above the upper level. Otherwise the previous position is held. The chromosome structure and the calculation of SO K and D values are as already explained in previous subsection. 3.3.11. Stochastic Oscillator, Version 3 (SO3) A third interpretation has also been implemented in this study. According to this interpretation, only the SO_K value is used (so SO_D is useless) and consists on buying when SO_K is below the bottom level and selling when SO_K is above the upper level, otherwise the previous position is held. The chromosome structure and SO_K calculation remains the same as previously described. 3.3.12. Volatility Index (VIX) The VIX is an index that gauges the Chicago Board Options Exchange’s volatility. It scores the level of volatility of a range of securities based on the S&P 500 index. Despite being grounded on the S&P 500 index, this indicator is recognized by the experts as an ‘‘investor fear gauge’’ as it reflects investors’ best predictions
of near-term market volatility, or risk. Therefore, VIX rises in epochs of financial anxiety and reduces when investors are more confident. To illustrate the previous claim in Fig. 8 the stock index S&P 500 close value and the matching VIX value for the same period of time are presented. In this graph one can observe that the VIX value is low when the market essentially rises, and that when the market declines, the VIX value increases, reaching very high values above 30 and more. Robert E. Whaley originally introduced the CBOE Volatility Index (VIX) in 1993. The VIX computation besides requiring several kinds of data, some of which are difficult to obtain, is beyond the scope of this study. Therefore, the daily value of VIX is obtained from the finance.yahoo.com database. Usually VIX has an inverse relationship to the stock market, which means that VIX rises when stocks decline and decreases when stocks increase in value. Some can think that volatility would have no influence in the market direction, but the stock markets are easily influenced by bullish and bearish feelings. A rising stock market is viewed as less risky while a declining stock market is connected to more risk. Therefore, the higher the perceived risk is, the higher the implied volatility. Hence, a down swing or extended decline in prices increases the demand for put options, which in turn increases the implied volatility. This is why many analysts consider the VIX a coincident indicator as it moves when stocks move. VIX can be used alone or in conjunction with another Ti. The later is used as a trend-confirming indicator since it often moves in the opposite direction of stock markets. In addition, the VIX can also trade in ranges that mark extremes. These extremes can be used to anticipate stock market reversals, which is what is done in the first proposed implementation of the VIX based TI that works as explained below: Buys (+1) when actual VIX value is below a set Level, and Sells (1) when VIX is above this Level. Consequently, the chromosome structure is as presented in Table 11 so the Lower level can be tuned by the GA kernel.
6710
J.M. Pinto et al. / Expert Systems with Applications 42 (2015) 6699–6716
2000
S&P_500 Close VIX
1800 1600
90 80
1200
70
VIX
Index Close
100 1400
60
1000
50 40
800
30 20
600
10 400 01/Jan/06
01/Jan/07
01/Jan/08
01/Jan/09
01/Jan/10
01/Jan/11
01/Jan/12
01/Jan/13
0 01/Jan/14
Fig. 8. Graph comparing VIX and S&P index values.
Table 11 VIX chromosome representation.
Table 13 VIX_derived chromosome representation.
Parameter
Weight
Level
Parameter
Weight
VIX MA
Chromosome
0.0. . .0.25
0.0. . .100.0
Chromosome
0.0. . .0.25
0. . .32
3.3.13. VIX and SMAC (VIX_SMAC) The second interpretation consists in smoothing the VIX value with two moving averages with different periods and similarly to what is done in the previously described SMAC TI generate trade signals based on the crossing these two MA. Accordingly, when Fast VIX MA is greater than Slow VIX MA, this TI returns a Sell (1) signal and when the Fast VIX MA is lower than the Slow VIX MA, a Buy (+1) signal is returned. The chromosome structure (or Genetic Encoding) used for the VIX_SMAC TI is as summarized in Table 12. The First and Slow MA periods are natural numbers in the interval of values between 0 and 32, as they encode, in one integer variable, the MA period.
3.3.14. VIX derived (VIX_derived) A third interpretation and its related use is proposed and studied in this paper. It consists on deriving the VIX value and generating trading signals based on the result. The working is as presented next: 1 – First, the VIX value is smoothed using a MA (MA(VIX)); 2 – then the derived of the MA(VIX) is calculated; 3 – finally, when the derived is negative, a buy (+1) signal is returned or a sell signal is generated (1). Since we are dealing with discrete sequences of values temporally ordered, the derived is obtained by simply calculating the difference between the actual and the previous value of the variable, as formulated in (16):
Deriv edðxÞ ¼ xðtÞ xðt 1Þ
ð16Þ
Finally, the chromosome structure used is as summarized in Table 13.
Table 12 VIX_SMAC chromosome representation. Parameter
Weight
VIX Fast MA
VIX Slow MA
Chromosome
0.0. . .0.25
0. . .32
0. . .32
3.3.15. Stop Loss, Take Profit and Sick Time Not forgetting the goals of building a system able to, at the maximum possible extent, operate continuously and almost autonomously requiring minimal human intervention, some rules adopted by real world professionals have been incorporated in the framework, which are the rules to ‘‘Stop Losses’’ and to ‘‘Take Profits’’. The Stop Losses rule is a way to stop the losses before they become bigger. To accomplish this, an order is automatically placed to sell the security when it reaches a certain price below the one at which it was bought. This mechanism is intended to limit the losses in a given trade. Although most investors associate a stop-loss order only with a long position, it can also be used for a short position. In this later case, the security would be bought if it trades above a set price. The Take Profits rule does analogous functions, but in favorable cases. This rule is triggered when the trader is happy enough with the earnings achieved so far and closes the position to take immediate possession of the profits. To accomplish this an order is automatically placed to sell the security when it reaches a certain price above the one at which it was bought. In the case of short positions the security is bought when its price is below the value it was bought by a certain amount. Finally, the sick time rule avoids automatically reopening and closing positions on the market without being in or out of the market for, at least, a given number of trading days. To do this, a counter is loaded with a given number of days whenever a trade is made. Afterward, until this counter does not reach zero, no trades are allowed. The values of Stop Loss have been set at 13%, take profits at 25%, and sick time to 10 days. These values have been set after a series of preliminary experiments to specifically allow normal short term price fluctuations, and only trigger to prevent as much abnormal events as possible. The sick time has to be set too, namely to allow the market conditions change after a stop loss or a take profits trade, and to avoid incurring in the same error again but also let the framework catch the market opportunities.
J.M. Pinto et al. / Expert Systems with Applications 42 (2015) 6699–6716
3.4. The Investment Simulator The Investment Simulator Module simulates an investment in the user-specified index, including long and short positions. This stock market index can be bought (‘‘go Long’’), sold and after stay out of the market (‘‘Out’’) or even sold without owning any (‘‘go Short’’), hoping to profit from a decline in the price of the assets between the sale and the repurchase. Since daily data is available, the Investment Simulation entails providing the agent with some initial cash to spend and simulating the agent’s performance every day. This simulation consists on letting the agent buy or sell (‘‘long’’ or ‘‘short’’) the chosen index at the end of day if the conditions encoded in the given Investment or Trading Strategy (TS) are met – The given TS is the TS under evaluation. The resulting total assets are calculated summing the cash plus the evaluation of the index at current stock close price. Every evolved TS uses, in its core, several Technical Indicators, which are combined to generate an overall decision. The TIs that can be used are described in the subsection entitled ‘‘Technical Indicators Module’’ and depending on the signals returned by the individual TIs, an overall decision is made based on a weighted sum of all TIs. The overall decision can be of buy (long), sell (long), hold, buy (or enter) short, and sell (or exit) short for the chosen market index. The amount of capital invested is always all the available capital. The weight given to each TI is also a parameter of the chromosome, meaning that it is also tuned by the GA along with the TIs parameters. A maximum number of 10 TIs can be used to build up a single TS, and a given TI can appear several times on the same TS. Depending on the weighted sum of all TIs, three types of decisions were defined: Neutral – If the weighted sum is higher than 0.2 and lower than +0.2. Weak Sell – If the weighted sum is between 0.2 and 0.6. Strong Sell – If the weighted sum is lower than 0.6. Weak Buy – If the weighted sum is between +0.6 and +0.2. Strong Buy – If the weighted sum is higher than + 0.6. The action to be taken, i.e., the actions of buying or selling, depends on the level of the weighted sum and on the actual state. Consequently, a table stipulating which will be the ‘‘next state’’, depending on the ‘‘previous state’’ and the ‘‘decision type’’, has been considered in this paper, as presented in Table 14. Finally, the actions of buying or selling are determined by the strategy encoded in the chromosome when suggested by the indicator to buy or sell, when buying invests all of the capital, and when selling releases all securities owned (full reinvestment). Securities that are sold or bought are converted into capital at their current closing price. At end of the training period, the total assets the given TS can achieve are evaluated. In order to simulate the real conditions of a real market as much as possible, tests were conducted using transaction costs of 0.5%, 0.1% and 0.02% of the amount involved for every transaction (buy/sell, long/short). Table 14 ‘‘Next State’’, function of ‘‘Previous State’’ and ‘‘Decision Type’’. Weighted Sum
[+2, +0.6[
[+0.6, +0.2[
The environment is presumed discrete and deterministic in a liquid market. Dividends are not included in the simulation as well as no interest rate is received when the money is not invested (cash on hand). 3.5. Adaptive system A variety of arguments in favor of implementing adaptive approaches to evolving Trading Strategies can be found in literature (Angelov, Buswell, Wright, & Loveday, 2001; Pi & Rögnvaldsson, 1995; Schoreels, 2008; Trojanowski & Michalewicz, 1999). The apparent advantage presented by such systems would be their ability to operate continuously and almost autonomously without requiring human intervention. An adaptive approach is characterized by continuously retraining the population of TSs. Accordingly, the available data is not divided into training and testing data sets, but represents one continuous set, and the population is retrained whenever a new bulk of data is considered. This is done for a given number of generations and using the most up-to-date bulk of data. To simulate a system like this in our tests, the system is first initialized with a randomly generated initial population. Then, this population is trained for 200 generations with one year of data before any out-of-sample evaluation is performed. Thereafter the non-dominated population is used to forecast the future stock price evolution and its performance evaluated using the next three months of previously unseen data. Subsequently, the non-dominated population is also retained and retrained using the next bulk of data, this time for 100 generations and using one year of data. After retraining, the non-dominated population is again used to forecast the next three months of previously unseen data and its performance evaluated. This process is repeated until all the available data is exhausted while the system performance is recorded in a file for further analysis. It is important to emphasize that the non-dominated population is kept and retrained whenever a new bulk of data is considered and its holdings and capital remain continuous through time. Making an analogy to a human trader, this can be the equivalent to sending a group of traders, who are each managing a portfolio, to a workshop or to visit a school for a period of time. When they return to their jobs, possibly with new or updated knowledge, they continue with the same holdings and capital to manage. The above description does not mean that all TSs are changed whenever a new bulk of data is considered. However, the less successful TSs are replaced by more successful ones that emerge from the evolving population. This way holdings and capital remain continuous in the population of TSs. The number of generations used for the initial training and subsequent retraining as well as the amount of data used for training and retraining was set considering the results of a series of preliminary experiments and taking also into account the results of some previous works (Schoreels, 2008; Schoreels & Garibaldi, 2005a, 2005b). In Fig. 9 is presented a pseudo-code to better explain the how the proposed system works. 3.6. Framework evaluation methodology
[+0.2, 0.2]
]0.2, 0.6]
]0.6, 2]
Previous state Decision type
Short Out Long
6711
Strong buy
Weak buy
Neutral
Weak sell
Strong sell
Out Long Long
Out Out Long
Out Out Out
Short Out Out
Short Short Out
Historical daily prices were used for training and testing the proposed framework, which was obtained from finance.yahoo.com database. Data from the main stock indexes of the foremost developed economies, namely the indexes S&P 500 (USA), FTSE 100 (England), DAX 30 (Germany), NIKKEI 225 (Japan) and NASDAQ (USA), was used. The data used to validate the system covers the time from the beginning of January 2004 to 31 May 2014 over a period of more than 10 years. At this point, it is also important to
6712
J.M. Pinto et al. / Expert Systems with Applications 42 (2015) 6699–6716
Fig. 9. Pseudo-code for the adaptive system.
recall that 250 days of prior historical data is required before any training and/or testing can be started since all MA must be valid before any technical analysis can be done. The process, as already explained in Section 3.5, involves dividing the available data into several bulks with 3 months of data each, and then feeding it to the system. Additionally, to better clarify the results 30 independent experimental runs were performed. The results were collected in separate files, analyzed, and the results presented. 4. Results Before presenting the results, we must remember that a Multi-Objective Evolutionary Optimization of TSs is considered in this paper. Therefore, the maximization of a Return Metric and the minimization of the related Risk Metric are the goals. In this kind of problem the optimal solutions exist in the form of a set of trade-offs known as the Pareto-Optimal Set (FP). For all the solutions belonging to the FP, no objective can be improved without damaging the other one. Hence, the problem will be modeled directly as a Multi-Objective Optimization problem by simultaneously optimizing returns and risk. 4.1. Performance analysis In Fig. 10 an example of the PFs evolved for the 5 indexes tested in this study is presented for one of the experimental runs
performed. In this plot, the Risk Exposure is on the horizontal-axis, calculated as explained in Section 3.2.2 and according to Eq. (7). In the same plot, the Return Metric is on the vertical-axis, as presented in Section 3.2.1 and computed as defined in (6). These PFs were observed during one of the steps of the adaptive evolution, in this case the bulk of training is from 2009/01/15 to 2010/01/18. Though the various solutions sets observable in this figure vary in terms of Pareto dominance and optimality, all clearly illustrate the inherent trade-off between return and risk. Furthermore, the evolved TSs are able to generate high returns in open positions in less than 100% of the trading period. Examples of this are the achievable annualized ROIs of about 20% with Risk Exposures around 0.4. In Fig. 11 it is shown an example of the daily performance of one of the trained TSs when tested using testing data (line ‘‘Trained Strategy’’). In this figure an example of the financial data used to optimize the strategy (line ‘‘Index Close’’) is also observable. The case presented in this illustration was built using data from the S&P 500 index and corresponds to the most risky risk profile (risk profile 1). In this same illustration, the X-axis is time, the Y-axis is the assets evaluation, and all values on the Y-axis are normalized so that all Y-axis plots start at 100. In the bottom part, the state of the strategy (line ‘‘State’’) is represented, it shows when it is on the market ‘‘long’’ (state = 10), ‘‘out’’ of the market (sate = 0), and when it is on the market ‘‘short’’ (sate = 10). When the daily performance of the most risky TS is compared with a most moderate one, as shown in Fig. 12, the clearest difference is that the TS of moderate risk was able to avoid the large Drawdown in the middle of the year 2011, in which the riskiest strategy incurred. As a result, at the end of simulation period the strategy of moderate risk was able to have a bigger return. To have a closer idea of which TSs are being used in each situation, in Table 15 some of the evolved TSs are presented for the same conditions considered in Fig. 11. One must remember that the tests were conducted simulating the performance of an adaptive system so when each new bulk of data was considered, all TSs were retrained and, consequently, they could be changed to be better adapted to the new bulk of data. Therefore, the leftmost two columns in the table are the periods of time when the strategy is effective. The next columns are, respectively, the weight given to the TI, the Technical Indicator used, and its parameters. The TIs’ names and their parameters are according to what was presented in Section 3.3. In Table 15 the four TIs
Trained Population (2009/01 - 2010/01) 80
FTSE100 DAX SP500 NIKKEI225 NASDAQ
70
Annualised ROI [%]
60 50 40 30 20 10 0 0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Risk Exposure Fig. 10. Evolved Pareto Fronts for the 5 indexes tested.
0.8
0.9
1
6713
J.M. Pinto et al. / Expert Systems with Applications 42 (2015) 6699–6716
Stocks Evolution (1.0) 250
Index Close Trained Stratergy State
150 State
Assets Evaluation
200
100
50
10 0
0 -10 01/Jan/06 01/Jan/07 01/Jan/08 01/Jan/09 01/Jan/10 01/Jan/11 01/Jan/12 01/Jan/13 01/Jan/14 Fig. 11. Example of the daily closing prices, and daily performance of the most risky trained TS (S&P 500 index).
Stocks Evolution (0.5) 300
Index Close Trained Stratergy State
200 State
Assets Evaluation
250
150
100 10
50
0 0 -10 01/Jan/06 01/Jan/07 01/Jan/08 01/Jan/09 01/Jan/10 01/Jan/11 01/Jan/12 01/Jan/13 01/Jan/14 Fig. 12. Example of the daily closing prices, and daily performance for moderate risk TS (S&P 500 index).
Table 15 One Example of the evolved TSs (most risky – S&P 500 index). Start date
End date
TI 1
TI2
TI3
TI4
Weight TI
Param.
Weight TI
Param.
Weight TI
Param.
Weight TI
Param.
0.174
VIX
58.46
0.209
EMAC2
16, 130,0.58
0.164
SO2
90, 65.22, 99.11
0.174
VIX
58.46
0.209
EMAC2
16, 130,0.58
0.164
SO2
90, 65.22, 99.11
0.239 0.165
160, 0.76 65
0.114 0.220
BB2 SO
0.177 0.118
SO2 BB
12, 67.72, 92.71 250, 0.16
12, 60
0.104
0.227
RSI
4, 40
0.112
VIX derived BB2
1, 170,0.51 4, 28, 71.64, 87.42 65 1, 75, 0.042
0.244
SO1
4, 7.91, 83.27 1, 65, 0.079 12, 95, 0.36 4.499
0.102
VIX
0.66
0.236
SO2
14, 69.103, 94.29 4, 60, 70.37, 73.61 24, 68.84, 97.87
0.101
VIX
1.43
0.240
SO
0.208
BB2
4, 40, 0.46
0.140
BB2
0.105
SO
1, 60, 10.34, 85.39
0.234
RSIT 14, 29.53, 54.92
3-1-2006
7-4-2006
0.245
SO
7-4-2006
13-7-2006
0.245
SO
13-7-2006 16-10-2006
16-10-2006 23-1-2007
0.231 0.210
BB2 VIX
130, 8, 52.36, 94.46 130, 8, 52.36, 94.46 12, 65, 0.10 76.09
23-1-2007
27-4-2007
0.199
VIX
72.96
0.168
27-4-2007
1-8-2007
0.165
VIX
60.77
0.134
1-8-2007
2-11-2007
0.220
VIX
4.93
0.229
BB VIX derived VIX SMAC VIX SMAC RSIT
2-11-2007
8-2-2008
0.242
12, 12
0.201
SMAC2
8-2-2008
14-5-2008
0.184
VIX SMAC SO
0.129
EMAC2
14-5-2008
18-8-2008
0.118
BB2
16, 90, 50.68, 97.51 4, 75, 0.22
0.235
VIX
20, 70, 68.13, 97.75 1, 70, 0.084
6714
J.M. Pinto et al. / Expert Systems with Applications 42 (2015) 6699–6716
with more weight are represented for the period of time from 3-1-2006 to 18-8-2008. In order to have a better insight of the results, 30 (thirty) experimental runs were performed; the results collected, and then discrete intervals of 0.1 Risk Exposure are considered. With this data, charts similar to the one shown in Fig. 13 were built. This figure plots an example of the observed distribution of the Annualized ROI in function of the Risk Exposure; the example shown is for the case of NASDAQ index. This illustration shows the First Quartile of data (Q1) and the Third Quartile of data (Q3) as well as the Median, with the whiskers located respectively at 10% and 90% of data in the 30 independent runs performed. Again in this same illustration the risk-returns trade-off is evident where the Median of the Annualized ROI increases for higher levels of Risk Exposure. The main conclusion that can be drawn from the previous plot is that the Median of test returns improves when the training risk increases although a steady increase is clearly observable in the variance of the test returns, see Fig. 14. This also confirms the claim that higher training returns correspond to increased volatility in the test returns’ results. In the finance area it is problematic to compare results with other papers since the periods and the type of assets where the strategy is tested are different. Fig. 15 presents the distribution of test returns at discrete intervals of training risk for the DAX
index, without the use of the VIX indicator. Here when the risk increases the returns have a big dispersion with positive and negative values. After introducing the VIX indicator, the negative returns disappear, see Fig. 13 and Table 16. The VIX indicator boosts the returns of this strategy by enabling the algorithm to exit the market when volatility increases. This reduces losses when there are big or small declines in the market. Table 16 summarizes the annualized ROI observed for each set of the 30 independent runs performed. Tests were executed with the 5 indexes under analysis in this study, and considering transaction costs of 0.5%, 0.1% and 0.02% of the involved capital. For each set of tests the median as well as Q1, Q3 and Std. Dev. of the observed results are presented in the same table. The most evident conclusion from Table 16 is that for all five indexes attractive annualized ROI values are achievable. Furthermore, the profits rise when the transaction costs are shrunk. Despite the apparent drop in the returns, observed with FTSE index, when transaction cost lowers from 0.1% to 0.02% it could be statically irrelevant. However, this can also be attributed to the fact that the GA adapts to everything. Therefore, when it is trained using a different charge rate, the system adapts, trading more actively when the costs are smaller. In Table 17 the observed annualized ROI for each set of 30 independent runs performed are summarized. The tests were again
Annualized ROI at discrete intervals of 0.1 Risk Exposure 10 8
Quartiles Median Average
ROI [%]
6 4 2 0 -2 0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1.0
Risk Exposure Fig. 13. Annualized testing ROI when discrete intervals of 0.1 Risk Exposure are considered (NASDAQ index – 1/Jan/06 to 31/May/14).
Std. Dev. when Discret intervals are considerd 2.2 2 1.8
Std. Dev.
1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1.0
Risk Exposure Fig. 14. Sdt. dev. of testing ROI when discrete intervals of 0.1 Risk Exposure are considered (NASDAQ index – 1/Jan/06 to 31/May/14).
J.M. Pinto et al. / Expert Systems with Applications 42 (2015) 6699–6716
6715
5. Conclusions and future work
Fig. 15. Distribution of test returns at discrete intervals of training risk for the DAX index, without the VIX indicator.
Table 16 Summary of observed annualized ROI considering several transaction costs for all Indexes under test (Risk Exposure 1–1/Jan/06 to 31/May/14). Index
Transaction cost
NASDAQ – ROI Median NASDAQ – Q1 of ROI NASDAQ – Q3 of ROI NASDAQ – Sdt. Dev. of ROI FTSE 100 – ROI Median FTSE 100 – Q1 of ROI FTSE 100 – Q3 of ROI FTSE 100 – Sdt. Dev. of ROI DAX – ROI Median DAX – Q1 of ROI DAX – Q3 of ROI DAX – Sdt. Dev. of ROI NIKKEY – ROI Median NIKKEY – Q1 of ROI NIKKEY – Q3 of ROI NIKKEY – Sdt. Dev. of ROI S&P500 – ROI Median S&P500 – Q1 of ROI S&P500 – Q3 of ROI S&P500 – Std. Dev of ROI
0.5%
0.1%
0.02%
6.46% 4.71% 7.72% 1.78 5.97% 5.34% 7.06% 1.14 12.46% 10.44% 13.46% 1.68 10.72% 8.56% 12.12% 2.19 8.06% 7.41% 11.28% 2.34
10.70% 9.79% 11.43% 1.76 7.67% 6.76% 8.15% 0.99 14.43% 12.44% 15.87% 2.26 15.26% 14.01% 17.08% 2.13 11.02% 9.43% 12.55% 1.99
11.60% 10.28% 13.52% 2.04 7.27% 6.68% 8.15% 0.96 15.97% 14.27% 16.44% 1.75 16.68% 15.16% 18.37% 2.52 12.23% 10.43% 13.06% 1.64
This paper presents an innovative TSs optimizer which combines the VIX indicator with a dual-objective Evolutionary Computation optimization kernel. The proposed approach is able to avoid several falls in the stock market, reducing the possible negative returns. This is achieved by using several Technical Indicators to define the trend of the index and the VIX indicator to avoid the main stock drops. The proposed approach also balances and presents investment strategies with different levels of return and risk. The proposed approach was validated using real and public available market data from some of the most well-known market indexes, i.e., NASDAQ, S&P 500, FTSE 100, DAX 30 and also NIKKEI 225. The results show a return of higher than 10% annual for the period of 2006–2014 in the NASDAQ and DAX indexes, in a period that includes the stock market crash of 2008. Although the proposed approach clearly outperforms market indexes and reduces the investment risk, it is limited to market information obtained from technical analysis indicators, which may not be enough to anticipate abrupt market moves. The use of additional indicators, particularly, Fundamental Analysis indicators should be considered in future work to improve TS robustness. The use of single market indicators for defining the TS is a present limitation, which can easily be overcame by considering several market indexes simultaneously leading again to an increase on TS robustness. Future work, also, includes the use of the proposed approach to trade more risky assets such as growth and emerging market stocks. In order to improve the risk aversion of the system other indicators than VIX could be added. The performance, execution time, can also be enhanced by applying parallel and distributed approaches.
Acknowledgment This work was supported in part by Fundação para a Ciência e a Tecnologia (Project UID/EEA/50008/2013).
References Table 17 Summary of observed Annualized ROI for some values of Risk Exposure, and for all Indexes under test (transaction cost of 0.1% – 1/Jan/06 to 31/May/14). Index
NASDAQ – ROI Median NASDAQ – Sdt. Dev. of ROI FTSE 100 – ROI Median FTSE 100 – Sdt. Dev. of ROI DAX – ROI Median DAX – Sdt. Dev. of ROI NIKKEY – ROI Median NIKKEY – Sdt. Dev. of ROI S&P500 – ROI Median S&P500 – Sdt. Dev. of ROI
Risk Exposure 0.2
0.4
0.6
0.8
1.0
4.08% 1.23 6.48% 0.94 10.62% 1.91 9.39% 2.28 7.38% 1.02
7.22% 1.83 6.95% 0.88 13.96% 1.84 11.88% 2.12 9.50 1.29
7.92% 1.677 7.97% 1.24 13.27% 2.37 14.53% 2.29 7.86% 1.11
10.02% 1.94 7.67% 0.91 15.69% 2.18 13.28% 2.72 10.21% 1.73
10.70% 1.76 7.67% 0.99 14.43% 2.26 15.26% 2.13 11.02% 1.99
carried with the 5 indexes tested, and this time the results are presented for some values of Risk Exposure, considering a fixed transaction cost of 0.1%. By observing Table 17 it is easy to conclude that the volatility of the results increases when the Risk Exposure rises (as already claimed). Nevertheless, a steady increase in the Annualized ROI results is noticeable when greater values of Risk Exposure are admitted.
Achelis, S. B. (2000). Technical analysis from A to Z (2nd ed.). New York: McGraw-Hill. Allen, F., & Karjalainen, R. (1995). Using genetic algorithms to find technical trading rules. Working paper, The Wharton School, University of Pennsylvania. Allen, F., & Karjalainen, R. (1999). Using genetic algorithms to find technical trading rules. Journal of Financial Economics, 51, 245–271. Angelov, P., Buswell, R. A., Wright, J. A., & Loveday, D. L. (2001). Evolving rules-based control. In European symposium on intelligent technologies, hybrid systems and their implementation on smart adaptive systems (EUNITE) (pp. 36–41). Bodas-Sagi, D. J., Fernández, P., Hidalgo, J. I., Soltero, F. J., & Risco-Martín, J. L. (2009). Multiobjective optimization of technical market indicators. In Proceedings of the 11th annual conference genetic and evolutionary computation conference (GECCO), 1999–2004. Butler, M., & Kazakov, D. (2010). Particle swarm optimization of Bollinger bands. In Proceedings of the 7th international conference on swarm intelligence (ANTS’10) (Vol. 6234, pp. 504–511). Canelas, A., Neves, R., & Horta, N. (2013). A SAX-GA approach to evolve investment strategies on financial markets based on pattern discovery techniques. Expert Systems with Applications (ESWA), 40(5), 1579–1590. Chen, S.-H. (2002). Evolutionary computation in economics and finance. Springer. Chiam, S. C., Tan, K. C., & Mamun, A. Al. (2009). Investigating technical trading strategy via an multi-objective evolutionary platform. Expert Systems with Applications, 36(7), 10408–10423. Cho, V. (2010). MISMIS – A comprehensive decision support system for stock market investment. Knowledge-Based Systems, 23(6), 626–633. Deb, K. (2001). Multi-objective optimization using evolutionary algorithms. John Wiley and Sons. Deb, K., Pratap, A., Agrawal, S., & Meyarivan, T. (2002). A fast and elitist multiobjective genetic algorithm: NSGA-II. IEEE Transactions on Evolutionary Computation, 6(2), 182–197. Fama, E. F. (1970). Efficient capital markets: A review of theory and empirical work. The Journal of Finance, 25(2), 383–417.
6716
J.M. Pinto et al. / Expert Systems with Applications 42 (2015) 6699–6716
Fernández-Blanco, P., Bodas-Sagi, D. J., Soltero, F. J., & Hidalgo, J. I. (2008). Technical market indicators optimization using evolutionary algorithms. In Proceedings of the GECCO conference on genetic and evolutionary computation (GECCO) (pp. 1851–1857). Garcia, M. E., Fernandez, M., de la Cal, E. A., & Garcia, R. Q. (2010). Improving return using risk-return adjustment and incremental training in technical trading rules with GAPs. Applied Intelligence, 33(2), 93–106. Ghiasia, H., Pasinia, D., & Lessard, L. (2010). A non-dominated sorting hybrid algorithm for multi-objective optimization of engineering problems. Engineering Optimization, 43(1), 39–59. Gorgulho, A., Neves, R., & Horta, N. (2009). Using GAs to balance technical indicators on stock picking for financial portfolio composition. In Proceedings of the 11th annual conference genetic and evolutionary computation conference (GECCO) (pp. 2041–2046). Gorgulho, A., Neves, R., & Horta, N. (2011). Applying a GA kernel on optimizing technical analysis rules for stock picking and portfolio composition. Expert Systems with Applications (ESWA), 38(11), 14072–14085. Graham, B., Zweig, J., & Buffett, W. E. (2003). The intelligent investor (revised ed). Collins Business. Hassan, G., & Clack, C. D. (2009). Robustness of multiple objective GP stock-picking in unstable financial markets. In Proceedings of the 11th annual conference on genetic and evolutionary computation (GECCO) (pp. 1513–1520). Huang, C.-J., Yang, D.-X., & Chuang, Y.-T. (2008). Application of wrapper approach and composite classifier to the stock trend prediction. Expert Systems with Applications (ESWA), 34(4), 2870–2878. Kendall, G., & Su, Y. (2003). A multi-agent based simulated stock market – testing on different types of stocks. In Proceedings of the 2003 congress on evolutionary computation (CEC’03) (Vol. 4, pp. 2298–2305). Kim, K.-J., & Ahn, H. (2012). Simultaneous optimization of artificial neural networks for financial forecasting. Applied Intelligence, 36(4), 887–898. Korczak, J. J., & Lipinski, P. (2004). Evolutionary building of stock trading experts in a real-time system. In Proceedings of the 2004 congress on evolutionary computation (CEC 2004) (Vol. 1, pp. 940–947). Korczak, J., & Roger, P. (2002). Stock timing using genetic algorithms. Applied Stochastic Models in Business and Industry, 18(2), 121–134. Leigh, W. E., & Purvis, R. L. (2008). Implementation and validation of an opportunistic stock market timing heuristic: One-day share volume spike as buy signal. Expert Systems with Applications (ESWA), 35(4), 1628–1637. Markowitz, H. M. (1952). Portfolio selection. The Journal of Finance, 7(1), 77–91. Murphy, J. J. (1999). Technical analysis of financial markets: A comprehensive guide to trading methods and applications. New York Institute of Finance, New York: Prentice Hall Press. Neely, C. J. (2003). Risk-adjusted, ex ante, optimal, technical trading rules in equity markets. International Review of Economics and Finance, 12(1), 69–87. O’Neill, M., Brabazon, A., & Ryan, C. (2002). Forecasting market indices using evolutionary automatic programming: A case study. In Genetic algorithms and genetic programming in computational finance (pp. 175–195). Springer. Pi, H., & Rögnvaldsson, T. S. (1995). A neural network approach to futures trading. In Proceedings of the 3rd international conference on neural networks in the capital markets (pp. 17–25).
Pinto, J., Neves, R., & Horta, N. (2011). Fitness function evaluation for MA trading strategies based on genetic algorithms. In Proceedings of the 13th annual conference companion on Genetic and evolutionary computation (GECCO ‘11) (pp. 819–820). Pinto, J. M., & Neves, R. F. (2012). Maximize profit while minimizing risk, a fitness function evaluation study using genetic algorithms. In Proceedings of the 5th international conference on bioinspired optimization methods and their applications (BIOMA 2012) (pp. 333–345). Sayyad, A. S., & Ammar, H. (2013). Pareto-optimal search-based software engineering (POSBSE): A literature survey. In 2nd international workshop on realizing artificial intelligence synergies in software engineering (RAISE) (pp. 21– 27). Schoreels, C., & Garibaldi, J. M. (2005). A comparison of adaptive and static agents in equity market trading. In Proceedings of the EEE/WIC/ACM international conference on intelligent agent technology (IAT ‘05) (pp. 393–399). Schoreels, C., & Garibaldi, J. M. (2005). The effect of varying parameters on performance for adaptive agents in technical equity Market trading. In Proceedings of the 3rd IEEE international conference on computational cybernetics (ICCC 2005) (pp. 243–248). Schoreels, C., & Garibaldi, J. M. (2006). Genetic algorithm evolved agent-based equity trading using technical analysis and the capital asset pricing model. In Proceedings of the 6th international conference on recent advances in soft computing (RASC2006) (pp. 194–199). Schoreels, C. (2008). Investigations into novel strategies for intelligent agent-based decision making. Thesis submitted to the University of Nottingham for the degree of Doctor of Philosophy. Steiner, A. (2010). Ambiguity in calculating and interpreting maximum drawdown. Research Note, Andreas Steiner Consulting GmbH, 1-7. Trojanowski, K., & Michalewicz, Z. (1999). Evolutionary algorithms for nonstationary environments. In Proceedings of 8th workshop: Intelligent information systems (pp. 229–240). Wang, J.-H., & Chen, S.-M. (1998). Evolutionary stock trading decision support system using sliding window. In Proceedings of the 1998 IEEE international conference on computational intelligence (pp. 253–258). Wang, L., & Wang, Q. (2011). Stock market prediction using artificial neural networks based on HLP. In Third international conference on intelligent humanmachine systems and cybernetics (IHMSC) (Vol. 1, pp. 116–119). Weissman, R. L. (2005). Mechanical trading systems: Pairing trader psychology with technical analysis. Wiley Trading. Whitley, D. (1994). A genetic algorithm tutorial. Statistics and Computing, 4(2), 65–85. William, F. S. (1964). Capital asset prices: A theory of market equilibrium under conditions of risk. The Journal of Finance, 19(3), 425–442. Wuthrich, B., Cho, V., Leung, S., Permunetilleke, D., Sankaran, K., & Zhang, J., et al. (1998). Daily stock market forecast from textual web data. In 1998 IEEE international conference on systems, man, and cybernetics (Vol. 3, pp. 2720–2725). Yan, W., & Clack, C. D. (2007). Evolving robust GP solutions for hedge fund stock selection in emerging markets. In Proceedings of the 9th annual conference on genetic and evolutionary computation (GECCO) (pp. 2234–2241).