Forecasting Nigerian Stock Prices Using LSTM and ARIMAX
Abstract
Stock price volatility presents major challenges for investors and policymakers, particularly in emerging markets. This study evaluates the performance of Long Short-Term Memory (LSTM) networks and ARIMAX models for forecasting stock prices on the Nigerian Stock Exchange (NSE). Using 13 years (2012–2025) of daily stock price data, the dataset was preprocessed with lag feature engineering and normalization to enhance model learning and stability. The LSTM model, designed with three stacked layers and dropout regularization, was trained on temporally split data to simulate realistic forecasting conditions. Forecast accuracy was assessed using Mean Absolute Percentage Error (MAPE), Root Mean Square Error (RMSE), and a Forecast Accuracy Index. The ARIMAX model achieved lower errors (MAPE = 0.37%, RMSE = 537.23) and higher forecast accuracy (99.63%) compared to LSTM (MAPE = 0.92%, RMSE = 1486.39, Accuracy = 99.08%). Despite ARIMAX’s superior numerical performance, the LSTM model demonstrated strong capability in capturing non-linear patterns and long-term temporal dependencies. These results highlight the strategic value of LSTM networks for modeling complex dynamics in volatile markets, while ARIMAX remains effective for short-term, trend-dominated forecasting. The study provides empirical evidence for the complementary use of deep learning and traditional econometric approaches in emerging financial markets.