Training Multilayer Perceptron with Genetic Algorithms and Particle Swarm Optimization for Modeling Stock Price Index Prediction

Predicting stock market (SM) trends is an issue of great interest among researchers, investors and traders since the successful prediction of SMs' direction may promise various benefits. Because of the fairly nonlinear nature of the historical data, accurate estimation of the SM direction is a rather challenging issue. The aim of this study is to present a novel machine learning (ML) model to forecast the movement of the Borsa Istanbul (BIST) 100 index. Modeling was performed by multilayer perceptron-genetic algorithms (MLP-GA) and multilayer perceptron-particle swarm optimization (MLP-PSO) in two scenarios considering Tanh (x) and the default Gaussian function as the output function. The historical financial time series data utilized in this research is from 1996 to 2020, consisting of nine technical indicators. Results are assessed using Root Mean Square Error (RMSE), Mean Absolute Percentage Error (MAPE) and correlation coefficient values to compare the accuracy and performance of the developed models. Based on the results, the involvement of the Tanh (x) as the output function, improved the accuracy of models compared with the default Gaussian function, significantly. MLP-PSO with population size 125, followed by MLP-GA with population size 50, provided higher accuracy for testing, reporting RMSE of 0.732583 and 0.733063, MAPE of 28.16%, 29.09% and correlation coefficient of 0.694 and 0.695, respectively. According to the results, using the hybrid ML method could successfully improve the prediction accuracy.

[1]  P. M. Pandey,et al.  Optimal part deposition orientation in FDM by using a multicriteria genetic algorithm , 2004 .

[2]  C. Tan,et al.  NEURAL NETWORKS FOR TECHNICAL ANALYSIS: A STUDY ON KLCI , 1999 .

[3]  S. Uma Maheswari,et al.  Classification and Prediction of Stock Market Index Based on Fuzzy Metagraph , 2015 .

[4]  Arash Ghanbari,et al.  Integration of genetic fuzzy systems and artificial neural networks for stock price forecasting , 2010, Knowl. Based Syst..

[5]  Hui Liu,et al.  An improved deep learning model for predicting stock market price time series , 2020, Digit. Signal Process..

[6]  S. Lahmiri Interest rate next-day variation prediction based on hybrid feedforward neural network, particle swarm optimization, and multiresolution techniques , 2016 .

[7]  Riccardo Poli,et al.  Particle swarm optimization , 1995, Swarm Intelligence.

[8]  Yzat ABDYKAPAROV,et al.  FORECASTING STOCK INDEX MOVEMENT WITH ARTIFICIAL NEURAL NETWORKS : THE CASE OF ISTANBUL , 2017 .

[9]  Ajitha Vejendla Performance evaluation of neural networks and GARCH models for forecasting volatility and option strike prices in a bull call spread strategy , 2007 .

[10]  David E. Goldberg,et al.  A niched Pareto genetic algorithm for multiobjective optimization , 1994, Proceedings of the First IEEE Conference on Evolutionary Computation. IEEE World Congress on Computational Intelligence.

[11]  David E. Goldberg,et al.  The compact genetic algorithm , 1999, IEEE Trans. Evol. Comput..

[12]  Pradipta Kishore Dash,et al.  Efficient stock price prediction using a Self Evolving Recurrent Neuro-Fuzzy Inference System optimized through a Modified technique , 2016, Expert Syst. Appl..

[13]  Jianlong Wang,et al.  Optimization of fermentative hydrogen production process using genetic algorithm based on neural network and response surface methodology , 2009 .

[14]  Zehong Yang,et al.  Intelligent stock trading system based on improved technical analysis and Echo State Network , 2011, Expert Syst. Appl..

[15]  ShahrabiJamal,et al.  A bat-neural network multi-agent system (BNNMAS) for stock price prediction , 2015 .

[16]  Asghar Mahmoudi,et al.  Modeling and simulation controlling system of HVAC using fuzzy and predictive (radial basis function, RBF) controllers , 2016 .

[17]  Guang Liu,et al.  A new metric for individual stock trend prediction , 2019, Eng. Appl. Artif. Intell..

[18]  Xiao Zhong,et al.  Predicting the daily return direction of the stock market using hybrid machine learning algorithms , 2019, Financial Innovation.

[19]  B. Majhi,et al.  Hybrid nonlinear adaptive scheme for stock market prediction using feedback FLANN and factor analysis , 2016 .

[20]  Chi-Jie Lu,et al.  Integrating independent component analysis-based denoising scheme with neural network for stock price prediction , 2010, Expert Syst. Appl..

[21]  Heinz Mühlenbein,et al.  The parallel genetic algorithm as function optimizer , 1991, Parallel Comput..

[22]  Koohyar Faizi,et al.  Developing a hybrid PSO–ANN model for estimating the ultimate bearing capacity of rock-socketed piles , 2017, Neural Computing and Applications.

[23]  G. Syam Prasad,et al.  Stock Market Prediction Based on Machine Learning Approaches , 2019 .

