Trần Đăng Tuyên *

* Tác giả liên hệ (tuyenm4522033@gstudent.ctu.edu.vn)

Abstract

The stock market is a highly complex non-linear system, and its volatility is influenced by numerous factors, making stock price prediction a challenging task. Long Short Term Memory networks (LSTM) model, Gated Recurrent Unit (GRU) model, and their hybrids are designed using the Python programming language with available supporting packages, and they demonstrate high accuracy in forecasting. The LSTM-GRU Hybrid model performs the best among the complex models. Through the LSTM-GRU Hybrid model, the study predicts the trend of the VNIndex for the next 100 days, indicating a rising trend. This indirectly suggests a potential resurgence in the Vietnamese stock market, driven by new government policies.

Keywords: Forecasting, GRU, HoSE, LSTM, machine learning, VNIndex

Tóm tắt

Thị trường chứng khoán là một hệ thống chuyển động phi tuyến rất phức tạp và quy luật biến động của nó bị ảnh hưởng bởi rất nhiều yếu tố, vì vậy việc dự đoán chỉ số giá cổ phiếu là một nhiệm vụ rất khó khăn. Mô hình mạng nơ-ron với bộ nhớ ngắn hạn định hướng dài hạn (LSTM), mạng nơ-ron hồi tiếp với nút cổng (GRU) và các phức hợp được thiết kế bằng ngôn ngữ lập trình Python với các gói phụ trợ có sẵn, cho thấy kết quả dự báo với độ chính xác cao, hiệu suất của mô hình LSTM-GRU Hybrid cho kết quả tốt nhất. Thông qua mô hình LSTM-GRU Hybrid, nghiên cứu dự báo xu hướng biến động chỉ số VNIndex 100 ngày tiếp theo cho kết quả chỉ số VNIndex có xu hướng tăng. Điều đó gián tiếp chỉ ra rằng thị trường chứng khoán Việt Nam có dấu hiệu khởi sắc trở lại cùng với các chính sách mới của Chính phủ.

Từ khóa: Dự báo, GRU, HoSE, LSTM, máy học, VNIndex

Article Details

Tài liệu tham khảo

Abadi, M., Agarwal, A., Barham, P., Brevdo, E., Chen, Z., Citro, C., Corrado, G. S., Davis, A., Dean, J., Devin, M., Ghemawat, S., Goodfellow, L., Harp, A., Irving, G., Isard, M., Jia, Y., Jozefowicz, R., Kaiser, L., Kudlur, M., Levenberg, J., Mane, D., Monga, R., Moore, S., Murray, D., Olah, C., Schuster, M., Shlens, J., Steiner, B., Sutskever, I., Talwar, K., Tucker, P., Vanhoucke, V., Vasudevan, V., Viegas, F., Vinyals, O., Warden, P., Wattenberg, M., Wicke, M., Yu, Y., & Zheng, X. Q. (2016). TensorFlow: Large-Scale Machine Learning on Heterogeneous Distributed Systems. http://doi.org/10.48550/arXiv.1603.04467

Alpaydin, E. (2014). Introduction to Machine Learning. MIT Press.

Chen, Y., & Hao, Y. (2017). A feature weighted support vector machine and K-nearest neighbor algorithm for stock market indices prediction. Expert Systems with Applications, 80, 340-355. http://doi.org/ 10.1016/j.eswa.2017.02.044

Cho, K., Merriënboer, B., Gulcehre, C., Bahdanau, D., Bougares, F., Schwenk, H., & Bengio, Y. (2014). Learning phrase representations using RNN encoder-decoder for statistical machine translation.
http://doi.org/10.3115/v1/D14-1179

Chollet, F. (2015). Keras. https://github.com/fchollet/keras

Chung, H., & Shin, K. S. (2020). Genetic algorithm-optimized multi-channel convolutional neural network for stock market prediction. Neural Computing and Applications, 32. http://doi.org/10.1007/s00521-019-04236-3

Daneshvar, A., Ebrahimi, M., Salahi, F., & Rahmaty, M. (2022). Brent crude oil price forecast utilizing deep neural network architectures. Computational Intelligence and Neuroscience.
http://doi.org/1-13. 10.1155/2022/6140796

de Freitas, N., Shahriari, B., Swersky, K., Wang, Z., & Adams, R. P. (2016). Taking the Human Out of the Loop: A Review of Bayesian Optimization. Proceedings of the IEEE, 104(1), 148–175. https://doi.org/10.1109/jproc.2015.2494218

Duchi, J., Hazan, E., & Singer, Y. (2011). Adaptive subgradient methods for online learning and stochastic optimization. Journal of machine learning research, 12, 2121-2159.

