Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please summarize this journal, the length of the summary should not be more than two pages with 1.5 spacing, size 12 Times New Rome. Expert

Please summarize this journal, the length of the summary should not be more than two pageswith 1.5 spacing, size 12 Times New Rome.

image text in transcribed Expert Systems with Applications 38 (2011) 11347-11354 Contents lists available at ScienceDirect Expert Systems with Applications journal homepage: www.elsevier.com/locate/eswa Intelligent stock trading system based on improved technical analysis and Echo State Network Xiaowei Lin, Zehong Yang , Yixu Song State Key Laboratory of Intelligent Technology and System, Tsinghua National Laboratory for Information Science and Technology, Department of Computer Science and Technology, Tsinghua University, Beijing 100084, China a r t i c l e Keywords: Stock trading system Technical analysis Genetic Algorithm Echo State Network i n f o a b s t r a c t Stock trading system to assist decision-making is an emerging research area and has great commercial potentials. Successful trading operations should occur near the reversal points of price trends. Traditional technical analysis, which usually appears as various trading rules, does aim to look for peaks and bottoms of trends and is widely used in stock market. Unfortunately, it is not convenient to directly apply technical analysis since it depends on person's experience to select appropriate rules for individual share. In this paper, we enhance conventional technical analysis with Genetic Algorithms by learning trading rules from history for individual stock and then combine different rules together with Echo State Network to provide trading suggestions. Numerous experiments on S&P 500 components demonstrate that whether in bull or bear market, our system signicantly outperforms buy-and-hold strategy. Especially in bear market where S&P 500 index declines a lot, our system still prots. 2011 Elsevier Ltd. All rights reserved. 1. Introduction Data mining in stock market has been a hot topic for a long time due to its potential prots. Unfortunately, stock market is a complex and dynamic system with noisy, non-stationary and chaotic data series (Peters, 1994). Stock movement is affected by complicated factors, which can be divided into two groups: one is determinant, such as gradual power change between buying and selling side; the other is random factors, such as emergent affairs or daily operation variations (Bao & Yang, 2008). Therefore, data mining in stock market is very difcult and challenging. Recently, advances in articial intelligence have led to a number of interesting new approaches to stock data mining, based on non-linear and non-stationary models. Among them, soft computing techniques, such as fuzzy logic, neural networks and probabilistic reasoning draw most attention because of their ability to handle uncertainty and noise in stock market (Vanstone & Tan, 2003, 2005). Applications range from time series prediction, classication to rule induction. Although past studies have attained remarkable achievement in stock data mining, especially price prediction, they seldom directly guide trading. Future price forecast is not enough to suggest ideal trading operation to get prot as much as possible. An ideal trading operation should occur at the peak or bottom of price trend, that is, a good investor will sell stocks near the top of the trend and buy Corresponding author. Tel.: +86 10 62796828; fax: +86 10 62782266. E-mail addresses: xiaow.lin@gmail.com (X. Lin), yangzehong@sina.com (Z. Yang), songyixu@sohu.com (Y. Song). 0957-4174/$ - see front matter 2011 Elsevier Ltd. All rights reserved. doi:10.1016/j.eswa.2011.03.001 them close to the bottom. Thus, it is important to predict not only the future price but also when the price trend will hit the peak or bottom. In real market, technical analysis is widely used to assist decision-making. Its central idea is to look for peaks, bottoms, trends and indicators to estimate the possibility of current trend reversal and then make buy/sell decisions based on technical indicators which are some statistics derived from recent historical data (Bao & Yang, 2008). However, traditional technical analysis suffers from some shortcomings. First, it is difcult to directly apply technical analysis on individual stocks, especially for green hand. Technical analysis usually appears in a form as a trading rule. Take the popular ''Golden Cross'' and ''Dead Cross'' for example, if the sigh of (long-term moving average) (short-term moving average) changes from positive to negative, it is called ''Golden Cross'' which indicates to buy stocks; if the sign of (long-term moving average) (short-term moving average) changes from negative to positive, it is called ''Dead Cross'' which suggests to sell stocks. In the above description, it is hard to decide the time spans for both long-term and short-term moving average (MA) because each stock should have its own appropriate time spans. Investors usually choose those parameters according to their experience. Second, there are various technical analysis approaches, such as moving average approach, relative strength indicator (RSI) approach and stochastic indicator approach. Not all of them are effective for every stock. How to choose proper technical analysis methods for individual stock is also difcult for ordinary investors. In this paper, we propose an intelligent stock trading system based on enhanced technical analysis and neural network. Genetic 11348 X. Lin et al. / Expert Systems with Applications 38 (2011) 11347-11354 Algorithm (GA) is utilized to improve traditional technical analysis by learning appropriate parameters for each trading rule. Then, the improved trading rules behave as experts together to give trading suggestions with a novel neural network-Echo State Network (ESN). The experiments demonstrate that whether in bull or bear market, our system will gain more income than buy-and-hold strategy. Particularly, it can still earn in bear market. The rest of the paper is organized as follows: Section 2 describes the application of GA to improve traditional technical analysis; Section 3 introduces ESN and our system; Section 4 shows the experiments and results. Finally, we make a conclusion and suggest for further research. 2. Technical analysis enhancements Technical analysis tends to forecast future price movements based on the study of past markets. It assumes that history will repeat itself and tries to identify archetypal patterns which have appeared in the past to predict what is likely to happen in the future. Although it has been recognized as one of the most reliable techniques for dealing stocks (Baba, Kawachi, Nomura, & Sakatani, 2004), it is not convenient to utilize technical analysis directly because it often appears as trading rules with parameters which have to be determined through experience. In this section, we improve traditional technical analysis with GA. 2.1. Genetic Algorithm GAs are heuristic search techniques that are based on the theory of natural selection and evolution (Holland, 1992). They are particularly suitable for multi-parameter optimization problems in which an object function is subject to numerous hard and soft constraints (Kim, Min, & Han, 2006; Kim & Shin, 2007). In this paper, GA helps to enhance traditional technical analysis by generating a combination of parameters with which the corresponding trading rule will identify optimal trading points as close as possible to real reversal points of trends. GA usually consists of four stages: initialization, selection, crossover and mutation. In the initialization stage, a population of genetic structures, called chromosomes that are randomly distributed in the solution space, is selected as the starting point of the search (Kim & Shin, 2007). Then, each chromosome, which represents a potential solution of the target problem, is evaluated by a user-dened tness function. Through selection, the chromosomes with high performance will be preserved and propagate from generation to generation. The crossover forms a new offspring between two randomly selected ''good parent'' (Kim & Shin, 2007). And the mutation guarantees that it is possible to reach any point in the search space. For real-world applications of optimization problems, choosing tness function is the most critical step (Kim & Shin, 2007). In this paper, we design the tness function to measure how close the suggested trading points are to those turning points of price trends. Suppose that there is an expected trading point sequence T = {T1, T2, . . . , Tn}, in which buying and selling signals are staggered. For every expected trading point Ti, we search for operation signal Sj given by a specied technical analysis approach between its last and the next expected trading point (Ti1 0. Let Mzt maxzt1 ; zt1 1 ; . . . ; zt , if conditions (8) and (9) are met, it is time to buy Mzt > b c 8 zt b \u0016 10 \u0016 c wk c and %D %K a, the candlestick is called hammer or the length of body hanging man, which indicates price reversal in the future. 2.6.2. Dark cloud cover The pattern of dark cloud cover is composed of two candlesticks in which a black one follows a white one and jnext day's closeprevious day's openj d and |previous day's close next day's open| > e, it suggests a bullish trend in the future. Conversely, if an engulng pattern whose second candlestick is a black one appears at the end of an uptrend and satises |next day's open previous day's close| > f and |next day's close previous day's open| > g, it suggests a bearish trend in the future. 3. Stock trading system Our stock trading system is based on a novel recurrent neural network (RNN)-Echo State Network (ESN). Each technical analysis Fig. 4. ROC divergence analysis. Fig. 6. Candle patterns. X. Lin et al. / Expert Systems with Applications 38 (2011) 11347-11354 system behaves as an expert and gave their forecast about whether critical trend turning will happen according to current closing price. If it is time to buy, the system will give a buying signal with value of 1; if it is time to sell, it will give a selling signal with value of 1; or it will give a signal with value of 0 which suggests no operation. Then all the signals offered by each system are fed into an ESN to evaluate whether it is appropriate to buy or sell the specied stock at current closing price. Investors can make their trading decisions by referring to the system's output which is a score showing how close current price is to future's ideal trading point. 3.1. Echo State Network ESN is a novel RNN recently proposed by Jaeger and Haas (2004). Its basic idea is to use a large ''reservoir'' RNN as a supplier of interesting dynamics from which the desired output is combined (Jaeger, 2002). Compared with other conventional neural networks, the training of ESN is very simple and it does not need to worry about local convergence that traditional neural networks often confront with. ESN can be taken to all basic tasks of signal processing and control, including time series prediction, inverse modeling, pattern generation, event detection and classication, modeling distributions of stochastic processes, ltering and nonlinear control (Jaeger & Haas, 2004). It has been applied in wireless communications (Jaeger & Haas, 2004), robot control (Ishii, van der Zant, Becanovic, & Ploger, 2004) and speech recognition (Jaeger, Lukosevicius, & Popovici, 2007; Skowronski & Harris, 2007) and achieved good results. A standard ESN is composed of input, hidden (also called ''reservoir'') and output layers (see Fig. 7). Note that connections directly from the input to the output layer and connections between output neurons are also allowed. Assume that u(n + 1) is an input vector at time step (n + 1), the activation of internal state x(n + 1) is updated according to xn 1 f W in un 1 Wxn W back yn 17 where f = (f1, . . . , fn) are the internal unit's activation functions (typically sigmoid functions) (Jaeger, 2001); Win, W and Wback are input- hidden, hidden-hidden and output-hidden connections' matrices, respectively and y(n) is the output at time step n. The network output is obtained through the following equation: yn 1 f out W out un 1; xn 1; yn out out f1 ; . . . fLout 18 where f are the output unit's output functions; Wout represents output connections; and (u(n + 1), x(n + 1), y(n)) is the concatenation of the input, internal, and previous output activation vectors. ESN differs from previous recurrent neural network in that only Wout should be modied during learning process and any regression method is available. In this paper, a standard ESN with 100 neurons in the reservoir is adopted. For each input channel, the input connection weights Fig. 7. The architecture of standard ESN (Jaeger & Haas, 2004). 11351 are randomly chosen to be 1, 1 and 0 with probabilities 20%, 20% and 60%. The feedback connection weights are randomly sampled from the uniform distribution between [1, 1]. The activation of internal state is computed according to xn 1 1=1 exp2 W in un 1 Wxn W back yn t 19 where t is noise data randomly sampled from [5 106, 5 106]. Note that in our application, y(n) is not the actual output of last time step. To avoid error iteration, y(n) is a coarse judgment about whether the last price stands for a possible reversal or not with the methodology mentioned in Bao and Yang (2008). If last price is a candidate bottom, y(n) = 1; if it is a candidate peak, y(n) = 1; or y(n) = 0. The output of ESN is calculated with linear function. The current design of ESN relies only on the selection of spectral radius (the largest eigenvalue) of the reservoir's weight matrix. In order to have echo states, the spectral radius of the internal connection weight matrix W must satisfy jkmax j 0) for trading operation rst. If the system's output is less than h, it is time to buy the stock; if the system's output is more than h, it is time to sell it. Because it is probable that too many trading signals appear near price reversal points, we adopt the strategy that we operate after the real reversal appears.: we continue smoothing the price online with smaller parameters using the same turning point selection method to obtain candidate reversal points. When trading suggestion comes up, we should rst judge whether there exists a possible turning point. If so, follow the suggestion at once; otherwise, we'd better wait until a candidate turning point emerges and execute suggested operation. and our system prots up to 41.6% in average. Statistically, among the 438 stocks, buy-and-hold strategy gains in 280 stocks but losses in 158 stocks; our trading system gains in 413 stocks, losses in 10 stocks and suggests no operation in 15 stocks. Fig. 10 shows the overall market performance of buy-and-hold strategy and our system. Further observation nds that among the 280 stocks that buyand-hold strategy prots, our system gains more income in 202 stocks; among the 158 stocks that buy-and-hold strategy decits, our system still prots in 136 stocks and losses less in other 20 stocks. Table 1 lists the prot margin of buy-and-hold strategy and our trading system in some randomly selected stocks. Trading log of stock CAG (Fig. 11) shows that our trading system can approximately catch reversal points and give corresponding advice for dealing stock. In a word, our trading system can outperform buy-and-hold strategy in bull market. 4. Experiments and results 4.2. Experiments in bear market To evaluate the performance of our system extensively, we test gains and losses of nearly all stocks of S&P 500 components which cover data over 3000 points and compare the average prots with S&P 500 index and buy-and-hold strategy in bull and bear markets respectively. Each stock is trained and tested alone. Suppose $10,000 initial fund for each of them, we trade all funds/stocks at each operation and consider transaction cost as 0.5%. In training set, each technical analysis approach is improved using GA and they cooperate to provide input for ESN. Then ESN is trained to approximate a series of triangle functions that is converted from the original price series. In testing set, each enhanced technical analysis method offers their judgment about whether current point is a buy (with value of 1), sell (with value of 1) or no operation (with value of 0) point according to current closing price, which is fed into the trained ESN to give an integrated evaluation about how close current price is to real trend reversal. Investors make decisions according to output of the system and their previous setting of trading threshold. Our system also performs simulated trading on 324 stocks from September 2000 to September 2002 (with over 500 daily prices) for testing and adopts data of the previous 2000 days for training. In the testing period, S&P 500 index losses about 26.5%; buy-and-hold strategy losses 20.3% in average but our system is still able to gain 26.5% in average. Among the 375 stocks, buy-and-hold strategy gains in 116 stocks but losses in 259 stocks; our trading system gains in 324 stocks, losses in 28 stocks and suggests no operation in 23 stocks. Fig. 12 shows the overall market performance of our system and buy-and-hold strategy. Further observation nds that among the 116 stocks that buyand-hold strategy prots, our system obtains more income in 4.1. Experiments in bull market Our system performs simulated trading on 438 stocks of S&P 500 components from December 2003 to November 2005 (with over 500 daily prices) for testing and adopts price data of the previous 2000 days for training. In the testing period, S&P 500 index gains about 18.9%; buy-and-hold strategy gains 20.5% in average Fig. 10. Overall performances in bull market. 11353 X. Lin et al. / Expert Systems with Applications 38 (2011) 11347-11354 Table 1 Prots of individual stock in bull market. Stock Table 2 Prots of individual stock in bear market. Model Stock Buy-and-hold (%) AIG ANDW BEN CAG CCU EDS HNZ KO MKC PDCO PNC SANM TUC TXT WY XRX Trading system (%) 8.96 22.56 98.98 1.29 22.32 16.59 0.17 9.72 3.07 46.41 15.50 64.04 57.25 52.82 5.79 16.80 18.12 16.34 79.59 45.23 12.41 21.52 14.57 4.51 16.00 45.28 27.48 0.54 77.50 30.60 35.38 36.59 Model Fig. 11. Trading log of CONAGRA FOOD INC (CAG), prot 45.23%. Buy-and-hold (%) Trading system (%) 78.09 63.4 14.4 22.32 15.3 33.09 1.06 91.44 5.18 34.93 43.36 85.99 55.61 34.42 35.79 6.81 ADI BJS CD CCU DOW FPL HBAN HPQ KRI LTD MYG PMTC SLB TMO WYE ZION 17.68 76.00 64.5 12.41 46.4 22.44 12.58 4.64 18.25 10.89 2.68 14.51 7.0 20.51 19.74 18.59 Fig. 13. Trading log of FPL GROUP INC (FPL), prot 22.44%. 5. Conclusions Fig. 12. Overall performances in bear market. 104 stocks; among the 259 stocks that buy-and-hold strategy losses, our system still prots in 208 stocks, suggests no trading operation in 23 stocks and losses less in the other 28 stocks. Table 2 lists the prot margin of buy-and-hold strategy and our system in some randomly selected stocks. Trading log of FPL (Fig. 13) shows that even in bear market, our system can master the uctuation of price on the whole and capture opportunities to earn. In a word, our trading system not only outperforms buy-andhold strategy but also keeps proting in bear market. In this paper, we propose a novel stock trading system based on ESN, which combines a variety of technical analysis approaches enhanced by GA. Simulated experiments in the whole market present that no matter in bull or bear markets, our trading system will obtain more income than buy-and-hold strategy. Especially in bear market in which S&P 500 index drops a lot, our system still prots. Although our system can facilitate investors in trading decision, how to select appropriate parameters of our model for individual stock is worth further exploration. Parameters, such as the radius of ESN's reservoir and trading threshold, may inuence the prots of our system. The results of the above simulated experiments are attained by manually selecting proper parameters. Unfortunately, it is very difcult to determine parameters. Stock market is a very complicated dynamic system. The parameters which are suitable for training set cannot be guaranteed to be proper for testing set. Further work also includes introducing more enhanced technical analysis approaches and augmenting the system with other soft computing techniques. References Baba, N., Kawachi, T., Nomura, T., & Sakatani, Y. (2004). Utilization of NNs & GAs for improving the traditional technical analysis in the nancial market. SICE Annual Conference, 2(2), 1409-1412. 11354 X. Lin et al. / Expert Systems with Applications 38 (2011) 11347-11354 Bao, D., & Yang, Z. (2008). Intelligent stock trading system by turning point conrming and probabilistic reasoning. Expert Systems with Applications, 34(1), 620-627. Holland, J. H. (1992). Adaptation in natural and articial systems. Ann Harbor, MI: MIT Press. Ishii, Kazuo, van der Zant, Tijin, Becanovic, Vlatko, & Ploger, Paul (2004). Optimization of parameters of echo state network and its application to underwater robot. In SICE annual conference in Sapporo (Vol. 3, pp. 2800- 2805). Jaeger, H. (2001). The ''Echo State'' approach to analyzing and training recurrent neural networks. GMD-German National Research Institute for Computer Science, vol. GMD Report 148. Jaeger, Herbert. (2002). Short term memory in echo state networks. GMD-Report 152, GMD-German National Research Institute for Computer Science. Jaeger, H., & Haas, H. (2004). Harnessing nonlinearity: Predicting chaotic systems and saving energy in wireless communications. Science, 304(5667), 78-80. Jaeger, H., Lukosevicius, M., & Popovici, D. (2007). Optimization and application of echo state networks with leaky integrator neurons. Neural Networks, 20(3), 335-352. Kim, M.-J., Min, S.-H., & Han, I. (2006). An evolutionary approach to the combination of multiple classiers to predict a stock price index. Expert Systems with Applications, 31(2), 241-247. Kim, H.-J., & Shin, K.-S. (2007). A hybrid approach based on neural networks and genetic algorithms for detecting temporal patterns in stock markets. Applied Soft Computing, 7(2), 569-576. Ozturk, M. C., Xu, D., & Prncipe, J. C. (2007). Analysis and design of echo state networks. Neural Computation, 19(11), 111-138. Peters, E. E. (1994). Fractal market analysis: Applying chaos theory to investment and economics. New York: Willey & Sons, Inc. Skowronski, M. D., & Harris, J. G. (2007). Automatic speech recognition using a predictive echo state network classier. Neural Networks, 20(3), 414-423. Vanstone, B., & Tan, C. (2003). A survey of the application of soft computing to investment and nancial trading. In Proceedings of the 8th Australian & New Zealand intelligent information systems conference (ANZIIS 2003), Sydney, Australia, 10-12 December. Vanstone, B., & Tan, C. N. W. (2005). Articial neural networks in nancial trading. In M. Khosrow-Pour (Ed.), Encyclopedia of information science and technology. Idea Group

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Financial Accounting

Authors: Richard Lewis, David Pendrill

7th Edition

0273658492, 978-0273658498

More Books

Students also viewed these Finance questions

Question

Answered: 1 week ago

Answered: 1 week ago

Question

A greater tendency to create winwin situations.

Answered: 1 week ago

Question

Improving creative problem-solving ability.

Answered: 1 week ago