[24]  You-Shyang Chen,et al.  Modeling fitting-function-based fuzzy time series patterns for evolving stock index forecasting , 2014, Applied Intelligence.

[25]  Kin Keung Lai,et al.  Mining Stock Market Tendency Using GA-Based Support Vector Machines , 2005, WINE.

[26]  Pradipta Kishore Dash,et al.  Hybrid Variational Mode Decomposition and evolutionary robust kernel extreme learning machine for stock price and movement prediction on daily basis , 2019, Appl. Soft Comput..

[27]  Resmana Lim,et al.  Indonesian Stock Prediction using Support Vector Machine (SVM) , 2018 .

[28]  Armin Jabbarzadeh,et al.  A Multiple-Criteria Approach for Forecasting Stock Price Direction : Nonlinear Probability Models with Application in S & P 500 Index , 2016 .

[29]  Samir Saadi,et al.  Random walk and breaking trend in financial series: An econometric critique of unit root tests , 2008 .

[30]  Russell C. Eberhart,et al.  Parameter Selection in Particle Swarm Optimization , 1998, Evolutionary Programming.

[31]  Victor Chang,et al.  An innovative neural network approach for stock market prediction , 2018, The Journal of Supercomputing.

[32]  Boumediène Allaoua,et al.  Leonardo Electronic Journal of Practices and Technologies Neuro-fuzzy Dc Motor Speed Control Using Particle Swarm Optimization Neuro-fuzzy Dc Motor Speed Control Using Particle Swarm Optimization , 2022 .

[33]  David de la Fuente,et al.  Forecasting IBEX-35 moves using support vector machines , 2012, Neural Computing and Applications.

[34]  Salim Lahmiri,et al.  Information fusion and S&P500 trend prediction , 2013, 2013 ACS International Conference on Computer Systems and Applications (AICCSA).

[35]  Francisco Guijarro,et al.  Forecasting stock market trend: a comparison of machine learning algorithms , 2020 .

[36]  Shahaboddin Shamshirband,et al.  State of the Art of Machine Learning Models in Energy Systems, a Systematic Review , 2019, Energies.

[37]  M. N. Vrahatis,et al.  Particle swarm optimization method in multiobjective problems , 2002, SAC '02.

[38]  Yu Song,et al.  Application of artificial neural network for the prediction of stock market returns: The case of the Japanese stock market , 2016 .

[39]  Mohammad Hossein Fazel Zarandi,et al.  Fuzzy clustering rule-based expert system for stock price movement prediction , 2015, 2015 Annual Conference of the North American Fuzzy Information Processing Society (NAFIPS) held jointly with 2015 5th World Conference on Soft Computing (WConSC).

[40]  Hasan Dehghan Dehnavi,et al.  Evaluating the Employment of Technical Indicators in Predicting Stock Price Index Variations Using Artificial Neural Networks (Case Study: Tehran Stock Exchange) , 2012 .

[41]  Wenbo Xu,et al.  Particle swarm optimization with particles having quantum behavior , 2004, Proceedings of the 2004 Congress on Evolutionary Computation (IEEE Cat. No.04TH8753).

[42]  Sing-Wu Liou,et al.  Integrative Discovery of Multifaceted Sequence Patterns by Frame-Relayed Search and Hybrid PSO-ANN , 2009, J. Univers. Comput. Sci..

[43]  Michel Ballings,et al.  Evaluating multiple classifiers for stock price direction prediction , 2015, Expert Syst. Appl..

[44]  A. Lo,et al.  Stock Market Prices Do Not Follow Random Walks: Evidence from a Simple Specification Test , 1987 .

[45]  Yang Jiao,et al.  Predicting stock movement direction with machine learning: An extensive study on S&P 500 stocks , 2017, 2017 IEEE International Conference on Big Data (Big Data).

[46]  Ivan Stajduhar,et al.  Predicting stock market trends using random forests: A sample of the Zagreb stock exchange , 2015, 2015 38th International Convention on Information and Communication Technology, Electronics and Microelectronics (MIPRO).

[47]  Salim Lahmiri,et al.  Minute-ahead stock price forecasting based on singular spectrum analysis and support vector regression , 2018, Appl. Math. Comput..

[48]  Fatih Ecer,et al.  Comparing the Bank Failure Prediction Performance of Neural Networks and Support Vector Machines: The Turkish Case , 2013 .

[49]  David Enke,et al.  Stock Market Prediction Using a Combination of Stepwise Regression Analysis, Differential Evolution-based Fuzzy Clustering, and a Fuzzy Inference Neural Network , 2013, Intell. Autom. Soft Comput..

[50]  Rosdiadee Nordin,et al.  Accurate Wireless Sensor Localization Technique Based on Hybrid PSO-ANN Algorithm for Indoor and Outdoor Track Cycling , 2016, IEEE Sensors Journal.

[51]  Annamária R. Várkonyi-Kóczy,et al.  Prediction of Combine Harvester Performance Using Hybrid Machine Learning Modeling and Response Surface Methodology , 2019 .

