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. Preprints2024, 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
Shobayo, O.; Adeyemi-longe, S.; Popoola, O.; Okoyeigbo, O. A Comparative Analysis of Machine Learning and Deep Learning Techniques for Accurate Market Price Forecasting. Preprints2024, 2024091005. https://doi.org/10.20944/preprints202409.1005.v1
APA Style
Shobayo, O., Adeyemi-longe, S., Popoola, O., & Okoyeigbo, O. (2024). A Comparative Analysis of Machine Learning and Deep Learning Techniques for Accurate Market Price Forecasting. Preprints. https://doi.org/10.20944/preprints202409.1005.v1
Chicago/Turabian Style
Shobayo, O., Olusogo Popoola and Obinna Okoyeigbo. 2024 "A Comparative Analysis of Machine Learning and Deep Learning Techniques for Accurate Market Price Forecasting" Preprints. 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.
Computer Science and Mathematics, Artificial Intelligence and Machine Learning
Copyright:
This is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.