Skip to main content

Stock Price Prediction in Vietnam Using Stacked LSTM

  • Conference paper
  • First Online:
Intelligence of Things: Technologies and Applications (ICIT 2022)

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 129.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 169.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. 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

    Article  MathSciNet  MATH  Google Scholar 

  2. 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

    Article  Google Scholar 

  3. 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

    Article  Google Scholar 

  4. 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

    Article  Google Scholar 

  5. Olah, C.: Understanding lstm networks (2015). https://colah.github.io/posts/%202015%E2%80%9308-Understanding-LSTMs/

  6. 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

  7. 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

    Article  Google Scholar 

  8. Karsoliya, S.: Approximating number of hidden layer neurons in multiple hidden layer BPNN architecture. Int. J. Eng. Trends Technol. 3(6), 4 (2012)

    Google Scholar 

  9. 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

  10. 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

  11. 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

    Article  MATH  Google Scholar 

  12. 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

    Article  MathSciNet  MATH  Google Scholar 

  13. 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

  14. 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

    Article  Google Scholar 

  15. 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

    Article  Google Scholar 

  16. Brownlee, J.: Stacked long short-term memory networks (machinelearningmas-tery.com), 18 August 2017. https://machinelearningmastery.com/stacked-long-short-term-memory-networks/

  17. 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

  18. 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

  19. 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

  20. 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

  21. “Vietstock” Vietstock. https://vietstock.vn/

  22. Kingma, D.P., Ba, J.: Adam: a method for stochastic optimization (2017). http://arxiv.org/abs/1412.6980. Accessed 02 Mar 2022

  23. Terna, P.: A Deep Learning Model to Forecast Financial Time-Series (2015)

    Google Scholar 

Download references

Acknowledgements

This work was funded by Hanoi University of Mining and Geology under grant number 65/QD-MDC.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Thu Hang Nguyen .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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

Publish with us

Policies and ethics