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

dc.contributor.advisorMarais, Patrick
dc.contributor.authorGalant, Rushin
dc.date.accessioned2023-03-03T09:36:02Z
dc.date.available2023-03-03T09:36:02Z
dc.date.issued2022
dc.date.updated2023-02-20T12:46:21Z
dc.description.abstractAs 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.apacitationGalant, 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/37182en_ZA
dc.identifier.chicagocitationGalant, 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/37182en_ZA
dc.identifier.citationGalant, 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/37182en_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.urihttp://hdl.handle.net/11427/37182
dc.identifier.vancouvercitationGalant 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/37182en_ZA
dc.language.rfc3066eng
dc.publisher.departmentDepartment of Computer Science
dc.publisher.facultyFaculty of Science
dc.subjectInformation Technology
dc.titleA comparative study of recurrent neural networks and statistical techniques for forecasting the stock prices of JSE-listed securities
dc.typeMaster Thesis
dc.type.qualificationlevelMasters
dc.type.qualificationlevelMPhil
Files
Original bundle
Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
thesis_sci_2022_galant rushin.pdf
Size:
3.36 MB
Format:
Adobe Portable Document Format
Description:
License bundle
Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
license.txt
Size:
0 B
Format:
Item-specific license agreed upon to submission
Description:
Collections