🤖 AI Summary
This study addresses the severe volatility in vegetable prices in Sri Lanka, driven by import restrictions and the urgent need for accurate forecasting to inform policy. The authors propose a machine learning framework that integrates multi-source data—including retail and farmgate prices, weather variables, diesel costs, and exchange rates—while explicitly incorporating supply chain characteristics and the bimodal cultivation cycles (Maha and Yala). Leveraging an ensemble of XGBoost and LightGBM models with hyperparameter optimization via Optuna, the approach introduces supply-chain-aware features and season-specific modeling. Evaluated through cross-temporal validation, the framework achieves strong predictive performance under both unified and season-specific configurations, yielding an overall R² of 0.9281 (90.84% accuracy) and maintaining 85.96% accuracy during the unprecedented inflationary period of 2024, significantly outperforming conventional single-market models such as ARIMA and GARCH.
📝 Abstract
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.