Stock Prediction Analysis Based on LogisticRegression and Random Forest
DOI:
https://doi.org/10.61173/kwhazd65Keywords:
Logistic Regression, Random Forest, Stock PredictionAbstract
An important factor in a nation’s economic growth is the stock market. Accurate stock price prediction is vital for investors, financial analysts, and investment institutions. However, the volatility of stock prices makes prediction challenging. Adopting advanced analytical methods can improve prediction accuracy. This paper investigates the application of machine learning (ML) algorithms, such as logistic regression (LR) and random forest (RF) in predicting stock price trends, exploring their value in stock forecasting. Ten daily features, such as opening price, closing price, and trading volume, were utilized to train models. By exploring the impact of the number of historical days on prediction accuracy, the study found that the LR model achieved its highest accuracy (53.8%) when utilizing data from the previous 4 days. Further comparison among models revealed that the RF model outperformed both LR and BP models, achieving the highest prediction accuracy (58.3%) and AUC (0.576). These findings suggest that RF holds promise as a reliable tool for stock price trend forecasting, providing valuable insights for investors seeking more accurate market prediction tools.
References
[1] Wafi A S, Hassan H, Mabrouk A. Fundamental Analysis Models in Financial Markets-Review Study. IISES Economics and Finance Conference; IISES Economics and Finance Conference.2015.
[2] Corizzo R, Rosen J. Stock market prediction with time series data and news headlines: a stacking ensemble approach. Journal of intelligent information systems, 2024, 62(1):27-56.
[3] Zhu Z, Wang W. Stock Type Prediction Based on Multiple Machine Learning Methods. Journal of Intelligent Learning Systems and Applications, 2024, 16(3): 20.
[4] Ananthakumar U, Sarkar R. Application of Logistic Regression in Assessing Stock Performances. IEEE International Conference on Pervasive Intelligence and Computing. 2017.
[5] Sheth D, Shah M. Predicting stock market using machine learning: the best and accurate way to know future stock prices. International journal of systems assurance engineering and management, 2023.
[6] Breitung C. Automated stock picking using random forests. Journal of Empirical Finance, 2023, 72: 532-556.
Downloads
Published
Issue
Section
License
Copyright (c) 2025 by the authors.

This work is licensed under a Creative Commons Attribution 4.0 International License.
