Forecasting NEPSE prices with LSTMs
Recurrent sequence modeling using Long Short-Term Memory (LSTM) networks applied to daily closing index data on the Nepal Stock Exchange.
- Model
- LSTM over windowed price history
- Data
- NEPSE daily closing prices
- Evaluated
- RMSE against observed trends
- Tools
- Python, Keras, Pandas
Market Context & Dataset
The Nepal Stock Exchange (NEPSE) is an emerging equity market characterized by low liquidity, concentrated sector capitalization, and non-stationary trading volume. Historical daily closing prices and volume metrics were compiled, normalized, and transformed into sliding lookback windows.
Model Architecture
An LSTM recurrent network was implemented in Python using Keras and Pandas. Input features included sequence-windowed closing prices, simple and exponential moving averages, and normalized volatility indicators. The network was trained using Mean Squared Error loss and evaluated across out-of-sample test splits.
Evaluation & Baseline Analysis
While the model achieved a low test Root Mean Squared Error (RMSE) that visually appeared to track market trends, benchmarking against a naive persistence baseline (predicting price(t) = price(t-1)) demonstrated that the LSTM was predominantly learning a one-step delayed identity mapping.
This analysis demonstrated that standard regression metrics on autocorrelated time series can be misleading without strict benchmark comparisons and directional change accuracy metrics.