A Comparative Analysis of LSTM, ARIMA, XGBoost Algorithms in Predicting Stock Price Direction

Stock prediction Stock prices Machine learning Ensemble models Hyperparameter tuning

Authors

  • Aiyegbeni Gifty University of East London, Department of Engineering and Computing, London, England, United Kingdom
  • Dr. Yang Li University of East London, Department of Engineering and Computing, London, England, United Kingdom
August 29, 2024
August 31, 2024

Downloads

This research report presents a comprehensive investigation into the prediction of Google's stock prices using advanced machine-learning techniques. The study focuses on assessing the predictive capabilities of three distinct algorithms: XGBoost, LSTM, and ARIMA, applied to historical stock price data with a specific emphasis on close prices. The primary goal is to develop accurate univariate models to forecast the closing stock price for the next day, a crucial aspect of financial decision-making. The evaluation of model performance utilizes a range of metrics including R-squared, Mean Absolute Error (MAE), and Root Mean Square Error (RMSE) to provide insights into predictive accuracy. Furthermore, the study explores the effectiveness of hyperparameter tuning and ensemble methods in optimizing model performance. The findings highlight the strong performance of the XGBoost model, which achieves a notable R-squared value and effectively minimizes error metrics. While ensemble techniques exhibit potential, they do not consistently outperform all individual models. The subsequent hyperparameter tuning of the XGBoost algorithm achieves a higher R-squared value of 99.47%, accompanied by an MAE of 15.98 and an RMSE of 27.34. This research contributes valuable insights into the potential of machine learning for stock price prediction, emphasizing the importance of thoughtful model selection and parameter optimization.