用XGBoost预测尼泊尔股市日对数收益率,表现优于传统模型。
XGBoost Forecasting of NEPSE Index Log Returns with Walk Forward Validation
- 基于滞后收益和技术指标构建特征,用Optuna优化超参数。
- 20阶滞后+扩展窗口配置下,误差最低(RMSE 0.01345,MAE 0.00981)。
- 模型可解释性强,适合金融时间序列建模与新兴市场研究者参考。
本研究构建了一个稳健的机器学习框架,使用XGBoost回归器对尼泊尔股票交易所(NEPSE)指数的一日对数收益率进行一步预测。工程化设计了包含最多30天滞后对数收益率及滚动波动率、14期相对强弱指数等技术指标的综合特征集。通过Optuna结合时间序列交叉验证在初始训练段进行超参数优化。采用展开与固定长度滚动窗口方案,通过走查验证法严格评估样本外性能,模拟真实部署并避免前瞻偏差。使用均方根误差、平均绝对误差、决定系数(R-squared)及对数收益率与重构收盘价的方向准确性评估预测效果。实证结果显示,最优配置(扩展窗口,20个滞后)显著优于调参后的ARIMA与岭回归基准模型,实现最低对数收益率RMSE(0.013450)和MAE(0.009814),方向准确率达65.15%。尽管R-squared值较低,符合金融收益的高噪声特性,但重点在于相对误差降低与方向预测能力。特征重要性分析与可视化进一步增强可解释性。结果表明梯度提升集成方法能有效捕捉波动性新兴市场时间序列中的非线性动态,并为NEPSE指数预测建立可复现基准。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。