Empirical evaluation of lstm-based stock price forecasting on the Nairobi securities exchange in Kenya

Abstract

Having a precise prediction of stock prices can be of great importance in investment policies and budgeting. The study used the Long Short-Term Memory (LSTM) neural networks to forecast stock price changes through the formation of sequential, nonlinear relationships in financial time series data. Our data provenance and relevance are enhanced by the fact that the dataset contains the official daily stock prices of the official Nairobi Securities Exchange (NSE). Exploratory data analysis was performed before training the prediction model to carefully preprocess and study the stock prices with performance measured against a baseline with common traditional machine learning algorithms including Random Forest, Support Vector Regression, K-Nearest Neighbors and ARIMA. The LSTM generated the lowest RMSE values and maximum R2 values compared to its baselines. To enhance the interpretability of the model even more, we enhanced transparency with the help of SHAP (SHapley Additive exPlanations) analysis that revealed the most influential features used in predicting stock prices. The findings reflect that deep learning is effective in financial forecasts and give a consistent and versatile structure of comparable predictive modeling in capital markets. However, the analysis was limited by the data and the calculation capabilities, which can affect the generalization to high-frequency trading scenarios. Future work should consider hybrid deep learning architecture, including further macroeconomic and sentiment indicators, and testing the framework in other emerging markets to increase robustness and generalizability.

Description

Keywords

Citation

Endorsement

Review

Supplemented By

Referenced By

Item Statistics
13Total Views

Views Per Month

Feb
Mar
Apr
May
Jun
Jul
Aug