Abstract
Stock market timing is regarded as a challenging task of financial prediction. An accurate prediction of stock trend can yield great profits for investors. At present, recurrent neural networks (RNNs) have a good performance in stock market forecasting. However, there has been a relative lack of research in the stock market timing using RNNs. In this paper, a novel model named hybrid RNN model is proposed for stock market timing by incorporating multi-layer long short-term memory, multi-layer gated recurrent unit and one-layer ReLU layer. Moreover, based on five popular benchmark datasets from UCI Machine Learning Repository and six daily securities from Shanghai Stock Exchange, comparisons with 12 state-of-the-art models are conducted to verify the superiority of the proposed hybrid RNN model in terms of nine technical indicators. The findings from the experiment demonstrate that: (1) as opposed to 12 models, the average accuracy, MSE and AUC of hybrid RNN model (0.7406, 0.2592, 0.7368) are significantly better than other comparison models, and (2) the proposed hybrid RNN classification procedure can be considered as a feasible and effective tool for stock market timing.
Similar content being viewed by others
References
Ahmadi E, Jasemi M, Monplaisir L, Nabavi MA, Mahmoodi A, Jam PA (2018) New efficient hybrid candlestick technical analysis model for stock market timing on the basis of the Support Vector Machine and Heuristic Algorithms of Imperialist Competition and Genetic. Expert Syst Appl 94:21–31
Baek Y, Kim HY (2018) ModAugNet: a new forecasting framework for stock market index value with an overfitting prevention LSTM module and a prediction LSTM module. Expert Syst Appl 113:457–480
Barak S, Dahooie JH, Tichy T (2015) Wrapper ANFIS-ICA method to do stock market timing and feature selection on the basis of Japanese Candlestick. Expert Syst Appl 42(23):9221–9235
Bebarta DK, Biswal B, Dash PK (2015) Polynomial based functional link artificial recurrent neural network adaptive system for predicting Indian stocks. Int J Comput Intell Syst 8(6):1004–1016
Bhunia AK, Konwer A, Bhunia AK, Bhowmick A, Roy PP, Pal U (2019) Script identification in natural scene image and video frames using an attention based convolutional-LSTM network. Pattern Recognit 85:172–184
Bollerslev T (1986) Generalized autoregressive conditional heteroskedasticity. J Econom 31(3):307–327
Bollerslev T, Marrone J, Xu L, Zhou H (2014) Stock return predictability and variance risk premia: statistical inference and international evidence. J Financ Quant Anal 49(3):633–661
Bourbonnais R, Maftei MM (2012) ARFIMA process: tests and applications at a white noise process, a random walk process and the stock exchange index CAC 40. Econ Comput Econ Cybern Stud Res 46(1):5–16
Bruni R (2017) Stock market index data and indicators for day trading as a binary classification problem. Data Brief 10:569–575
Cao J, Li Z, Li J (2019) Financial time series forecasting model based on CEEMDAN and LSTM. Phys A Stat Mech Appl 519:127–139
Chen WL, Yeo CK, Lau CT, Lee BS (2018) Leveraging social media news to predict stock index movement using RNN-boost. Data Knowl Eng 118:14–24
Cheng GF, Li X, Yan YH (2018) Using highway connections to enable deep small-footprint LSTM-RNNs for speech recognition. Chin J Electron 28(1):107–112
Chung H, Shin KS (2018) Genetic algorithm-optimized long short-term memory network for stock market prediction. Sustainability 10(10):3765–3783
Dou YL, Fang YH, Hu C, Zheng R, Yan FJ (2019) Gated branch neural network for mandatory lane changing suggestion at the on-ramps of highway. IET Intell Transp Syst 13(1):48–54
Gao TW, Chai YT (2018) Improving stock closing price prediction using recurrent neural network and technical indicators. Neural Comput 30(10):2833–2854
Gers FA, Schmidhuber J, Cummins F (2000) Learning to forget: continual prediction with LSTM. Neural Comput 12(10):2451–2471
Gocken M, Ozcalici M, Boru A, Dosdogru AT (2019) Stock price prediction using hybrid soft computing models incorporating parameter tuning and input variable selection. Neural Comput Appl 31(2):577–592
Goykhman M, Teimouri A (2018) Machine learning in sentiment reconstruction of the simulated stock market. Phys A Stat Mech Appl 492:1729–1740
Graves A (1997) Long short-term memory. Neural Comput 9(8):1735–1780
Henrique BM, Sobreiro VA, Kimura H (2019) Literature review: machine learning techniques applied to financial market prediction. Expert Syst Appl 124:226–251
Hernandez-Suarez A, Sanchez-Perez G, Toscano-Medina K, Perez-Meana H, Portillo-Portillo J, Sanchez V, Villalba LJG (2019) Using twitter data to monitor natural disaster social dynamics: a recurrent neural network approach with word embeddings and kernel density estimation. Sensors 19(7):1746–1768
Hu Y, Sun XY, Nie X, Li YZ, Liu L (2019) An enhanced LSTM for trend following of time series. IEEE Access 7:34020–34030
Hussain AJ, Knowles A, Lisboa PJG, El-Deredy W (2008) Financial time series prediction using polynomial pipelined neural networks. Expert Syst Appl 35(3):1186–1199
Jasemi M, Kimiagari AM, Memariani A (2011) A modern neural network model to do stock market timing on the basis of the ancient investment technique of Japanese Candlestick. Expert Syst Appl 38(4):3884–3890
Jiang XQ, Zhang LC (2019) Stock price fluctuation prediction method based on time series analysis. Discrete Contin Dyn Syst Ser S 12(4–5):915–927
Kim HY, Won CH (2018) Forecasting the volatility of stock price index: a hybrid model integrating LSTM with multiple GARCH-type models. Expert Syst Appl 103:25–37
Kim JH, Shamsuddin A, Lim KP (2011) Stock return predictability and the adaptive markets hypothesis: evidence from century-long U.S. data. J Empir Finance 18(5):868–879
Liu C, Hou WY, Liu DY (2017a) Foreign exchange rates forecasting with convolutional neural network. Neural Process Lett 46(3):1095–1119
Liu BC, Fu CC, Bielefield A, Liu YQ (2017b) Forecasting of Chinese primary energy consumption in 2021 with GRU artificial neural network. Energies 10(10):1453–1468
Long W, Lu ZC, Cui LX (2019) Deep learning-based feature engineering for stock price movement prediction. Knowl-Based Syst 164:163–173
Luo C, Jiang ZP, Zheng YJ (2019) A novel reconstructed training-set SVM with roulette cooperative coevolution for financial time series classification. Expert Syst Appl 123:283–298
Majhi B, Rout M, Baghel V (2014) On the development and performance evaluation of a multiobjective GA-based RBF adaptive model for the prediction of stock indices. J King Saud Univ Comput Inf Sci 26(3):319–331
Minh DL, Sadeghi-Niaraki A, Huy ND, Min K, Moon H (2018) Deep learning approach for short-term stock trends prediction based on two-stream gated recurrent unit network. IEEE Access 6:55392–55404
Mitra A, Bok LK, Chakraborti S (2019) An adaptive exponentially weighted moving average-type control chart to monitor the process mean. Eur J Oper Res 279(3):902–911
Nakano M, Takahashi A, Takahashi S (2017) Generalized exponential moving average (EMA) model with particle filtering and anomaly detection. Expert Syst Appl 73(1):187–200
Paiva FD, Cardoso RTN, Hanaoka GP, Duarte WM (2019) Decision-making for financial trading: a fusion approach of machine learning and portfolio selection. Expert Syst Appl 115:635–655
Pal SS, Kar S (2019) Time series forecasting for stock market prediction through data discretization by fuzzistics and rule generation by rough set theory. Math Comput Simul 162:18–30
Phan DHB, Sharma SS, Narayan PK (2015) Stock return forecasting: some new evidence. Int Rev Financ Anal 40:38–51
Rather AM, Agarwal A, Sastry VN (2015) Recurrent neural network and a hybrid model for prediction of stock returns. Expert Syst Appl 42(6):3234–3241
Rosillo R, Brugos JAL (2013) Technical analysis and the Spanish stock exchange: testing the RSI, MACD, momentum and stochastic rules using Spanish market companies. Appl Econ 45(12):1541–1550
Senol D, Ozturan M (2008) Stock price direction prediction using artificial neural network approach: the case of Turkey. J Artif Intell Res 1(2):92–107
Tan YH, Chan CS (2019) Phrase-based image caption generator with hierarchical LSTM network. Neurocomputing 333:86–100
Tang HM, Dong PW, Shi Y (2019) A new approach of integrating piecewise linear representation and weighted support vector machine for forecasting stock turning points. Expert Syst Appl 78:685–696
Wu YT, Yuan M, Dong SP, Lin L, Liu YQ (2018) Remaining useful life estimation of engineered systems using vanilla LSTM neural networks. Neurocomputing 275:167–179
Xiao JH, Zhu XH, Huang CX, Yang XG, Wen FH, Zhong MR (2019) A new approach for stock price analysis and prediction based on SSA and SVM. Int J Inf Technol Decis Mak 18(1):287–310
Xu QF, Zhuo XX, Jiang CX, Liu YE (2019) An artificial neural network for mixed frequency data. Expert Syst Appl 118:127–139
Yan HJ, Ouyang HB (2018) Financial time series prediction based on deep learning. Wirel Pers Commun 102(2):683–700
Zhang J, Teng YE, Chen W (2019) Support vector regression with modified firefly algorithm for stock price forecasting. Appl Intell 49(5):1658–1674
Acknowledgements
This research was supported by the GreatWall Scholar Training Program of Beijing Municipality (CIT&TCD20190338), the Humanity and Social Science Foundation of Ministry of Education of China (No. 19YJAZH005), the Beijing Social Science Fund (No. 18YJB007).
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors declare that there is no conflict of interest regarding the publication of this article.
Ethical approval
This article does not contain any studies with human participants or animals performed by any of the authors.
Additional information
Communicated by V. Loia.
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Qiu, Y., Yang, HY., Lu, S. et al. A novel hybrid model based on recurrent neural networks for stock market timing. Soft Comput 24, 15273–15290 (2020). https://doi.org/10.1007/s00500-020-04862-3
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00500-020-04862-3