Comparing XGBoost and LSTM Models for Prediction of Microsoft Corp's Stock Price Direction
Authors: Osaigbokan Peter UhunmwanghoThis study investigates the effectiveness of XGBoost and LSTM models in predicting the directional changes in Microsoft stock price using incremental values to mitigate inaccuracies in Directional Accuracy Percentage (DAP) evaluations. A twenty-three-year Microsoft stock prices dataset from Yahoo Finance spanning January 1st, 2000, to December 31st, 2023 is utilized, the dataset is scaled, and technical indicators are computed. Both models are trained on the extracted features to predict directional changes, evaluated using the Directional Accuracy Percentage (DAP). The XGBoost model achieves an accuracy metric value of 71.02%, whereas LSTM ranges from 62.42% to 67.10%. A Mann-Whitney U test confirms a significant difference in predictive performance, favouring XGBoost. This finding suggests XGBoost as a more effective tool for short-term decision-making in stock trading, underlining its potential to improve the predictive accuracy in financial forecasting and advancing predictive modelling research.