Forecasting of Banking Sector Security Prices in Kenya Using Machine Learning Techniques
Abstract
Financial analysts should be able to make accurate predictions about the direction of the stock market. First and foremost, investors should understand how the stock market works before making any form of investment in a company. An investment in a stock that is trading at a cheap price at the right moment can result in profits, but an investment in a stock that is trading at a high price at the wrong time might result in low results. When deciding whether to buy, sell, or do nothing at all, experienced traders typically use a combination of indicators to make their assessment. Less experienced traders, on the other hand, may not be able to recognize the appropriate patterns of market elements when using the available indicator baskets. Throughout the course of history, there have been a wide variety of strategies and methods that may effectively predict the behaviour of stocks. On the other hand, more resources have been devoted to the study of the stock market since Machine Learning (ML) was developed, and it has been shown that accurate stock market prediction is feasible. Although research in this area has been done, there hasn't been any that compares the various machine learning algorithms for predicting the securities of the Kenyan banking sector. As a result, the purpose of this study was to make projections on the pricing of banking sector securities in Kenya by utilizing Machine Learning techniques and fit Autoregressive Integrated Moving Average (ARIMA), Artificial Neural Network (ANN), and Support Vector Machine (SVM) models for forecasting banking sector security prices. The study made its predictions based on the random walk theory of predicting stock market movements. The research aimed to look at all of the banks that are traded on the Nairobi Securities Exchange, and a representative sample was picked from three of those institutions, using purposive sampling technique: the Kenya Commercial bank, the Equity bank, and the Co-operative bank. The correctness of each model was evaluated by applying the Root Mean Squared Error (RMSE) criterion, the Mean Squared Error (MSE) criterion, the Mean Absolute Percentage Error (MAPE) criterion, and the Mean Absolute Error (MAE) criterion. The confusion matrix criterion was used to choose the most effective model. With an RMSE of 0.1217, SVM beat the other models when using the accuracy metrics criteria and the Confusion Matrix. In comparison, ANN and ARIMA had RMSEs of 0.1477 and 0.1743 respectively. It was also clear, based on the confusion matrix, that SVM performed better than ANN since it had an accuracy of 0.6171, which is equivalent to 61.71 percent, whereas ANN only had 0.5959, (59.59%). The study recommended that SVM should be used by financial experts for stock price predictions. For further research, historical data can be used in conjunction with studies of financial and political events when forecasting.