[52]  Lahmiri Salim,et al.  A Comparison of PNN and SVM for Stock Market Trend Prediction using Economic and Technical Information , 2011 .

[53]  Ömer Kaan Baykan,et al.  Predicting direction of stock price index movement using artificial neural networks and support vector machines: The sample of the Istanbul Stock Exchange , 2011, Expert Syst. Appl..

[54]  R. Sahay,et al.  Predicting Monsoon Floods in Rivers Embedding Wavelet Transform, Genetic Algorithm and Neural Network , 2013, Water Resources Management.

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

[56]  Mohammad Hadi,et al.  Short-term Prediction of Tehran Stock Exchange Price Index (TEPIX): Using Artificial Neural Network (ANN) , 2012 .

[57]  N. R. Sakthivel,et al.  A Decision Tree- Rough Set Hybrid System for Stock Market Trend Prediction , 2010 .

[58]  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..

[59]  Luis E. Zárate,et al.  Applying Artificial Neural Networks to prediction of stock price and improvement of the directional prediction index - Case study of PETR4, Petrobras, Brazil , 2013, Expert Syst. Appl..

[60]  K. Maertens,et al.  Genetic polynomial regression as input selection algorithm for non-linear identification , 2006, Soft Comput..

[61]  Aida Mustapha,et al.  Feedforward backpropagation, genetic algorithm approaches for predicting reference evapotranspiration , 2015 .

[62]  Amir Mosavi,et al.  Deep Learning for Stock Market Prediction , 2020, Entropy.

[63]  Martha Pulido,et al.  Particle swarm optimization of ensemble neural networks with fuzzy aggregation for time series prediction of the Mexican Stock Exchange , 2014, Inf. Sci..

[64]  Esmaeil Hadavandi,et al.  A bat-neural network multi-agent system (BNNMAS) for stock price prediction: Case study of DAX stock price , 2015, Appl. Soft Comput..

[65]  Sahil Shah,et al.  Predicting stock and stock price index movement using Trend Deterministic Data Preparation and machine learning techniques , 2015, Expert Syst. Appl..

[66]  Thair A. Salih,et al.  Self-tuning PID Controller using Genetic Algorithm , 2011 .

[67]  Amir Mosavi,et al.  Predicting Stock Market Trends Using Machine Learning and Deep Learning Algorithms Via Continuous and Binary Data; a Comparative Analysis , 2020, IEEE Access.

[68]  So Young Sohn,et al.  Global stock market investment strategies based on financial network indicators using machine learning techniques , 2019, Expert Syst. Appl..

[69]  Shuai Wang,et al.  Forecasting Direction of China Security Index 300 Movement with Least Squares Support Vector Machine , 2014, ITQM.

[70]  Rajashree Dash,et al.  A TOPSIS Approach of Ranking Classifiers for Stock Index Price Movement Prediction , 2019 .

[71]  Marion O. Adebiyi,et al.  Stock Price Prediction using Neural Network with Hybridized Market Indicators , 2012 .

[72]  Yuhui Shi,et al.  Particle swarm optimization: developments, applications and resources , 2001, Proceedings of the 2001 Congress on Evolutionary Computation (IEEE Cat. No.01TH8546).

[73]  Luis Romeral,et al.  Multiobjective Optimization of Multi-Carrier Energy System Using a Combination of ANFIS and Genetic Algorithms , 2018, IEEE Transactions on Smart Grid.

[74]  Kyoung-jae Kim,et al.  Financial time series forecasting using support vector machines , 2003, Neurocomputing.

[75]  S. Kumar Chandar,et al.  Stock market prediction using subtractive clustering for a neuro fuzzy hybrid approach , 2017, Cluster Computing.

[76]  GuijarroFrancisco,et al.  Stock market trading rule based on pattern recognition and technical analysis , 2015 .

[77]  Darrell G. Fontane,et al.  Use of Multiobjective Particle Swarm Optimization in Water Resources Management , 2008 .

[78]  Wen-Chyuan Chiang,et al.  An adaptive stock index trading decision support system , 2016, Expert Syst. Appl..

[79]  Vijay P. Singh,et al.  Frequency analysis of droughts using the Plackett copula and parameter estimation by genetic algorithm , 2010 .

[80]  Javier Oliver,et al.  HYBRID FUZZY NEURAL NETWORK TO PREDICT PRICE DIRECTION IN THE GERMAN DAX-30 INDEX , 2018, Technological and Economic Development of Economy.

[81]  Norton Trevisan Roman,et al.  Forecasting stock market index daily direction: A Bayesian Network approach , 2018, Expert Syst. Appl..

[82]  Mustansar Ali Ghazanfar,et al.  Predicting stock market trends using machine learning algorithms via public sentiment and political situation analysis , 2019, Soft Computing.

[83]  Efficient Stock Price Prediction using a Self Evolving Recurrent Neuro Fuzzy Inference System Optimized through a Modified Differential Harmony Search Technique , 2017 .