Preprint Article Version 1 This version is not peer-reviewed

A Comparative Analysis of Machine Learning and Deep Learning Techniques for Accurate Market Price Forecasting

Version 1 : Received: 12 September 2024 / Approved: 12 September 2024 / Online: 12 September 2024 (12:55:18 CEST)

How to cite: Shobayo, O.; Adeyemi-longe, S.; Popoola, O.; Okoyeigbo, O. A Comparative Analysis of Machine Learning and Deep Learning Techniques for Accurate Market Price Forecasting. Preprints 2024, 2024091005. https://doi.org/10.20944/preprints202409.1005.v1 Shobayo, O.; Adeyemi-longe, S.; Popoola, O.; Okoyeigbo, O. A Comparative Analysis of Machine Learning and Deep Learning Techniques for Accurate Market Price Forecasting. Preprints 2024, 2024091005. https://doi.org/10.20944/preprints202409.1005.v1

Abstract

The study compares three machine learning and deep learning models—Support Vector Regression (SVR), Recurrent Neural Networks (RNN), and Long Short-Term Memory (LSTM)—for predicting market prices using the NGX All-Share Index dataset. The models were evaluated using multiple error metrics, including Mean Absolute Error (MAE), Mean Squared Error (MSE), Root Mean Square Error (RMSE), Mean Percentage Error (MPE), and R-squared. RNN and LSTM were tested with both 30 and 60-day windows, with performance compared to SVR. LSTM delivered better R-squared values, with a 60-day LSTM achieving the best accuracy (R-squared = 0.993) when using a combination of endogenous market data and technical indicators. SVR showed reliable results in certain scenarios but struggled in fold 2 with sudden spike that shows high probability of not capturing the entire underlying NGX pattern in the dataset correctly as witnessed with the high validation loss during the period. Additionally, RNN faced the vanishing gradient problem that limits its long-term performance. Despite challenges, LSTM's ability to handle temporal dependencies, especially with the inclusion of On-Balance Volume, led to significant improvements in prediction accuracy. The use of the Optuna optimization framework further enhanced model training and hyperparameter tuning, contributing to the performance of the LSTM model.

Keywords

Hybrid Model; LSTM; Logistic Regression, Recurrent Neural Network, Support Vector Regression, FinBERT)

Subject

Computer Science and Mathematics, Artificial Intelligence and Machine Learning

Comments (0)

We encourage comments and feedback from a broad range of readers. See criteria for comments and our Diversity statement.

Leave a public comment
Send a private comment to the author(s)
* All users must log in before leaving a comment
Views 0
Downloads 0
Comments 0


×
Alerts
Notify me about updates to this article or when a peer-reviewed version is published.
We use cookies on our website to ensure you get the best experience.
Read more about our cookies here.