Structural time series modelling and price forecasting for groundnut in major APMC markets of Gujarat, India
Abstract
Accurate forecasting of agricultural commodity prices is essential for informed decision-making by farmers, traders and policymakers. This study applies Structural Time Series Modelling (STSM) via state-space representation to analyse and forecast monthly groundnut prices across three major APMC markets in Gujarat Gondal, Rajkot and Deesa using monthly data spanning 2001 to 2023 obtained from the AGMARKNET portal. The Local Linear Trend Model with stochastic cyclical and seasonal components (TCM framework) provided the best fit across all markets, with hyperparameters estimated by the Kalman filter through prediction error decomposition. A comprehensive suite of goodness-of-fit criteria including AIC, SBC, AICC, MSE, RMSE, MAE, MAPE and R² was employed for model evaluation and selection. MAPE values below 7% and R² ≥ 0.86 confirmed adequate model fit in all markets. Significance tests revealed highly significant level and slope components (p< 0.0001) in all three markets confirming a persistent secular upward price trend; seasonal components were universally significant; cyclical effects were significant only in the Gondal market. Deesa emerged as the most remunerative market (mean price ₹4391.70/q; CV = 23.46%) with the steepest long-term slope (₹20.67/q per month). Post-sample validation and out-of-sample projections for 2024 indicate continued price appreciation in all three markets. Findings offer actionable guidance for marketing decisions, procurement planning and agricultural price policy in Gujarat's oilseed sector.
Full Text
Tables and figures are in the full-text PDF.
Introduction
India is the world's largest producer of oilseeds. The oilseed sector ranks second only to food grains in cultivated area, production volume and economic value. India is simultaneously the world's largest consumer of edible oils and the leading importer primarily from Malaysia and Indonesia and ranks fourth globally in oilseed production after Brazil, Argentina and China. Edible oilseed crops (groundnut, mustard, sunflower, soybean) and industrial non-edible oilseed crops (castor) together constitute a strategically critical segment of Indian agriculture. Gujarat is a leading oilseed-producing state in India. Five oilseed crops groundnut (59%), castor (22%), sesamum (6%), mustard (8%) and soybean (5%) together account for over 85% of the state's total oilseed area. Gujarat ranked third nationally with a production of 72.78 lakh tonnes in 2019-20 (Anon., 2024, 2025) [4] . Agricultural commodity prices are inherently volatile, driven by seasonal supply variations, low demand-price elasticities and sensitivity to weather events and policy interventions. Reliable price forecasts are vital for farmers planning sales timing, traders making hedging decisions, and policymakers calibrating minimum support prices (MSP) and import tariffs. Classical ARIMA modelling requires stationarity and cannot decompose a series into interpretable structural components. Structural Time Series Modelling (STSM), developed by Harvey (1989, 1996), overcomes these limitations by decomposing price series into stochastically evolving trend, seasonal, cyclical and irregular components within a state-space framework estimated via the Kalman filter.
STSM is superior to ARIMA for agricultural price forecasting (Andrews, 1994; Ravichandran and Prajneshu, 2002; Ariyawansha et al., 2020) [3,11,5] . Despite these advantages, applications of STSM to Indian oilseed price forecasting remain limited. The present study therefore applies STSM to forecast monthly groundnut prices in the Gondal, Rajkot and Deesa markets of Gujarat, with two objectives: (i) to develop the best-fitting STSM for groundnut prices using a comprehensive goodness-of-fit assessment; and (ii) to generate validated out-of-sample forecasts.
Materials and Methods
Selection of Crops and Markets
Monthly modal price data for oilseed crops grown in Gujarat were collected from the Agricultural Marketing Information Network portal (AGMARKNET; https://agmarknet.gov.in). Three oilseed crops groundnut was selected based on their percent share of total oilseed area in Gujarat over the last decade. For each crop, markets were selected on the basis of highest arrival volumes and longest continuous data availability, as summarised in Table 1. For the present paper, analysis focuses on groundnut. Data were partitioned into an estimation set (up to December 2022) and a post-sample validation set (January-December 2023). where Tₜ is the trend, Sₜ the seasonal, Cₜ the cyclical component, and εₜ ~ i.i.d. N (0, σ²ε) the irregular disturbance. All components evolve stochastically and are estimated simultaneously in state-space form via the Kalman filter. Hyperparameters (component variances) are obtained by maximum likelihood via prediction error decomposition (Shumway and Stoffer, 2000; De Jong, 1988) [15,7] .
Goodness-of-Fit Criteria
Model selection and evaluation employed a comprehensive suite of eight criteria drawn from the thesis methodology When models have equal numbers of hyperparameters, Prediction Error Variance (PEV) is used; otherwise, information criteria are preferred.
Akaike Information Criterion (AIC)
AIC (Akaike, 1974) [2] penalises log-likelihood by the number of hyperparameters n:
Lower AIC indicates a better-fitting, more parsimonious model. (Schwarz, 1978) [13] applies a stronger penalty for n, scaled by sample size T: SEB = -2Log c + n Log c T SBC is more conservative than AIC and is preferred for larger samples.
Schwarz-Bayes Information Criterion (SBC): SBC
Mean Absolute Percentage Error (MAPE)
MAPE measures the average percentage deviation from actual values, enabling scale-free comparisons across markets and time periods:
A MAPE below 10% is generally considered commercially acceptable for agricultural price forecasting.
Coefficient of Determination (R²)
R² quantifies the proportion of total variance in the price series explained by the fitted model:
where ESS is the Error Sum of Squares and TSS is the Total Sum of Squares. Values closer to 1 indicate a better fit.
Adjusted R²
Adjusted R² accounts for the number of explanatory variables p and total observations N, penalising over-parameterised models:
It increases only when a new predictor genuinely improves model fit beyond chance expectation.
Results and Discussion
Descriptive Statistics
Table 2 presents summary statistics of monthly groundnut prices across the three markets. Deesa recorded the highest mean price (₹4391.70/q) coupled with the lowest coefficient of variation (CV = 23.46%), reflecting a more stable and remunerative market environment. Gondal exhibited the greatest price volatility (CV = 39.83%), while Rajkot showed an intermediate CV of 37.38%. All three markets displayed an unambiguous long-term upward price trend, consistent with Vekariya et al. (2020) [16] and Darekar and Reddy (2017) [6] . Differences in price variability reflect localised supplydemand dynamics, market infrastructure and proximity to major consumption centres (Acharya et al., 2012) [1] . [14] for a comparable SAS-based STSM study (AIC = 5314.22), demonstrating markedly improved model parsimony. RMSE values (247-344 ₹/q) are well within the price range, confirming adequate in-sample fit across all markets.
Significance Tests of Structural Components
Table 4 presents chi-square significance tests for each structural component based on the final state of the fitted model. The irregular component was statistically insignificant in all markets (p> 0.99), confirming that random shocks contribute negligibly to groundnut price dynamics. The level and slope were highly significant (p< 0.0001) in all three markets, underscoring the primacy of the long-term trend in governing price behaviour. The seasonal component was significant in Gondal (p< 0.0001), Rajkot (p< 0.0001) and Deesa (p = 0.0014), reflecting pronounced harvest-linked price seasonality. The cyclical component was statistically significant only in Gondal (p = 0.0084) and insignificant in Rajkot and Deesa, a finding consistent with Gondal's longer price history and greater market depth sustaining mediumterm price cycles.
Trend Component Estimates
Table 5 presents the final-state level and slope estimates from the fitted STSM for each market. Gondal recorded the highest-level estimate (₹6213.14/q), followed by Deesa (₹6066.87/q) and Rajkot (₹5596.36/q). All slope estimates were positive and highly significant at the 1% level (p< 0.01), confirming a persistent secular upward trend in groundnut prices in all three markets. Deesa exhibited the steepest slope (₹20.67/q per month; t = 3.93), indicating the fastest longterm price appreciation, while Rajkot's slope (₹16.95/q per month; t = 8.03) was the most precisely estimated, reflecting the lowest relative standard error.
Market Performance Comparison
Table 6 consolidates key market performance indicators across all three markets. Deesa stands out as the most remunerative market (highest mean price, lowest CV, steepest slope), but shows slightly weaker short-term predictability (MAPE = 6.08%, R² = 0.86). Rajkot offers the best forecasting precision (MAPE = 4.57%, R² = 0.96) and is the most suitable market for price-based analytical decision models. Gondal presents intermediate characteristics across all indicators, with the highest price variability among the three. [9,11] .
Post-Sample Validation and 2024 Price Outlook
Post-sample validation for January-December 2023 showed that forecast errors ranged from -2.93% to -13.25% in Gondal, -8.76% to -19.19% in Rajkot, and -6.93% to +5.83% in Deesa. The predominantly negative errors reflect a systematic tendency of the model to underestimate the post-pandemic price surge common across all agricultural commodities. Despite this directional bias, all forecast errors remained within the commercially acceptable range for agricultural price forecasting. Out-of-sample projections for January-December 2024 indicate sustained upward price movements: Gondal averaging approximately ₹6700/q, Rajkot approximately ₹5955/q and Deesa approximately ₹6620/q, with widening 95% confidence intervals over the forecast horizon as expected from the theoretical properties of STSM (Durbin and Koopman, 2012; Koopman and Harvey, 2003) [8,9] .
Conclusion
This study applied Structural Time Series Modelling (STSM) within a state-space framework to analyse and forecast monthly groundnut prices in the Gondal, Rajkot and Deesa markets of Gujarat. Based on a comprehensive evaluation using eight goodness-of-fit criteria (AIC, SBC, AICC, MSE, RMSE, MAE, MAPE and R²), Deesa emerged as the most stable and remunerative market with the highest mean price (₹4391.70/q) and lowest coefficient of variation (23.46%), whereas Gondal and Rajkot exhibited greater price volatility. Among the competing models, the Trend-Cycle Model (TCM), incorporating local linear trend, seasonal and cyclical components, consistently provided the best fit across all markets, highlighting the importance of capturing both trend and cyclical behaviour in oilseed price series. Forecast accuracy was satisfactory for all models (MAPE < 7% and R² ≥ 0.86), with Rajkot showing the highest predictability (MAPE = 4.57%; R² = 0.96). The level and slope components were highly significant (p< 0.0001) across markets, indicating a persistent upward price trend, while seasonal effects were significant in all markets and cyclical effects were significant only in Gondal, reflecting its greater market depth. Deesa recorded the highest long-term rate of price increase (₹20.67/q/month; t = 3.93, p< 0.01), and all slope estimates were significant at the 1% level. Out-of-sample forecasts for 2024 projected continued price appreciation in Gondal (₹6700/q), Rajkot (₹5955/q) and Deesa (₹6620/q), with widening confidence intervals over time. The findings demonstrate that STSM can provide valuable decision support for farmers, traders and policymakers by improving harvesttiming decisions, inter-market price arbitrage strategies and policy interventions such as MSP announcements and import duty adjustments. Future research may extend the framework by incorporating explanatory variables such as rainfall, crude oil prices and exchange rates.
References
- Acharya SS, Agarwal NL, Dileep Kumar M. Agricultural Marketing in India. New Delhi: Oxford & IBH Publishing Co. Pvt. Ltd.; 2012.
- Akaike H. A new look at the statistical model identification. IEEE Transactions on Automatic Control. 1974;19(6):716-723.
- Andrews DWK. The large sample correspondence between classical hypothesis tests and Bayesian posterior odds tests. Econometrica. 1994;62(6):1207-1232.
- Anonymous. Present status of oilseed crops and vegetable oils in India. 2024. https://dag.gujarat.gov.in
- Ariyawansha RTK, Balamurali N, Karunagoda K, Pitigala BPIK. Forecasting of sugarcane production in Sri Lanka using structural time series models. Sri Lanka Journal of Food and Agriculture. 2020;6(1):1-10.
- Darekar AS, Reddy AA. Forecasting of common groundnut prices in India. Oilseeds and Fats, Crops and Lipids. 2017;24(1):D102.
- De Jong P. The likelihood for a state-space model. Biometrika. 1988;75(1):165-169.
- Durbin J, Koopman SJ. Time Series Analysis by State Space Methods. 2nd ed. Oxford: Oxford University Press; 2012.
- Harvey AC, Trimbur TM. General model-based filters for extracting trends and cycles in economic time series. The Review of Economics and Statistics. 2003;85(2):244-255.
- Koopman SJ, Harvey AC. Computing observation weights for signal extraction and filtering. Journal of Economic Dynamics and Control. 2003;27(7):1317-1333.
- Ravichandran S, Prajneshu. Structural time series modelling and forecasting of foodgrain production in India. Journal of the Indian Society of Agricultural Statistics. 2002;55(1):35-48.
- Ravichandran S, Prajneshu, Venugopalan R. Structural time series model for cyclical fluctuations in lac production in India. Biometrical Journal. 2002;44(4):493504.
- Schwarz G. Estimating the dimension of a model. Annals of Statistics. 1978;6(2):461-464.
- Selukar R. Using state space methods in SAS for time series analysis. SAS Global Forum 2009. 2009;Paper 269.
- Shumway RH, Stoffer DS. Time Series Analysis and Its Applications. New York: Springer-Verlag; 2000.
- Vekariya PB, Patel AR, Patel GN. Price behaviour analysis of groundnut in major APMC markets of Gujarat. Journal of Pharmacognosy and Phytochemistry. 2020;9(1):1247-1252.
How this paper connects to the literature. Drag to explore, click any node to open that paper.
