Enhancing Stock Price Prediction Using Machine Learning Models: A Comparative Study of SVM, LSTM, and GRU

No Thumbnail Available

Date

2024-08

Journal Title

Journal ISSN

Volume Title

Publisher

University College London

Abstract

This study evaluates the effectiveness of three machine learning models—Support Vector Machine (SVM), Long Short-Term Memory (LSTM) networks, and Gated Recurrent Units (GRU)—in predicting the stock prices of Saudi Aramco. Using historical stock price data and technical indicators, the models were assessed based on their accuracy in both long-term and short-term predictions. The findings reveal that LSTM and GRU significantly outperform SVM, with LSTM showing superior performance in capturing long-term dependencies and GRU offering a balance between accuracy and computational efficiency. Specifically, LSTM achieved a Root Mean Squared Error (RMSE) of 0.0516 and a Mean Absolute Error (MAE) of 0.0323, while GRU recorded an RMSE of 0.0539 and an MAE of 0.0234. In contrast, SVM exhibited a much higher RMSE of 0.1712 and an MAE of 0.1079, indicating its struggles with market volatility. The 30-day prediction analysis further highlighted the strengths of LSTM and GRU in short-term forecasting, with both models maintaining an R² value above 0.993, while SVM lagged behind at 0.9332. Despite their advantages, the study identified limitations such as the exclusion of external economic factors and the models' varying effectiveness across different time horizons. These findings contribute to the growing field of financial forecasting, offering practical insights for investors and analysts on model selection. Future research is recommended to incorporate broader economic indicators, explore cross-market validation, and enhance the models' responsiveness to short-term market fluctuations.

Description

Keywords

Stock Price Prediction Machine Learning Models, Support Vector Machine (SVM), Long Short-Term Memory (LSTM), Gated Recurrent Unit (GRU), Comparative Analysis, Financial Forecasting, Data Preprocessing, Technical Indicators, Moving Averages (MA), Relative Strength Index (RSI), Moving Average Convergence Divergence (MACD), Time Series Analysis, Root Mean Squared Error (RMSE), Mean Squared Error (MSE), Mean Absolute Error (MAE), Hyperparameter Tuning, MATLAB, Yahoo Finance, Saudi Aramco, Financial Markets, Model Evaluation, Investment Decision-Making, High-Frequency Trading, Feature Selection

Citation

Endorsement

Review

Supplemented By

Referenced By

Copyright owned by the Saudi Digital Library (SDL) © 2024