A comparative study of recurrent neural networks and statistical techniques for forecasting the stock prices of JSE-listed securities
dc.contributor.advisor | Marais, Patrick | |
dc.contributor.author | Galant, Rushin | |
dc.date.accessioned | 2023-03-03T09:36:02Z | |
dc.date.available | 2023-03-03T09:36:02Z | |
dc.date.issued | 2022 | |
dc.date.updated | 2023-02-20T12:46:21Z | |
dc.description.abstract | 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. . . . | |
dc.identifier.apacitation | Galant, R. (2022). <i>A comparative study of recurrent neural networks and statistical techniques for forecasting the stock prices of JSE-listed securities</i>. (). ,Faculty of Science ,Department of Computer Science. Retrieved from http://hdl.handle.net/11427/37182 | en_ZA |
dc.identifier.chicagocitation | Galant, Rushin. <i>"A comparative study of recurrent neural networks and statistical techniques for forecasting the stock prices of JSE-listed securities."</i> ., ,Faculty of Science ,Department of Computer Science, 2022. http://hdl.handle.net/11427/37182 | en_ZA |
dc.identifier.citation | Galant, R. 2022. A comparative study of recurrent neural networks and statistical techniques for forecasting the stock prices of JSE-listed securities. . ,Faculty of Science ,Department of Computer Science. http://hdl.handle.net/11427/37182 | en_ZA |
dc.identifier.ris | TY - Master Thesis AU - Galant, Rushin AB - 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. . . . DA - 2022_ DB - OpenUCT DP - University of Cape Town KW - Information Technology LK - https://open.uct.ac.za PY - 2022 T1 - A comparative study of recurrent neural networks and statistical techniques for forecasting the stock prices of JSE-listed securities TI - A comparative study of recurrent neural networks and statistical techniques for forecasting the stock prices of JSE-listed securities UR - http://hdl.handle.net/11427/37182 ER - | en_ZA |
dc.identifier.uri | http://hdl.handle.net/11427/37182 | |
dc.identifier.vancouvercitation | Galant R. A comparative study of recurrent neural networks and statistical techniques for forecasting the stock prices of JSE-listed securities. []. ,Faculty of Science ,Department of Computer Science, 2022 [cited yyyy month dd]. Available from: http://hdl.handle.net/11427/37182 | en_ZA |
dc.language.rfc3066 | eng | |
dc.publisher.department | Department of Computer Science | |
dc.publisher.faculty | Faculty of Science | |
dc.subject | Information Technology | |
dc.title | A comparative study of recurrent neural networks and statistical techniques for forecasting the stock prices of JSE-listed securities | |
dc.type | Master Thesis | |
dc.type.qualificationlevel | Masters | |
dc.type.qualificationlevel | MPhil |