Machine Learning Models for Stock Market Forecasting: A Comparative Study

Authors

  • Samina Qureshi Associate Professor of Finance, Lahore School of Economics, Lahore Author
  • Fahad Hussain Assistant Professor of Artificial Intelligence, National University of Computer and Emerging Sciences (NUCES), Islamabad Author

Keywords:

Machine learning, stock market forecasting, deep learning, ensemble models, sentiment analysis, explainable AI

Abstract

This paper presents a comparative study of machine learning models for stock market forecasting, analyzing the performance of tree-based, kernel-based, deep learning, and hybrid algorithms. Using a multimodal dataset combining historical price data, technical indicators, and sentiment scores from financial text, the models were evaluated through rolling-window cross-validation and multiple metrics, including RMSE, MAPE, and R2R^2R2. The results reveal that deep learning architectures such as LSTM and GRU achieve the lowest error rates, while ensemble methods like XGBoost and Gradient Boosting provide robust performance across heterogeneous data. Hybrid models integrating textual and numerical features consistently outperform purely quantitative approaches, highlighting the importance of sentiment analysis in financial forecasting. Feature importance analysis further demonstrates that sentiment and volatility indicators contribute significantly to predictive reliability. While deep learning models excel in accuracy, their computational demands present practical limitations, underscoring the trade-off between efficiency and precision. Explainable AI techniques, including SHAP, enhance model interpretability and regulatory compliance. This study contributes to both academic literature and industry practice by identifying the strengths and weaknesses of competing models, offering a pathway toward more reliable, interpretable, and efficient financial forecasting systems.

Downloads

Published

2023-12-31