A Deep Learning Model for Predicting Stock Prices in Tanzania
View/ Open
Date
2023-04-02Author
Joseph, Samuel
Mduma, Neema
Nyambo, Devotha
Metadata
Show full item recordAbstract
Stock price prediction models help traders to reduce investment risk and choose the most profitable stocks.
Machine learning and deep learning techniques have been applied to develop various models. As there is a
lack of literature on efforts to utilize such techniques to predict stock prices in Tanzania, this study
attempted to fill this gap. This study selected active stocks from the Dar es Salaam Stock Exchange and
developed LSTM and GRU deep learning models to predict the next-day closing prices. The results showed
that LSTM had the highest prediction accuracy with an RMSE of 4.7524 and an MAE of 2.4377. This
study also aimed to examine whether it is significant to account for the outstanding shares of each stock
when developing a joint model for predicting the closing prices of multiple stocks. Experimental results
with both models revealed that prediction accuracy improved significantly when the number of
outstanding shares of each stock was taken into account. The LSTM model achieved an RMSE of 10.4734
when the outstanding shares were not taken into account and 4.7524 when they were taken into account,
showing an improvement of 54.62%. However, GRU achieved an RMSE of 12.4583 when outstanding
shares were not taken into account and 8.7162 when they were taken into account, showing an
improvement of 30.04%. The best model was implemented in a web-based prototype to make it accessible
to stockbrokers and investment advisors.