Application of machine learning model in stock prediction

Authors

  • Lingyun Gao

DOI:

https://doi.org/10.54097/xcqjne10

Keywords:

learning model, random forest, LSTM prediction

Abstract

Economic stability and investor decision-making are significantly impacted by the stock market, which plays a crucial role in financial markets worldwide. This study focuses on applying machine learning models, particularly Random Forest, Extreme Gradient Boosting (XGBoost), and Long Short-Term Memory (LSTM), to predict Tesla stock prices. Various models' performance in stock prediction is evaluated using R-squared (R2), Mean Absolute Error (MAE), and Root Mean Square Error (RMSE). The results show that Random Forest and LSTM achieve the highest forecast accuracy, outperforming other models. These findings suggest that machine learning models are effective tools for stock prediction, providing valuable insights for investors. The superior performance of Random Forest and LSTM may be attributed to their ability to capture complex patterns in the data, especially in volatile markets. To further enhance the precision and reliability of stock predictions, future research should explore multi-source data integration and advanced model optimization techniques. Additionally, incorporating market sentiment and macroeconomic indicators could improve prediction robustness and offer deeper insights into market trends.

Downloads

Download data is not yet available.

References

[1] Bollen, J., Mao, H., & Zeng, X., 2011. Twitter mood predicts the stock market. Journal of Computational Science, 2(1), 1–8.

[2] Chen, T., & Guestrin, C., 2016. XGBoost: A Scalable Tree Boosting System. Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 785–794.

[3] Gupta, R., & Chen, M., 2020. Sentiment analysis for stock price prediction. International Journal of Computer Applications, 178(19), 36–41.

[4] Li, X., Zhang, Y., & Wang, H., 2022. Research and application of stock market prediction model based on LSTM. Financial and Economic Research, 45(3), 123–135.

[5] Nelson, D. M., Pereira, A. C. M., & de Oliveira, R. A., 2017. Stock market's price movement prediction with LSTM neural networks. In 2017 International Joint Conference on Neural Networks (IJCNN), 1419–1426. IEEE.

[6] Oliveira, N., Cortez, P., & Areal, N., 2017. Stock market sentiment analysis using news articles. Journal of Business Research, 68(5), 1017–1028.

[7] Yu, P., 2020. Dataset selection and influencing factors in stock market prediction. Modern Economic Analysis, 38(5), 98–110.

[8] Zhang, H., 2021. Improved LSTM model based on attention mechanism and its application in stock market. Artificial Intelligence and Finance, 13(1), 89–101.

[9] Zhang, J., & Liu, M., 2021. Application and challenges of LSTM model in stock market volatility prediction. Data Science and Engineering, 12(4), 215–227.

[10] Zhong, X., & Enke, D., 2019. Predicting the daily return direction of the stock market using hybrid machine learning algorithms. Financial Innovation, 5(1), 1–20.

Downloads

Published

21-09-2025

How to Cite

Gao, L. (2025). Application of machine learning model in stock prediction. Highlights in Business, Economics and Management, 63, 173-178. https://doi.org/10.54097/xcqjne10