Predicting Stock Market Trends in Vietnam Using SVM, XGBoost, and LSTM Architectures
Abstract
Predicting the behavior of a stock market with higher accuracy has been a critical task, however, application of various cutting-edge Machine Learning (ML) and Deep Learning (DL) architectures have shown better results compared to that of classical statistical models. This study explores the Vietnamese stock market with the aim of predicting closing price movements. Various machine learning models, including Support Vector Machines (SVM), Extreme Gradient Boosting (XGBoost), and Long Short-Term Memory (LSTM) networks, are employed for the analysis. The data for this research has been gathered from various companies listed on the Ho Chi Minh City Stock Exchange (HOSE) and Hanoi Stock Exchange (HNINDEX) in Vietnam. These datasets were systematically preprocessed and thoroughly analyzed to calculate performance metrics, including the Root Mean Squared Error (RMSE) for assessing prediction quality and Mean Absolute Percentage Error (MAPE) to gauge forecast accuracy. In this study, technical features such as Relative Strength Index (RSI), Moving Average Convergence Divergence (MACD), Stochastic Oscillator (SO), among others, are employed. Additionally, Simple Moving Averages (SMA) and Weighted Moving Averages (WMA) are considered for various time frames. The significance of these features is systematically evaluated and determined. The experimental results show that the RMSE, MAPE, accuracy and F1-scores scores of LSTM are at 0.353, 16.323, 0.679 and 0.732; while those of SVM and XGBoost are 0.397, 17.746, 0.605 and 0.552 and 0.366, 17.370, 0.629 and 0.597 respectively. This shows that LSTM has a better prediction accuracy than that of SVM and XGBoost, while computational time of LSTM is much higher than the other two.
References
[2] Hanoi Stock Exchange. (2023, January 8). “In Sustainable Stock Exchanges (SSE) initiative”, available at: https://sseinitiative.org/stock-exchange/hnx/
[3] Ho Chi Minh Stock Exchange. (2023, January 8). “In Sustainable Stock Exchanges (SSE) initiative”, available at: https://sseinitiative.org/stock-exchange/hsx/
[4] Biswas, M., Shome, A., Islam, M. A., Nova, A. J., & Ahmed, S. (2021, April). “Predicting stock market price: A logical strategy using deep learning”. In 2021 IEEE 11th IEEE symposium on computer applications & industrial electronics (ISCAIE) (pp. 218-223). IEEE. doi: 10.1109/ISCAIE51753.2021.9431817.
[5] Sharma, A., Bhuriya, D., & Singh, U. (2017, April). “Survey of stock market prediction using machine learning approach”. In 2017 International conference of electronics, communication and aerospace technology (ICECA) Vol. 2, pp. 506-509. IEEE. doi: 10.1109/ICECA.2017.8212715.
[6] Bhattacharjee, I., & Bhattacharja, P. (2019). “Stock Price Prediction: A Comparative Study between Traditional Statistical Approach and Machine Learning Approach”. In 2019 4th international conference on electrical information and communication technology (EICT) (pp. 1-6). IEEE. doi: 10.1109/EICT48899.2019.9068850.
[7] Koukaras, P., Nousi, C., & Tjortjis, C. (2022). “Stock Market Prediction Using Microblogging Sentiment Analysis and Machine Learning”. Telecom. 3(2):358-378. https://doi.org/10.3390/telecom3020019
[8] Ruobing, Z. (2022). “LSTM-based Stock Prediction Modeling and Analysis”. Proceedings of the 2022 7th International Conference on Financial Innovation and Economic Development (ICFIED 2022), pp. 2537-2542. ISSN 2352-5428. https://doi.org/10.2991/aebmr.k.220307.414
[9] Obthong, M., Tantisantiwong, N., Jeamwatthanachai, W., & Wills, G. (2020). “A Survey on Machine Learning for Stock Price Prediction: Algorithms and Techniques”. doi: 10.5220/0009340700630071.
[10] Khang, P. Q., Kaczmarczyk, K., Tutak, P., Golec, P., Kuziak, K., Depczy´ nski, R., ... & Rot, A. (2021). “Machine learning for liquidity prediction on Vietnamese stock market”. Procedia Computer Science, 192, 3590-3597. https://doi.org/10.1016/j.procs.2021.09.132
[11] Gumelar, A. B., Setyorini, H., Adi, D. P., Nilowardono, S., Widodo, A., Wibowo, A. T., ... & Christine, E. (2020, September). “Boosting the accuracy of stock market prediction using xgboost and long short-term memory”. In 2020 International Seminar on Application for Technology of Information and Communication (iSemantic) (pp. 609-613). IEEE. doi: 10.1109/iSemantic50169.2020.9234256.
[12] Nabipour, M., Nayyeri, P., Jabani, H., Mosavi, A., Salwana, E., & Shahab, S. (2020). “Deep Learning for Stock Market Prediction”. Entropy 22(8), 840. https://doi.org/10.3390/e22080840
[13] Moghar, A., & Hamiche, M. (2020). “Stock Market Prediction Using LSTM Recurrent Neural Network”. Procedia Computer Science. Volume CÁC CÔNG TRÌNH NGHIÊN CỨU, PHÁT TRIỂN VÀ ỨNG DỤNG CNTT VÀ TRUYỀN THÔNG 9 170. Pp. 1168-1173. ISSN 1877-0509. https://doi.org/10.1016/j.procs. 2020.03.049
[14] Mokhtari, S., Yen, K. K., & Liu, J. (2021). “Effectiveness of artificial intelligence in stock market prediction based on machine learning”. arXiv preprint arXiv:2107.01031. https://doi.org/10.48550/arXiv.2107.01031
[15] Yun, K. K., Yoon, S. W., & Won, D. (2023). “Interpretable stock price forecasting model using genetic algorithm-machine learning regressions and best feature subset selection”. Expert Systems with Applications. Volume 213. Part A. 118803. ISSN 0957-4174. https://doi.org/10.1016/jeswa.2022.118803
[16] Houssein, E.H., Dirar, M., Abualigah, L. et al. (2022). "An efficient equilibrium optimizer with support vector regression for stock market prediction". Neural Comput & Applic 34. 3165–3200 (2022). https://doi.org/10.1007/s00521-021-06580-9.
[17] Hanh, Le Hong et al. (2022). "Stock Market Prediction: The Application of Text-Mining in Vietnam". VNU JOURNAL OF ECONOMICS AND BUSINESS. [S.l.]. v. 2. n. 2. ISSN 2734-9845. https://doi.org/10.57110/jeb.v2i2.4715.
[18] Hung, Dao & Hue, Nguyen & Duong, Vu. (2021). The Impact of COVID-19 on Stock Market Returns in Vietnam. Journal of Risk and Financial Management. 14. 441. 10.3390/jrfm14090441.
[19] Nti, I.K., Adekoya, A.F. & Weyori, B.A. (2020). A comprehensive evaluation of ensemble learning for stock-market prediction. Journal of Big Data 7. 20. https://doi.org/10.1186/s40537-020-00299-5.
[20] Hiransha M, Gopalakrishnan E.A., Vijay Krishna Menon, Soman K.P. (2018). NSE Stock Market Prediction Using Deep-Learning Models. Procedia Computer Science. Vol. 132. pp. 1351-1362. ISSN 1877-0509. https://doi.org/10.1016/j.procs.2018.05.050.
[21] Phuoc, T., Anh, P. T. K., Tam, P. H., & Nguyen, C. V. (2024). Applying machine learning algorithms to predict the stock price trend in the stock market–The case of Vietnam. Humanities and Social Sciences Communications, 11(1), 1-18.