Original Article

A Deep Learning Framework for Predicting Profit and Loss in the Nigerian Stock Exchange Market Using Long Short-Term Memory

Aminu Adamu Ahmed; Department of Information Communication Technology, Federal Polytechnic Kaltungo, Gombe State, Nigeria

Volume 001 (2026) — Issue 01 · Pages 41–48

Download PDF 30 views · 30 downloads

Abstract

The prediction of short-horizon profit and loss states in equity markets remains a persistently difficult problem because of the non-stationary, noisy and weak-form efficient character of daily price movements. This study proposes and evaluates a Long Short-Term Memory (LSTM) deep learning framework for classifying next-day profit or loss states of the Nigerian Stock Exchange (NSE) All-Share Index using nine years (2015-2023) of daily trading data comprising 2,221 observations after cleaning, with a further contextual update drawing on publicly reported index levels through July 2026 to situate the sample within the market's subsequent trajectory. Twelve engineered predictors, including lagged prices, moving averages, the Relative Strength Index, ten-day volatility and daily trading range, were transformed into overlapping fifteen-day input sequences and used to train a single-layer LSTM network with sixteen hidden units, trained via back-propagation through time with the Adam optimiser. Model performance was benchmarked against a naive persistence rule and an ordinary least squares linear baseline using accuracy, precision, recall, F1-score and the area under the receiver operating characteristic curve (AUC). The LSTM achieved a test-set AUC of 0.597, an F1-score of 0.704 and an accuracy of 57.2%, exceeding both the naive persistence baseline (56.6%) and the linear OLS baseline (49.1%). These findings are interpreted within the weak-form Efficient Market Hypothesis and highlight both the promise and the practical limits of recurrent deep learning architectures for high-frequency profit/loss classification in a frontier African market that has, since the end of the modelling sample, continued into a pronounced multi-year bull run. The paper contributes a fully reproducible, Python-implemented framework, an empirical benchmark for the NSE All-Share Index, and methodological guidance for practitioners and researchers working with thin, high-volatility emerging-market datasets.

Keywords

Long Short-Term Memory, Deep Learning, Nigerian Stock Exchange, Profit And Loss Prediction, Time Series Classification, Financial Forecasting