🤖 AI Summary
This study addresses the challenge of accurately forecasting daily log returns of the Nepal Stock Exchange (NEPSE) index in a high-noise, nonlinear emerging market context. To this end, it proposes a time series prediction framework based on XGBoost that integrates lagged returns and technical indicators—such as the Relative Strength Index (RSI) and rolling volatility. The methodology employs an expanding-window forward-rolling validation scheme combined with temporal cross-validation to mitigate look-ahead bias, alongside Optuna for hyperparameter optimization. Empirical results demonstrate that the optimal configuration, featuring 20 lags and an expanding window, achieves a test-set RMSE of 0.013450, MAE of 0.009814, and directional accuracy of 65.15%, significantly outperforming ARIMA and Ridge regression baselines. This work thus offers a reproducible and robust solution for financial time series forecasting in emerging markets.
📝 Abstract
This study develops a robust machine learning framework for one-step-ahead forecasting of daily log-returns in the Nepal Stock Exchange (NEPSE) Index using the XGBoost regressor. A comprehensive feature set is engineered, including lagged log-returns (up to 30 days) and established technical indicators such as short- and medium-term rolling volatility measures and the 14-period Relative Strength Index. Hyperparameter optimization is performed using Optuna with time-series cross-validation on the initial training segment. Out-of-sample performance is rigorously assessed via walk-forward validation under both expanding and fixed-length rolling window schemes across multiple lag configurations, simulating real-world deployment and avoiding lookahead bias. Predictive accuracy is evaluated using root mean squared error, mean absolute error, coefficient of determination (R-squared), and directional accuracy on both log-returns and reconstructed closing prices. Empirical results show that the optimal configuration, an expanding window with 20 lags, outperforms tuned ARIMA and Ridge regression benchmarks, achieving the lowest log-return RMSE (0.013450) and MAE (0.009814) alongside a directional accuracy of 65.15%. While the R-squared remains modest, consistent with the noisy nature of financial returns, primary emphasis is placed on relative error reduction and directional prediction. Feature importance analysis and visual inspection further enhance interpretability. These findings demonstrate the effectiveness of gradient boosting ensembles in modeling nonlinear dynamics in volatile emerging market time series and establish a reproducible benchmark for NEPSE Index forecasting.