这篇论文用XGBoost和LightGBM预测斯里兰卡蔬菜价格,统一模型在极端通胀期也能保持近86%准确率,对农民和决策者很有参考价值。
斯里兰卡蔬菜市场因进口隔离导致供应中断时价格剧烈波动。研究者构建了结合零售价、农民价、天气变量、柴油成本和汇率的融合数据集,覆盖12种蔬菜、14个市场、2013-2019年数据。使用XGBoost和LightGBM梯度提升集成模型,经Optuna优化,比较统一模型和季节特定模型。季节特定模型中Yala季模型R2最高达0.9420,统一模型总体准确率90.84%、R2为0.9281。在完全未见过的2024年恶性通胀期,统一模型无需重新训练仍保持85.96%准确率,成功追踪价格飙升。
When Prices Double in a Week: Forecasting of Agricultural Volatility in Import-Isolated Markets
Vegetable prices in Sri Lanka are highly volatile because the market is largely import-isolated, so supply disruptions quickly drive prices up. This study develops a machine learning framework to forecast such volatility by incorporating supply-chain-aware features and explicitly modelling the country's two cultivation seasons, Maha (October-April) and Yala (May-September). An integrated dataset was constructed by combining retail and farmer-gate prices with origin-aligned weather variables, diesel costs, and exchange rates across 12 vegetable varieties and 14 market centres from 2013 to 2019. A gradient-boosted ensemble model (XGBoost and LightGBM) was trained and optimised using Optuna, and unified and season-specific configurations were compared. Results show that season-specific models improve within-season fit, with the Yala-specific model achieving the highest R2 of 0.9420 (95% CI [0.690, 1.000]), while the unified model delivers the best overall predictive accuracy of 90.84% (95% CI [88.34%, 91.52%]) and an R2 of 0.9281 (95% CI [0.760, 1.000]). Notably, the unified model maintains 85.96% accuracy on a completely unseen 2024 hyperinflationary period without retraining, successfully tracking major price surges. These findings suggest that agricultural price movements in import-constrained markets are meaningfully predictable when models capture supply-chain dynamics, offering practical value for early warning and decision making by farmers, traders, and policymakers. Existing studies on Sri Lankan vegetable prices are confined to Autoregressive Integrated Moving Average (ARIMA) and Generalized Autoregressive Conditional Heteroskedasticity (GARCH) applied to single markets, with no supply-chain features, seasonal segmentation, or cross-regime validation.