TITLE:
A Comparative Analysis of the Performance of Machine Learning and Deep Learning Techniques in Predicting Stock Prices
AUTHORS:
Shimaa Ouf, Mona El Hawary, Amal Aboutabl, Sherif Adel
KEYWORDS:
Stock Price Prediction, LSTM, XGBoost, Random Forest Regressor, Machin Learning
JOURNAL NAME:
Journal of Computer and Communications,
Vol.13 No.4,
April
28,
2025
ABSTRACT: The Efficient Market Hypothesis postulates that stock prices are unpredictable and complex, so they are challenging to forecast. However, this study demonstrates that it is possible to predict stock prices with reasonable accuracy using machine learning (ML) and deep learning (DL) models with optimized parameters. This compares ML models, such as Random Forest (RF) and XGBoost, against deep learning models, such as Long Short-Term Memory (LSTM), in terms of the accuracy of their market forecasting over different time horizons. The above models are used to predict the Apple stock market prices captured from Yahoo Finance from 2015 to 2020. The primary purpose of this paper is to enhance the prediction accuracy by tuning hyperparameters to choose the best optimization parameters that fit every predictive model. The experimental part of this paper uses fixed value (default) parameters for each model compared to the use of tuned hyperparameters; it tries combinations of hyperparameters and evaluates their performance on a validation set. This is done to determine the extent to which the hyperparameters enhanced the accuracy of the predictions and their impact on the results. The LSTM model achieved higher accuracy and recorded the first rank. They lowered it from 5.22 to 3.82; XGBoost had the second-best reduction of RMSE from 0.79 to 0.65, and Random Forest had a low-rate reduction of RMSE from 28.12 to 27.39. This means that effect-tuning hyperparameters can be used to improve the model’s prediction accuracy and lower the error rate.