Forecasting Tandur redgram wholesale prices using extreme gradient boosting with weather inputs: A comparison with ARIMA and holt-winters models
Abstract
Redgram (Cajanus cajan L.) is a major pulse crop in semi‑arid Telangana and Tandur is an important wholesale market for farmers and traders. Accurate short‑term forecasts of Tandur redgram prices are essential for planning procurement, storage and hedging decisions under highly variable monsoon conditions. This study compares classical time series and machine learning approaches for forecasting monthly wholesale prices of Tandur redgram using 114 observations on market prices and local weather variables such as rainfall, relative humidity, maximum temperature and minimum temperature. Stationarity diagnostics based on Augmented Dickey Fuller and KPSS tests indicate that the price series is integrated of order one, while the weather variables are stationary in levels. Accordingly, a drifted ARIMA (0,1,1) model, a Holt-Winters additive seasonal exponential smoothing model and two Extreme Gradient Boosting (XGB) models are estimated: one using twelve lagged prices only and another combining lagged prices with contemporaneous weather covariates. Model adequacy is assessed through residual diagnostics, Box-Ljung portmanteau statistics and normality tests, and forecast accuracy is evaluated on a twelve-month hold‑out sample using root mean square error (RMSE) and mean absolute percentage error (MAPE). The weather‑augmented XGB model achieves the lowest test RMSE (409.69 Rs/quintal) and MAPE (4.55%), outperforming XGB with lagged prices only, Holt-Winters and ARIMA, which all produce substantially larger forecast errors. The results demonstrate that integrating weather covariates into gradient boosting time‑series models significantly improves short‑term price forecasts for Tandur redgram and can support more informed marketing, procurement and risk‑management strategies in the pulse sector. These findings also highlight the potential of combining routine market data with agro‑meteorological records to build operational decision‑support tools for stakeholders locally.
Full Text
Tables and figures are in the full-text PDF.
Introduction
Agricultural commodity prices play a pivotal role in farm income, food security and rural livelihoods. They reflect the combined influence of weather shocks, production variability, input costs, market infrastructure and policy interventions. Price volatility in staples and pulses can quickly translate into income instability for farmers and welfare losses for consumers, especially in developing economies. Reliable price forecasting therefore becomes essential for planning procurement, storage, trade. Redgram (Cajanus cajan L.), popularly known as pigeonpea, is an important pulse crop that provides affordable protein to rural and urban households and contributes significantly to farm income in semi-arid regions of India. Tandur, located in the Vikarabad district of Telangana, is one of the key regulated markets for redgram, and Tandur redgram is widely recognised for its quality and regional price-setting role. Price movements in this market influence procurement decisions of millers, traders and public agencies and indirectly determine the returns realised by farmers in surrounding mandals. Like other pulses, Tandur redgram prices are highly sensitive to weather-induced production shocks. Deficient or erratic monsoon rainfall, heat stress during flowering and pod formation, and unseasonal rains at harvest can substantially depress yields and affect grain quality. These shocks translate into volatile market arrivals, stock adjustments and speculative behaviour, thereby amplifying price variability. Bhanumurthy et al., 2013 [2] , have shown that weather shocks in India can influence agricultural commodity prices through both supply and expectations channels, underlining the need to integrate meteorological information into price analysis and forecasting. Time series models such as autoregressive integrated moving average (ARIMA) and exponential smoothing have long been used to forecast agricultural prices because they capture trend and seasonal patterns with relatively modest data requirements. Box and Jenkins, 1995 [4] , formalised ARIMA modelling as a systematic procedure involving identification, estimation and diagnostic checking and subsequent work by De Gooijer and Hyndman, 2006 [5] , reviewed 25 years of forecasting experience, highlighting the strengths and limitations of classical linear models. In the Indian context, ARIMA has been widely applied to prices of cereals, oilseeds and pulses, including studies that obtained reasonably accurate short-term forecasts for selected crops. However, these models are typically univariate and do not directly accommodate nonlinear effects of exogenous variables such as rainfall, relative humidity and temperature. Recent advances in machine learning have opened up new possibilities for agricultural price forecasting. Ensemble algorithms such as Extreme Gradient Boosting (XGBoost) construct powerful predictive models by sequentially fitting regression trees to residuals, with regularisation to control overfitting. Nguyen et al., 2021 [9] , demonstrated the effectiveness of XGB in hydrological prediction, while Mishra et al., 2024 [8] , applied XGB to rainfall pattern modelling in India. For commodity markets, Sahid et al., 2024 [10] , showed that hybrid simple moving average-XGB methods enhance wheat price forecasts, Zhao et al., 2025 [11] , proposed a TCN-XGB hybrid for vegetable prices and Lestari et al., 2025 [7] , used ensemble models for agricultural commodity price forecasting. These studies collectively indicate that gradient boosting can exploit both autoregressive structure and external covariates such as weather. Despite these developments, there is limited published work on weather-linked machine learning models for Tandur redgram prices. Existing Indian studies on ARIMA price forecasting generally treat weather implicitly through its effect on production and arrivals and seldom include local meteorological variables as explicit predictors. Given the availability of long-term time series on Tandur prices and weather data, there is a clear opportunity to examine integration of weather information within XGB frameworks can improve forecast accuracy over classical models.
The present study addresses this gap by: • Characterising the temporal behaviour of Tandur redgram prices and associated weather variables using descriptive statistics, correlation analysis and decomposition techniques.
Materials and Methods
Data description
Exploratory Data Analysis
Exploratory data analysis was carried out to understand Tandur redgram price behaviour and its relationship with local weather. Monthly time-series plots for price, rainfall, relative humidity and temperature were inspected to identify trends, seasonality and extreme events. A multiplicative decomposition of the price series separated long-run trend, seasonal and irregular components, while boxplots by month highlighted systematic intra-year variation in prices. Histograms with density curves showed right-skewness and occasional spikes. Descriptive statistics and a correlation matrix summarised central tendency, dispersion and linear associations between variables, providing a quantitative basis for subsequent stationarity testing and model selection.
Model specifications ARIMA model
The Autoregressive Integrated Moving Average (ARIMA) model, introduced by Box and Jenkins, 1995 [4] , is a cornerstone method for time-series analysis and forecasting. It captures the dependence structure in a series by combining three elements: an autoregressive (AR) part, an integration (I) or differencing part and a moving average (MA) part. Because ARIMA is built on the assumption of stationarity, it is applied to series whose mean, variance and autocorrelation remain stable over time, often after suitable differencing (Jadhav et al., 2017) [6] . Following Box-Jenkins methodology, the differenced price series was analysed using ACF and PACF plots, which supported a moving-average specification with order one. The selected model is a drifted ARIMA (0,1,1):
Here 𝑦 𝑡 denotes the Tandur price at time 𝑡, 𝐵 is the backshift operator, 𝑐 is the drift parameter and 𝜀 𝑡 is white-noise error. For both models, evaluation logs show monotonic reduction in test RMSE during early rounds followed by stabilisation; early stopping prevents overfitting as suggested in related literature on hybrid XGB approaches for commodity prices (Sahid et al., 2024; Zhao et al., 2025) [10,11] .
Holt-Winters additive seasonal model
Forecast accuracy and residual diagnostics
Forecast accuracy was assessed using RMSE and MAPE:
These metrics were computed separately for training and test samples for each model. Among competing models, the one with the lowest RMSE and MAPE is preferred, as it minimises both average squared error and percentage deviation from observed prices.
Results
Behaviour of Tandur redgram price and weather series
Descriptive statistics
Descriptive statistics for each variable are summarised in
Correlation analysis
The Pearson correlation matrix between prices and weather variables is presented in Table 2. Tandur price shows relatively weak linear correlation with rainfall, relative humidity, maximum temperature and minimum temperature, suggesting that weather effects on price are likely nonlinear or mediated through production and arrivals rather than simple contemporaneous linear relationships. Rainfall is strongly correlated with relative humidity and minimum temperature, while relative humidity is strongly negatively correlated with maximum temperature, reflecting the underlying agro-climatic regime. Both XGB models track the overall level of prices reasonably well, with XGB (price lags + weather) generally closer to actual values illustrated in figure 3, especially in months showing local turning points (table 4). Holt-Winters forecasts are smoother and often lag large price changes, leading to under-prediction in months following spikes and over-prediction after dips. The ARIMA model generates almost constant forecasts, reflecting the estimated drift and moving-average structure. This inability to adjust quickly to recent price changes explains its relatively poor test-set performance.
Discussion
The comparative analysis of ARIMA, Holt-Winters and XGB models for Tandur redgram prices underscores several important points. First, classical linear time-series models, though easy to implement and widely understood, are limited when faced with complex dynamics involving structural breaks, nonlinear responses and interactions between prices and exogenous variables. The nearly constant ARIMA forecasts during the test period and the smooth, lagging Holt-Winters forecasts illustrate these limitations. Second, the strong performance of the XGB (price lags + weather), with the lowest test RMSE and MAPE, confirms findings from other agricultural studies that gradient boosting methods can exploit rich feature spaces, including lagged series and weather covariates, to yield more accurate predictions. The gain over XGB (price only) shows that weather variables provide additional predictive information beyond price history, despite weak simple correlations. In particular, extreme rainfall events and anomalous temperature and humidity conditions may signal future supply shocks and influence expectations, which XGB can capture through tree splits and interactions. Third, residual diagnostics reveal that classical models leave significant autocorrelation and non-normality in errors, whereas XGB models absorb most serial dependence, leaving residuals closer to white noise. This aligns with the broader literature arguing that more flexible models are needed when data exhibit nonlinear features, regime changes or complex interactions. From a practical standpoint, the XGB (price lags + weather) model provides stakeholders in the Tandur redgram value chain with a useful tool for short-term price forecasting. By updating the model monthly as new data arrive, market committees, millers and policy makers can obtain probabilistic forecasts that account for current weather conditions. Such forecasts can inform decisions on procurement timing, storage and hedging strategies, potentially improving price stabilisation efforts and farmer incomes.
Conclusion
This study has developed and compared ARIMA, Holt-Winters additive and Extreme Gradient Boosting models for forecasting monthly wholesale prices of Tandur redgram, explicitly incorporating local weather variables. Using 114 months of price and meteorological data, we showed that Tandur prices are non-stationary in levels but become stationary after first differencing, supporting ARIMA (0,1,1) with drift as a classical benchmark. However, out-of-sample evaluation over a twelve-month test period revealed that ARIMA and Holt-Winters models produce relatively large forecast errors and leave substantial residual autocorrelation and non-normality.
In contrast, the XGB (price lags + weather) model, combining twelve lagged prices with rainfall, relative humidity, maximum temperature and minimum temperature, yields the lowest test RMSE and MAPE among all models and passes key residual diagnostics. This demonstrates the value of integrating weather information into gradient boosting frameworks for price forecasting in weather-sensitive pulse markets such as Tandur.
The findings complement existing evidence on hybrid and ensemble approaches for agricultural commodity price prediction and suggest that similar methodologies can be extended to other markets and crops. Future work may explore hybrid models that combine ARIMA or Holt-Winters with XGB, incorporate additional predictors such as policy variables and evaluate the economic value of improved forecasts through simulation of farmer and trader decisions. Moreover, investigating multi-step-ahead forecasting horizons and probabilistic forecast bands could further enhance the operational usefulness of weather-linked machine learning models for Tandur redgram and the wider pulse sector.
Acknowledgement
AcknowledgementThe authors acknowledge Professor Jayashankar Telangana State Agricultural University and ICAR-National Academy of Agricultural Research Management, Hyderabad, for institutional support and access to data.
References
- Amazirh A, Chehbouni A, Kreiner A, Adeniyi OD, Zeleke GA, Bouras EH, et al. Seasonal field scale wheat yield forecasting using XGBoost with radar, optical, and weather data in Morocco. Int J Appl Earth Obs Geoinf. 2026;149:105242.
- Bhanumurthy N, Dua P, Kumawat L. Weather shocks and agricultural commodity prices in India. Clim Change Econ. 2013;4(3).
- Billah B, King ML, Snyder RD, Koehler AB. Exponential smoothing model selection for forecasting. Int J Forecast. 2006;22(2):239-247.
- Box GEP, Jenkins GM. Time series analysis, forecasting, and control. Technometrics. 1995.
- De Gooijer JG, Hyndman RJ. Twenty-five years of time series forecasting. Int J Forecast. 2006;22(4):443-473.
- Jadhav V, Reddy BVC, Gaddi GM. Application of ARIMA model for forecasting agricultural prices. J Agric Sci Technol. 2017;19(5):981-992.
- Lestari DR, Bangun EAS, Gaol FL, Matsuo T. Machine learning based forecasting of agricultural commodity prices using ensemble models. J Hum Earth Future. 2025;6(4):887899.
- Mishra P, Al Khatib AMG, Yadav S, Ray S, Lama A, Kumari B, et al. Modelling and forecasting rainfall patterns in India: A time series analysis with XGBoost algorithm. Environ Earth Sci. 2024;83(6):163.
- Nguyen DH, Le XH, Heo JY, Bae DH. Development of an extreme gradient boosting model integrated with evolutionary algorithms for hourly water level prediction. IEEE Access. 2021;9:125853-125867.
- Sahid M, Ramdhani M, Darmawan G. A hybrid simple moving average and XGBoost approach for enhanced wheat commodity price forecasting. Acadlore Trans Appl Math Stat. 2024;2(4):238-251.
- Zhao T, Chen G, Suraphee S, Phoophiwfa T, Busababodhin P. A hybrid TCN-XGBoost model for agricultural product market price forecasting. PLoS One. 2025;20(5):e0322496.
Funding
- Indian Council of Agricultural Research
How this paper connects to the literature. Drag to explore, click any node to open that paper.