Guo, C., Liu, G., & Chen, C. H. (2020). Air pollution concentration forecast method based on the deep ensemble neural network. Wireless Communications and Mobile Computing. https://doi.org/10.1155/2020/8854649

Hochreiter, S., & Schmidhuber, J. (1997), Long Short-Term Memory. Neural Computation, 9, 1735–1780. http://doi.org/10.1162/neco.1997.9.8.1735

Hong, W. C. (2021). Application of Seasonal SVR with Chaotic Immune Algorithm in Traffic Flow Forecasting. Neural Computing and Applications, 21, 583–593.
http://doi.org/10.1007/s00521-010-0456-7

Hossain, M., Karim, R., Thulasiram, R., Bruce, N. D. B., & Wang, Y. (2018). Hybrid Deep Learning Model for Stock Price Prediction, 1837-1844. http://doi.org/10.1109/SSCI.2018.8628641

Hua, Y., Zhao, Z., Li, R., Chen, X., Liu, Z., & Zhang, H. (2019), Deep Learning with Long Short-Term Memory for Time Series Prediction. IEEE Communications Magazine, 1-6. https://doi.org/10.1109/MCOM.2019.1800155

Hunter, J. D. (2007). Matplotlib: a 2D graphics environment. Computing in Science & Engineering, 9, 90–95. https://doi.org/10.1109/MCSE.2007.55

Kanzari, D., Nakhli, M. S., Gaies, B., & Sahut, J. M. (2023). Predicting Macro-Financial Instability - How Relevant is Sentiment? Evidence from Long Short-Term Memory Networks, 65. http://doi.org/10.1016/j.ribaf.2023.101912

Kingma, D. P., & Ba, J. (2014). ADAM: A Method for Stochastic Optimization. International Conference on Learning Representations. http://doi.org/10.48550/arXiv.1412.6980

LeCun, Y., Bengio, Y., & Hinton, G. (2015). Deep Learning. Nature, 521, 436-44.
http://doi.org/ 10.1038/nature14539

Lin, X., Yang, Z., & Song, Y. (2011). Intelligent stock trading system based on improved technical analysis and Echo State Network. Expert systems with Applications, 38(9), 11347-11354.
http://doi.org/ 10.1016/j.eswa.2011.03.001

Liu, Y., Wang, Z., & Zheng, B. (2019). Application of Regularized GRU-LSTM Model in Stock Price Prediction. 1886-1890. http://doi.org/10.1109/ICCC47050.2019.9064035

Nti, I. K., Adekoya, A. F., & Weyori, B. A. (2020). A systematic review of fundamental and technical analysis of stock market predictions. Artificial Intelligence Review, 53(4), 3007-3057. http://doi.org/10.1007/s10462-019-09754-z

Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., & Thirion, V. (2011). Scikit-learn: machine learning in Python. Journal of Machine Learning Research. https://doi.org/10.48550/arXiv.1201.0490

Salimath, S., Chatterjee, T., Mathai, T., Kamble, P., & Kolhekar, M. (2021). Prediction of Stock Price for Indian Stock Market: A Comparative Study Using LSTM and GRU.
http://doi.org/ 10.1007/978-3-030-88244-0_28

Shejul, A. A., Chaudhari, A., Dixit, B. A., & Lavanya, B. M. (2023). Stock Price Prediction Using GRU, SimpleRNN and LSTM. Lecture Notes in Electrical Engineering, 959, 529–535.

Song, Y., Lee, J. W., & Lee, J. (2019). A study on novel filtering and relationship between input-features and target-vectors in a deep learning model for stock price prediction. Applied Intelligence, 49, 897-911. http://doi.org/10.1007/s10489-018-1308-x

Su, Z., Xie, H., & Han, L. (2021). Multi-factor RFG-LSTM algorithm for stock sequence predicting. Computational Economics, 57(4), 1041-1058.
http://doi.org/ 10.1007/s10614-020-10008-2

Szandała, T. (2021). Review and comparison of commonly used activation functions for deep neural networks.
http://doi.org/10.1007/978-981-15-5495-7_11

Waskom, M. (2021). Seaborn: statistical data visualization. Journal of Open Source Software, 6, 3021.
http://doi.org/10.21105/joss.03021

Yu, P., & Yan, X. (2020). Stock price prediction based on deep neural networks. Neural Computing and Applications, 32, 1609-1628. http://doi.org/10.1007/s00521-019-04212-x

Yun, K. K., Yoon, S. W., & Won, D. (2021). Prediction of stock price direction using a hybrid GA-XGBoost algorithm with a three-stage feature engineering process. Expert Systems with Applications, 186, 115716. http://doi.org/10.1016/j.eswa.2021.115716