Abstract
The direction of the stock market is always complex, stochastic, and highly volatile. In addition to traditional forecasting models such as linear regression and Automatic Regression Integrated Moving Average (ARIMA) models, analysts are now trying to apply modern deep learning models to predict trends direction of the stock market to achieve more accurate forecasting. In this conducting research, we have investigated and applied the state-of-the-art deep learning sequential model, namely the Stacked Long Short-Term Memory Model (Stacked LSTM) to the prediction of stock prices the next day. The experimental result on three benchmark datasets: stocks of Apple Inc. (AAPL), stocks of An Phat Bioplastic JSC (AAA), and stocks of Bank of Foreign Trade of Vietnam (VCB) has shown the effectiveness of the predictive model. Furthermore, we discovered that the suitable quantity of hidden layers is two, and when we continue to increase the quantity of hidden layers to three or four, the Stacked LSTM model does not improve the predictive power, even though it has a more complex model structure.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Khashei, M., Hajirahimi, Z.: A comparative study of series arima/mlp hybrid models for stock price forecasting. Commun. Stat. – Simul. Comput. 48(9), 2625–2640 (2019). https://doi.org/10.1080/03610918.2018.1458138
Kumar, M., Thenmozhi, M.: Forecasting stock index returns using ARIMA-SVM, ARIMA-ANN, and ARIMA-random forest hybrid models. IJBAAF 5(3), 284 (2014). https://doi.org/10.1504/IJBAAF.2014.064307
Wadi, S.A., Almasarweh, M., Alsaraireh, A.A.: Predicting closed price time series data using ARIMA Model. MAS 12(11), 181 (2018). https://doi.org/10.5539/mas.v12n11p181
Hiransha, M., Gopalakrishnan, E.A., Menon, V.K., Soman, K.P.: NSE stock market prediction using deep-learning models. Procedia Comput. Sci. 132, 1351–1362 (2018). https://doi.org/10.1016/j.procs.2018.05.050
Olah, C.: Understanding lstm networks (2015). https://colah.github.io/posts/%202015%E2%80%9308-Understanding-LSTMs/
Di Persio, L., Honchar, O.: Analysis of recurrent neural networks for short-term energy load forecasting. Thessaloniki, Greece, p. 190006 (2017). https://doi.org/10.1063/1.5012469
Pang, X., Zhou, Y., Wang, P., Lin, W., Chang, V.: An innovative neural network approach for stock market prediction. J. Supercomput. 76(3), 2098–2118 (2018). https://doi.org/10.1007/s11227-017-2228-y
Karsoliya, S.: Approximating number of hidden layer neurons in multiple hidden layer BPNN architecture. Int. J. Eng. Trends Technol. 3(6), 4 (2012)
Hossain, M.A., Karim, R., Thulasiram, R., Bruce, N.D.B., Wang, Y.: Hybrid deep learning model for stock price prediction. In: 2018 IEEE Symposium Series on Computational Intelligence (SSCI), Bangalore, India, pp. 1837–1844 (2018). https://doi.org/10.1109/SSCI.2018.8628641
Salleh, H., Atrick Vincent, A.M.P.: An investigation into the performance of the multilayer perceptron architecture of deep learning in forecasting stock prices. UMT JUR, vol. 3, no. 2, pp. 61–68 (2021). https://doi.org/10.46754/umtjur.2021.04.006
Hochreiter, S.: The vanishing gradient problem during learning recurrent neural nets and problem solutions. Int. J. Unc. Fuzz. Knowl. Based Syst. 06(02), 107–116 (1998). https://doi.org/10.1142/S0218488598000094
Heaton, J.B., Polson, N.G., Witte, J.H.: Deep learning for finance: deep portfolios. Appl. Stochast. Models Bus. Ind. 33(1), 3–12 (2017). https://doi.org/10.1002/asmb.2209
Luong, M.-T., Sutskever, I., Le, Q.V., Vinyals, O., Zaremba, W.: Addressing the rare word problem in neural machine translation (2015). http://arxiv.org/abs/1410.8206. Accessed 1 Mar 2022
Aryal, S., Nadarajah, D., Rupasinghe, P.L., Jayawardena, C., Kasthurirathna, D.: Comparative analysis of deep learning models for multi-step prediction of financial time series. J. Comput. Sci. 16(10), 1401–1416 (2020). https://doi.org/10.3844/jcssp.2020.1401.1416
Hochreiter, S., Schmidhuber, J.: Long short-term memory. Neural Comput. 9(8), 1735–1780 (1997). https://doi.org/10.1162/neco.1997.9.8.1735
Brownlee, J.: Stacked long short-term memory networks (machinelearningmas-tery.com), 18 August 2017. https://machinelearningmastery.com/stacked-long-short-term-memory-networks/
Pascanu, R., Gulcehre, C., Cho, K., Bengio, Y.: How to construct deep recurrent neu-ral networks (2014). http://arxiv.org/abs/1312.6026. Accessed 24 Feb 2022
Graves, A., Jaitly, N., Mohamed, A.: Hybrid speech recognition with deep bidirectional LSTM. In: 2013 IEEE Workshop on Automatic Speech Recognition and Understanding, Olomouc, Czech Republic, pp. 273–278 (2013). https://doi.org/10.1109/ASRU.2013.6707742
Koenecke, A.: Applying deep neural networks to financial time series forecasting. Institute for Computational & Mathematical Engineering, Stanford, California, USA (2020). https://web.stanford.edu/~koenecke/files/Deep_Learning_for_Time_Series_Tutorial.pdf
Al Ridhawi, M.: Stock market prediction through sentiment analysis of social-media and financial stock data using machine learning (2021). https://doi.org/10.20381/RUOR-27045
“Vietstock” Vietstock. https://vietstock.vn/
Kingma, D.P., Ba, J.: Adam: a method for stochastic optimization (2017). http://arxiv.org/abs/1412.6980. Accessed 02 Mar 2022
Terna, P.: A Deep Learning Model to Forecast Financial Time-Series (2015)
Acknowledgements
This work was funded by Hanoi University of Mining and Geology under grant number 65/QD-MDC.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Tuan, N.T., Nguyen, T.H., Duong, T.T.H. (2022). Stock Price Prediction in Vietnam Using Stacked LSTM. In: Nguyen, NT., Dao, NN., Pham, QD., Le, H.A. (eds) Intelligence of Things: Technologies and Applications . ICIT 2022. Lecture Notes on Data Engineering and Communications Technologies, vol 148. Springer, Cham. https://doi.org/10.1007/978-3-031-15063-0_23
Download citation
DOI: https://doi.org/10.1007/978-3-031-15063-0_23
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-15062-3
Online ISBN: 978-3-031-15063-0
eBook Packages: Intelligent Technologies and RoboticsIntelligent Technologies and Robotics (R0)