Forecasting Equity Market Performance: A Comparative Analysis of Linear Regression, Random Forest, and LSTM Approaches

Authors

  • Dody Suhermawan PT. Mawadaku Sinergi Solusindo
  • Krisna Didit Wiwaha CEO PT Galena Perkasa Logistik
  • Muchammad Ilham SAM Undergraduate Student, Universitas Ciputra Surabaya

DOI:

https://doi.org/10.61160/jomss.v3i2.85

Keywords:

Stock Price Forecasting, Linear Regression, Random Forest, LSTM, Machine Learning, Financial Time Series, Predictive Analytics

Abstract

This research explores the predictive capabilities of three distinct modeling approaches—Linear Regression, Random Forest, and Long Short-Term Memory (LSTM)—in forecasting stock prices using data from 29 companies, including the S&P 500 index, spanning from January 1, 2000, to June 27, 2024. Through the utilization of historical time-series data, the study evaluates model performance based on key statistical indicators: Mean Squared Error (MSE), Root Mean Squared Error (RMSE), and the coefficient of determination (R²). The findings indicate that while Random Forest outperforms Linear Regression in terms of accuracy, the LSTM model consistently delivers superior results, attributed to its strength in capturing sequential dependencies within financial data. These insights contribute to the growing body of literature in financial analytics by highlighting the comparative strengths of traditional, ensemble-based, and deep learning methods for stock market prediction. Furthermore, the study opens up avenues for integrating advanced temporal models into future financial forecasting frameworks.

References

Bhandari, M., Sharma, A., & Gupta, V. (2022). Stock market prediction using machine learning: A comprehensive review. Journal of Financial Technology, 7(3), 95-115. https://doi.org/10.1016/j.jfintec.2022.100021.

Hochreiter, S., & Schmidhuber, J. (1997). Long short-term memory. Neural Computation, 9(8), 1735-1780. https://doi.org/10.1162/neco.1997.9.8.1735.

Ho, T. H., He, K., & Zhang, J. (2021). Predicting stock market trends: A comparative study of traditional and machine learning models. Financial Analysts Journal, 77(1), 45-59. https://doi.org/10.2469/faj.v77.n1.45.

Hoque, M. M., Ganaie, M. A., & Ahmed, S. (2020). Stock price prediction using Random Forest and machine learning techniques. International Journal of Data Science and Machine Learning, 5(4), 39-47. https://doi.org/10.1186/s40008-020-00201-7.

Ma, J., Zhang, H., & Liu, Y. (2019). Hybrid stock prediction using LSTM and principal component analysis. Proceedings of the International Conference on Machine Learning and Data Mining, 123-134. https://doi.org/10.1109/ICMLDM.2019.00112.

Moghar, H., & Hamiche, S. (2020). Forecasting stock prices using deep learning LSTM model. International Journal of Advanced Computer Science and Applications, 11(2), 155-164. https://doi.org/10.14569/IJACSA.2020.0110218.

Qiu, T., Li, H., & Zhang, D. (2020). Attention-based LSTM for stock market prediction. Neural Networks, 131, 39-49. https://doi.org/10.1016/j.neunet.2020.05.008.

Selvin, S., Vinayakumar, R., & Soman, K. P. (2017). Stock prediction using LSTM, RNN and CNN-sliding window model. 2017 IEEE International Conference on Innovations in Green Energy and Applications (ICIGEA), 231-236. https://doi.org/10.1109/ICIGEA.2017.8534380.

Sharma, M., & Gupta, D. (2018). A survey on stock price prediction models. Journal of Computer Science and Applications, 13(4), 90-105. https://doi.org/10.3926/jcsa.2018.013.

Ta, A. T., Vo, B. T., & Nguyen, T. L. (2020). Enhancing portfolio optimization using LSTM prediction and Monte Carlo simulations. Journal of Portfolio Management, 46(5), 79-92. https://doi.org/10.3905/jpm.2020.46.5.79.

Downloads

Published

2025-07-02

How to Cite

Dody Suhermawan, Didit Wiwaha, K., & Ilham SAM, M. (2025). Forecasting Equity Market Performance: A Comparative Analysis of Linear Regression, Random Forest, and LSTM Approaches. Journal of Managerial Sciences and Studies, 3(2), 1076–1092. https://doi.org/10.61160/jomss.v3i2.85