Advances in Economics, Management and Political Sciences

- The Open Access Proceedings Series for Conferences


Proceedings of the 2nd International Conference on Financial Technology and Business Analysis

Series Vol. 61 , 28 December 2023


Open Access | Article

Comparison of XGBoost and LSTM Models for Stock Price Prediction

Zhuoran Li * 1
1 Warren College, University of California San Diego, San Diego, United States

* Author to whom correspondence should be addressed.

Advances in Economics, Management and Political Sciences, Vol. 61, 147-155
Published 28 December 2023. © 2023 The Author(s). Published by EWA Publishing
This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Citation Zhuoran Li. Comparison of XGBoost and LSTM Models for Stock Price Prediction. AEMPS (2023) Vol. 61: 147-155. DOI: 10.54254/2754-1169/61/20231181.

Abstract

Along with the development of technology, machine learning would take up a higher role in analyzing categories. Among those categories, predicting stock price meets the needs of most people–or most people who trade stocks. By referring to the predicting model, stock traders can decide whether they should trade in or trade out to make a profit in the stock market. Therefore, it is necessary to testify which model can make the prediction with higher accuracy. To analyze this problem, this article examines the performance of different models under different size of datasets. This paper compared XGBoost and LSTM model by collecting stock price data that are 3 years, 6 years, and 9 years ago from the year 2023. Then analyze the close price of stock prices those models. By comparing the figures and calculated rmse value in each year and each model, the impact of different dataset sizes on each model would be revealed. This paper discovered that XGBoost model has greater accuracy under large-size dataset overall, but LSTM can predict more accurate stock price under small-size dataset.

Keywords

XGBoost, LSTM, CVX Stock Price

References

1. Chung, J., Gulcehre, C., Cho, K., and Bengio, Y. (2014). Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555.

2. Kumar, D., Sarangi, P. K., and Verma, R. (2022). A systematic review of stock market prediction using machine learning and statistical techniques. Materials Today: Proceedings, 49, 3187-3191.

3. Friedman, J. H. (2001). Greedy function approximation: a gradient boosting machine. Annals of statistics, 1189-1232.

4. Chen, T., and Guestrin, C. (2016). Xgboost: A scalable tree boosting system. In Proceedings of the 22nd acm sigkdd international conference on knowledge discovery and data mining, 785-794.

5. Saud, A. S., and Shakya, S. (2020). Analysis of look back period for stock price prediction with RNN variants: A case study on banking sector of NEPSE. Procedia Computer Science, 167, 788-798.

6. Chudziak, A. (2023). Predictability of stock returns using neural networks: Elusive in the long term. Expert systems with applications, 213, 119203.

7. Hochreiter, S., and Schmidhuber, J. (1997). Long short-term memory. Neural computation, 9(8), 1735-1780.

8. Chen, Y., Wu, J., and Wu, Z. (2022). China’s commercial bank stock price prediction using a novel K-means-LSTM hybrid approach. Expert Systems with Applications, 202, 117370.

9. Bhandari, H. N., Rimal, B., Pokhrel, N. R., Rimal, R., Dahal, K. R., and Khatri, R. K. (2022). Predicting stock market index using LSTM. Machine Learning with Applications, 9, 100320.

10. Sak, H., Senior, A., & Beaufays, F. (2014). Long short-term memory based recurrent neural network architectures for large vocabulary speech recognition. arXiv preprint arXiv:1402.1128.

11. Luo, Y., Ye, W., Zhao, X., Pan, X., and Cao, Y. (2017). Classification of data from electronic nose using gradient tree boosting algorithm. Sensors, 17(10), 2376.

Data Availability

The datasets used and/or analyzed during the current study will be available from the authors upon reasonable request.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Authors who publish this series agree to the following terms:

1. Authors retain copyright and grant the series right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this series.

2. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the series's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this series.

3. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See Open Access Instruction).

Volume Title
Proceedings of the 2nd International Conference on Financial Technology and Business Analysis
ISBN (Print)
978-1-83558-223-7
ISBN (Online)
978-1-83558-224-4
Published Date
28 December 2023
Series
Advances in Economics, Management and Political Sciences
ISSN (Print)
2754-1169
ISSN (Online)
2754-1177
DOI
10.54254/2754-1169/61/20231181
Copyright
28 December 2023
Open Access
This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited

Copyright © 2023 EWA Publishing. Unless Otherwise Stated