Optimizing LSTM Based Network For Forecasting Stock Market

In this modern era, the financial market, more specifically, the stock markets all over the world, deal with an enormous amount of real-time data that facilitates the data analytics and prediction in the field of finance. The main objective of this paper is to propose a novel model of neural network based on Long-Short Term Memory (LSTM) and utilizing one of the most powerful evolutionary algorithms, namely the Differential Evolution (DE), to forecast the next day’s stock price of a company. This study focuses on optimizing the ten network hyperparameters related to the detection of temporal patterns of a given dataset, namely, the size of the time window, batch size, the number of LSTM units in hidden layers, the number of hidden layers (LSTM and dense), dropout coefficient for each layer, and the network training optimization algorithm. To the best of our knowledge, this is the first time that all this set of parameters have been optimized simultaneously. Then, the LSTM has been optimized by DE to gain the lower root mean squared error (RMSE) for prediction. The proposed model achieved 8.092 RMSE as its objective value, which is better in comparison with the best statistical forecasting models such as NAIVE, ETS, and SARIMA, which are the-state-of-the-art methods in this filed. Moreover, for shortening the training time as the main source of computational expensiveness, the proposed method works with a lower number of epochs. By this way, DE tries to find a shallower and faster network even with higher accuracy, which is a remarkable approach.

[1]  Yifeng Wang,et al.  LSTM Model Optimization on Stock Price Forecasting , 2018, 2018 17th International Symposium on Distributed Computing and Applications for Business Engineering and Science (DCABES).

[2]  P. Franses,et al.  Forecasting stock market volatility using (non‐linear) Garch models , 1996 .

[3]  Torsten Hoefler,et al.  Augment your batch: better training with larger batches , 2019, ArXiv.

[4]  Kyung-shik Shin,et al.  Genetic Algorithm-Optimized Long Short-Term Memory Network for Stock Market Prediction , 2018, Sustainability.

[5]  Amir F. Atiya,et al.  Introduction to financial forecasting , 1996, Applied Intelligence.

[6]  R. Engle Autoregressive conditional heteroscedasticity with estimates of the variance of United Kingdom inflation , 1982 .

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

[8]  Jürgen Schmidhuber,et al.  LSTM: A Search Space Odyssey , 2015, IEEE Transactions on Neural Networks and Learning Systems.

[9]  Nitish Srivastava,et al.  Dropout: a simple way to prevent neural networks from overfitting , 2014, J. Mach. Learn. Res..

[10]  K. P. Soman,et al.  Stock price prediction using LSTM, RNN and CNN-sliding window model , 2017, 2017 International Conference on Advances in Computing, Communications and Informatics (ICACCI).

[11]  Jui-Sheng Chou,et al.  Time series analytics using sliding window metaheuristic optimization-based machine learning system for identifying building energy consumption patterns , 2016 .

[12]  Yao Hu,et al.  An Enhanced LSTM for Trend Following of Time Series , 2019, IEEE Access.

[13]  Tomohiro Hayashida,et al.  Multiobjective Evolutionary Optimization of Training and Topology of Recurrent Neural Networks for Time-Series Prediction , 2010, 2010 International Conference on Information Science and Applications.

[14]  Jürgen Schmidhuber,et al.  Long Short-Term Memory , 1997, Neural Computation.

[15]  Wu Meng,et al.  Application of Support Vector Machines in Financial Time Series Forecasting , 2007 .

[16]  Adriano C. M. Pereira,et al.  Stock market's price movement prediction with LSTM neural networks , 2017, 2017 International Joint Conference on Neural Networks (IJCNN).

[17]  James Higgins,et al.  Using ant colony optimization to optimize long short-term memory recurrent neural networks , 2018, GECCO.

[18]  Rainer Storn,et al.  Differential Evolution – A Simple and Efficient Heuristic for global Optimization over Continuous Spaces , 1997, J. Glob. Optim..

[19]  Bogdan Filipic,et al.  DEMO: Differential Evolution for Multiobjective Optimization , 2005, EMO.

[20]  Heng-Ming Tai,et al.  An Optimized Heterogeneous Structure LSTM Network for Electricity Price Forecasting , 2019, IEEE Access.

[21]  Kimon P. Valavanis,et al.  Surveying stock market forecasting techniques - Part II: Soft computing methods , 2009, Expert Syst. Appl..

[22]  Evangelos Spiliotis,et al.  Statistical and Machine Learning forecasting methods: Concerns and ways forward , 2018, PloS one.

[23]  P. Young,et al.  Time series analysis, forecasting and control , 1972, IEEE Transactions on Automatic Control.

[24]  Rabindra Kumar Sahu,et al.  Design and analysis of differential evolution algorithm based automatic generation control for interconnected power system , 2013 .

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