Full Text Available

Note: Clicking the button above will open the full text document at the original institutional repository in a new window.

A comparative study of recurrent neural networks and statistical techniques for forecasting the stock prices of JSE-listed securities

As machine learning has developed, the attention of stock price forecasters has slowly shifted from traditional statistical forecasting techniques towards machine learning techniques. This study investigated whether machine learning techniques, in particular, recurrent neural networks, do indeed pro...

Full description

Saved in:
Bibliographic Details
Main Author: Galant, Rushin
Other Authors: Marais, Patrick
Format: Thesis
Language:English
Published: Department of Computer Science 2023
Subjects:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1867613174682877952
access_status_str Open Access
author Galant, Rushin
author2 Marais, Patrick
author_browse Galant, Rushin
Marais, Patrick
author_facet Marais, Patrick
Galant, Rushin
author_sort Galant, Rushin
collection Thesis
description As machine learning has developed, the attention of stock price forecasters has slowly shifted from traditional statistical forecasting techniques towards machine learning techniques. This study investigated whether machine learning techniques, in particular, recurrent neural networks, do indeed provide greater forecasting accuracy than traditional statistical techniques on the Johannesburg Securities' Exchanges' top forty stocks. The Johannesburg Securities Exchange represents the largest and most developed stock exchange in Africa, though limited research has been performed on the application of machine learning in forecasting stock prices on this exchange. Simple recurrent neural networks, Gated Recurrent Units and Long-Short Term Memory Units were thoroughly evaluated with a Convolutional Neural Network and a random forest were used as machine learning benchmarks. Historical data was collected for the period 2 January 2019 to 29 May 2020, with the 2019 calendar year being used as the training dataset. Both a train once and a Walkforward configuration were used. The number of input observations utilised were varied from four to fifteen observations whilst making forecasts from one up to ten timesteps into the future. The Mean Percentage Error was utilised to measure forecasting accuracy. Different configurations of the Neural Network models were assessed, including considering whether bidirectionality improved forecasting accuracy. The neural networks were run using two different datasets, the historical stock prices on its own and the historical stock prices with the market index (the JSE All Share Index) to determine whether including the market index improves forecasting accuracy. The study found that bidirectional neural networks provided more accurate forecasts than neural networks that did not incorporate bidirectionality. In particular, the Bidirectional Long Short-Term Memory provided the greatest forecasting accuracy for one step forecast whilst the Bidirectional GRU was more accurate two to eight time steps into the future with the Bidirectional LSTM model being more accurate for nine and ten time steps into the future. However, the classical statistical model, the theta method, significantly outperformed all machine learning models. This is likely the result of the unforeseen impact of the covid-19 pandemic on financial markets that would not have been factored into the training sets of the machine learning algorithms. . . .
format Thesis
id oai:open.uct.ac.za:11427/37182
institution University of Cape Town (South Africa)
language eng
last_indexed 2026-06-10T12:31:56.645Z
license_str Not specified — see source repository
provenance_str_mv Harvested via OAI-PMH from UCTD — University of Cape Town Open Access Repository
publishDate 2023
publishDateRange 2023
publishDateSort 2023
publisher Department of Computer Science
publisherStr Department of Computer Science
record_format dspace
source_str UCTD — University of Cape Town Open Access Repository
spelling oai:open.uct.ac.za:11427/37182 A comparative study of recurrent neural networks and statistical techniques for forecasting the stock prices of JSE-listed securities Galant, Rushin Marais, Patrick Information Technology As machine learning has developed, the attention of stock price forecasters has slowly shifted from traditional statistical forecasting techniques towards machine learning techniques. This study investigated whether machine learning techniques, in particular, recurrent neural networks, do indeed provide greater forecasting accuracy than traditional statistical techniques on the Johannesburg Securities' Exchanges' top forty stocks. The Johannesburg Securities Exchange represents the largest and most developed stock exchange in Africa, though limited research has been performed on the application of machine learning in forecasting stock prices on this exchange. Simple recurrent neural networks, Gated Recurrent Units and Long-Short Term Memory Units were thoroughly evaluated with a Convolutional Neural Network and a random forest were used as machine learning benchmarks. Historical data was collected for the period 2 January 2019 to 29 May 2020, with the 2019 calendar year being used as the training dataset. Both a train once and a Walkforward configuration were used. The number of input observations utilised were varied from four to fifteen observations whilst making forecasts from one up to ten timesteps into the future. The Mean Percentage Error was utilised to measure forecasting accuracy. Different configurations of the Neural Network models were assessed, including considering whether bidirectionality improved forecasting accuracy. The neural networks were run using two different datasets, the historical stock prices on its own and the historical stock prices with the market index (the JSE All Share Index) to determine whether including the market index improves forecasting accuracy. The study found that bidirectional neural networks provided more accurate forecasts than neural networks that did not incorporate bidirectionality. In particular, the Bidirectional Long Short-Term Memory provided the greatest forecasting accuracy for one step forecast whilst the Bidirectional GRU was more accurate two to eight time steps into the future with the Bidirectional LSTM model being more accurate for nine and ten time steps into the future. However, the classical statistical model, the theta method, significantly outperformed all machine learning models. This is likely the result of the unforeseen impact of the covid-19 pandemic on financial markets that would not have been factored into the training sets of the machine learning algorithms. . . . 2023-03-03T09:36:02Z 2023-03-03T09:36:02Z 2022 2023-02-20T12:46:21Z Master Thesis Masters MPhil http://hdl.handle.net/11427/37182 eng application/pdf Department of Computer Science Faculty of Science
spellingShingle Information Technology
Galant, Rushin
A comparative study of recurrent neural networks and statistical techniques for forecasting the stock prices of JSE-listed securities
thesis_degree_str Master's
title A comparative study of recurrent neural networks and statistical techniques for forecasting the stock prices of JSE-listed securities
title_full A comparative study of recurrent neural networks and statistical techniques for forecasting the stock prices of JSE-listed securities
title_fullStr A comparative study of recurrent neural networks and statistical techniques for forecasting the stock prices of JSE-listed securities
title_full_unstemmed A comparative study of recurrent neural networks and statistical techniques for forecasting the stock prices of JSE-listed securities
title_short A comparative study of recurrent neural networks and statistical techniques for forecasting the stock prices of JSE-listed securities
title_sort comparative study of recurrent neural networks and statistical techniques for forecasting the stock prices of jse listed securities
topic Information Technology
url http://hdl.handle.net/11427/37182
work_keys_str_mv AT galantrushin acomparativestudyofrecurrentneuralnetworksandstatisticaltechniquesforforecastingthestockpricesofjselistedsecurities
AT galantrushin comparativestudyofrecurrentneuralnetworksandstatisticaltechniquesforforecastingthestockpricesofjselistedsecurities