Applying genetic algorithms with speciation for optimization of grid template pattern detection in financial markets

Abstract This paper presents a new computational finance approach. It combines a grid pattern recognition technique allied to an evolutionary computation optimization kernel based on Genetic Algorithms, creating a dynamic way to attribute a score to the signal that takes volatility into consideration and normalizing the pattern detection by fixing the grid size with the ultimate goal of reduce risk and increase profits. For pattern matching, a template based approach using a fixed size grid of weights is adopted to describe the desired trading patterns, taking not only the closing price into consideration, but also the variation of price in each considered time interval of the time series. The scores assigned to the grid of weights will be optimized by the Genetic Algorithm and, at the same time, the genetic diversity of possible solutions will be preserved using a speciation technique, giving time for individuals to be optimized within their own niche. The adoption of this approach has the goal of reducing the investment risk and check if it outperforms similar approaches. This system was tested against state-of-the-art solutions, namely the existing adaptable grid of weights and a non speciated approach, considering real data from the stock market. The developed approach using the grid of weights had 21.3% of average return over the testing period against 10.9% of the existing approach and the use of speciation improved some of the training results as genetic diversity was taken into consideration.

[1]  Risto Miikkulainen,et al.  Evolving Neural Networks through Augmenting Topologies , 2002, Evolutionary Computation.

[2]  Sang-Chin Yang,et al.  Portfolio optimization problems in different risk measures using genetic algorithm , 2009, Expert Syst. Appl..

[3]  Angelo Marcelli,et al.  Speciation in evolutionary algorithms: adaptive species discovery , 2011, GECCO '11.

[4]  Nuno Horta,et al.  Applying a GA kernel on optimizing technical analysis rules for stock picking and portfolio composition , 2011, Expert Syst. Appl..

[5]  Dario Floreano,et al.  Neuroevolution: from architectures to learning , 2008, Evol. Intell..

[6]  Francisco Guijarro,et al.  A dynamic trading rule based on filtered flag pattern recognition for stock market price forecasting , 2017, Expert Syst. Appl..

[7]  Nuno Horta,et al.  Trading with optimized uptrend and downtrend pattern templates using a genetic algorithm kernel , 2011, 2011 IEEE Congress of Evolutionary Computation (CEC).

[8]  Kevin Warwick,et al.  A Genetic Algorithm with Dynamic Niche Clustering for Multimodal Function Optimisation , 1999, ICANNGA.

[9]  Dorothea Heiss-Czedik,et al.  An Introduction to Genetic Algorithms. , 1997, Artificial Life.

[10]  Yu Pei Huang,et al.  A New Perspective of Performance Comparison among Machine Learning Algorithms for Financial Distress Prediction , 2019, Appl. Soft Comput..

[11]  David B. Fogel,et al.  Evolutionary algorithms in theory and practice , 1997, Complex.

[12]  Charles E. Taylor Adaptation in Natural and Artificial Systems: An Introductory Analysis with Applications to Biology, Control, and Artificial Intelligence. Complex Adaptive Systems.John H. Holland , 1994 .

[13]  Tak-Chung Fu,et al.  Stock time series pattern matching: Template-based vs. rule-based approaches , 2007, Eng. Appl. Artif. Intell..

[14]  Tak-Chung Fu,et al.  Representing financial time series based on data point importance , 2008, Eng. Appl. Artif. Intell..

[15]  Nuno Horta,et al.  Combining rules between PIPs and SAX to identify patterns in financial markets , 2016, Expert Syst. Appl..

[16]  Willie T. Kearney,et al.  Using Genetic Algorithms to Evolve Artificial Neural Networks , 2016 .

[17]  P. Werbos,et al.  Beyond Regression : "New Tools for Prediction and Analysis in the Behavioral Sciences , 1974 .

[18]  Nuno Horta,et al.  Combining Support Vector Machine with Genetic Algorithms to optimize investments in Forex markets with high leverage , 2018, Appl. Soft Comput..

[19]  J. D. Schaffer,et al.  Combinations of genetic algorithms and neural networks: a survey of the state of the art , 1992, [Proceedings] COGANN-92: International Workshop on Combinations of Genetic Algorithms and Neural Networks.

[20]  Sotirios Chatzis,et al.  Forecasting stock market crisis events using deep and statistical machine learning techniques , 2018, Expert Syst. Appl..

[21]  Russell L. Purvis,et al.  Market timing: a test of a charting heuristic , 2002 .

[22]  Francisco Guijarro,et al.  Stock market trading rule based on pattern recognition and technical analysis: Forecasting the DJIA index with intraday data , 2015, Expert Syst. Appl..

[23]  Lashon B. Booker,et al.  Intelligent Behavior as an Adaptation to the Task Environment , 1982 .

[24]  J. Murphy Technical Analysis of the Financial Markets , 1999 .

[25]  E. Fama EFFICIENT CAPITAL MARKETS: A REVIEW OF THEORY AND EMPIRICAL WORK* , 1970 .

[26]  Chengqi Zhang,et al.  An Efficient Implementation of the Backtesting of Trading Strategies , 2005, ISPA.

[27]  Nuno Horta,et al.  A hybrid approach to portfolio composition based on fundamental and technical indicators , 2015, Expert Syst. Appl..

[28]  Michael J. Shaw,et al.  Genetic algorithms with dynamic niche sharing for multimodal function optimization , 1996, Proceedings of IEEE International Conference on Evolutionary Computation.

[29]  David E. Goldberg,et al.  Genetic Algorithms with Sharing for Multimodalfunction Optimization , 1987, ICGA.

[30]  Nuno Horta,et al.  A SAX-GA approach to evolve investment strategies on financial markets based on pattern discovery techniques , 2013, Expert Syst. Appl..

[31]  Kyong Joo Oh,et al.  Pattern Matching Trading System Based on the Dynamic Time Warping Algorithm , 2018, Sustainability.