Abstract

The capital market act as an intermediary between capital providers (investors) and capital seekers. Investors are able to distribute their money to demand points through this market. For a smooth running of the market, the market have to be efficient and liquid. This implies that investors can buy or sell a share of a stock at a reasonably fair price. The decision to buy or sell a share of the stock is a major investment decision to be made by investors/market players in the capital market. In this paper, different machine learning techniques are used to predict the movement of stocks on the stock market. Stocks are classified into labels according to their current and day-ahead closing price. That is, if the day-ahead closing price is greater than or equal to the current closing price, the investor/market player sells the shares of the stock, else the investor/market player buys additional shares of the stock. Four features (the difference between the price low and price high, the difference between the closing and opening price, the market capitalization, and the volume traded) are used to predict the labels. Two machine learning classifiers (Adaptive Boosting and K-Nearest Neighbour) and Stacking ensemble classifier are trained and used for the classification problem. Using dataset obtained from the Nairobi Stock Exchange, the robustness and effectiveness of the methods on the testing datasets are validated. The results shows that: 1) the Stacking Ensemble Learning Method with two base learners (Adaptive Boosting and K-Nearest Neighbour) and Gradient Boosting Machine as the meta-classifier outperforms the two individual classifiers with an accuracy of 0.7810, area under curve of 0.8238, a kappa of 0.5516, and an out of bag error (OOB) rate of 21.89%, 2) the Volume of shares traded on a specific day does not have much importance when buying or selling shares on the Nairobi stock exchange capital market, and 3) machine learning classifiers can be applied to the stock market for optimal investment decisions. Pan African University, Institute for Basic Sciences, Technology, and Innovation, African Union

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call