- Home
- Archives
- 2026
- Vol. 5 Issue 3
- Article
A Machine Learning Risk-Return Model for Price Prediction on the Nairobi Securities Exchange
Authors
1 2 School of Computing and Mathematics, The Co-operative University of Kenya, Kenya. 3 School of Pure and Applied Sciences, University of Embu, Kenya.
Article Information
- Published In
- Volume 5, Issue 3 (2026)
- Published Online
- September-December 2026
- Pages
- 633-638
- Article Type
- Original Article
Abstract
View PDFWhile the Nairobi Securities Exchange (NSE) is a key enabler for capital mobilization in the East Africa region, investment decision making is still largely manual, and is prone to behavioral biases. In this study a machine learning based Risk-Return Model was built and tested for developing realistic trading signals for NSE traders. The research was carried out with the 226,016 daily stock day record of 95 shares between 2007 and 2025. The approach included a walk-forward validation framework to implement a dual-engine architecture of a prediction server with the use of models including: Random Forest, XGBoost, LSTM model, GRU model, and a risk server model based on Value at Risk, and Capital Asset Pricing Model. Results showed that the total variance of NSE returns is accounted for by the macroeconomic factors, of which inflation (r = -0.641) and FX depreciation (β = -0.1842) are the dominant factors. The sector effects were also highly significant (F = 124.8, p < 0.001) as the stocks in the Telecommunication sector beat the stocks in the Energy sector with an average of 742 basis points per year. The ensemble model performed well with 56.8% directional accuracy (p < 0.001) resulting in a Sharpe ratio of 1.71, a positive 3-year back test portfolio return of +40.31% against a negative NSE 20-Share Index return of -0.02% over the same period. Results corroborate the Adaptive Markets Hypothesis, not the Efficient Market Hypothesis - using integrated machine learning and risk management solutions in frontier markets, systematic alpha generation is possible.
Related Articles
Share Article
*Instagram doesn't support direct link sharing from web. Copy the link and share it in your Instagram story or post.