Modelling and forecasting castor price dynamics in Gujarat’s major APMC markets: A structural time series approach
Abstract
India is the world's leading producer and exporter of castor seed and castor oil, a non-edible industrial oilseed of growing economic importance, with Gujarat accounting for the bulk of the country's castor cultivation and trade. 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 modal castor prices across three major APMC markets in Gujarat Thara, Patan and Visnagar using monthly data spanning 2003 to 2022 obtained from the AGMARKNET portal. Among the six structural models fitted (Local Level, Local Linear Trend, Local Linear Trend with Intervention, Cycle Plus Noise, Trend Plus Cycle and Cyclic Trend), the full structural specification retaining level, slope, cycle and seasonal components 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, BIC, AICC, MSE, RMSE, MAPE and R² was employed for model evaluation and selection. MAPE values below 5% and R² ≥ 0.96 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; the cyclical component was significant in all markets, while the seasonal component was significant only in the Patan and Visnagar markets. Thara emerged as the most remunerative market (mean price ₹3,792.68/q; CV = 35.50%) with the steepest long-term slope (₹19.20/q per month). Post-sample validation for 2023 and out-of-sample projections for 2024 indicate a gradual stabilization of castor prices 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 ranks among the world's leading oilseed producers, yet domestic edible oil supply consistently falls short of demand, necessitating large imports. Among oilseeds, groundnut, mustard, sunflower and soybean serve primarily edible needs, while castor in which India leads global production and export yields oil valued for specialized industrial applications (Hamidi and Zaher, 2018) [10] . Gujarat is the country's third-largest oilseed-producing state, with castor accounting for roughly 22% of its oilseed area and a state output of 72.78 lakh tonnes in 2024-25 (Anonymous, 2025) [3] ; these crops are grown largely under rainfed conditions and traded through major APMC markets. Castor prices in Gujarat are subject to considerable volatility, driven by monsoon variability, fluctuating market arrivals, export demand and policy interventions, compounded by the low-price elasticity typical of agricultural commodities (Tomek and Robinson, 1977) [20] . Reliable price forecasts are therefore critical for farmers' sale-timing decisions, traders' market planning and policymakers' price-stabilization efforts. While the ARIMA framework remains the conventional tool for agricultural price forecasting (Brockwell and Davis, 1991) [5] , it requires the underlying series to be stationary a condition frequently violated by commodity prices marked by structural breaks and evolving trends. Structural Time Series Modeling (STSM), formulated within the state-space framework by Harvey (1996) [11] , overcomes this limitation by decomposing prices into interpretable trend, seasonal, cyclic and irregular components estimated via the Kalman filter, allowing it to adapt dynamically to market shocks without requiring stationarity. Despite castor's economic importance, STSM-based price forecasting for Gujarat's major castor markets remains largely unexplored, with prior work relying mainly on ARIMA or regression approaches (e.g., Ravichandran and Muthuraman, 2006; Ravichandran and Prajneshu, 2002) [16,17,18] . STSM has, however, demonstrated superior performance elsewhere outperforming ARIMA for trend forecasting (Andrews, 1994) [1] and lac production (Ravichandran et al., 2002) [17] and yielding strong fits for palm and soybean oil prices (Hazrana, 2017) [14] . Venkatesa et al. (2024) [21] and Jalthariya et al. (2025) [15] have separately documented cross-market differences and spatial integration in Gujarat's castor prices, while Ariyawansha et al. (2020) [4] validated STSM's residual diagnostic framework. This study addresses the resulting gap by applying STSM to forecast castor prices across Thara, Patan and Visnagar Gujarat's major castor-trading APMC markets.
Materials and Methods
Study Area and Data Source
The study focused on castor price data collected from the Agricultural Marketing Information Network (AGMARKNET) portal (https://agmarknet.gov.in), maintained by the Directorate of Marketing and Inspection, Government of India. Three major castor-trading APMC markets in Gujarat Thara, Patan and Visnagar were selected based on the highest market arrivals and data availability. These markets are located in North Gujarat, a region that accounts for a substantial share of castor cultivation in the state.
Data Period and Preparation
Daily price data were aggregated into monthly modal prices for each market. The training dataset for Thara spanned January 2006 to December 2022 (204 observations), while both Patan and Visnagar covered July 2003 to December 2022 (234 observations each). For all three markets, data from January 2023 to December 2023 (12 observations) were reserved as the testing set for model validation. Table 1 summarizes the data availability for the selected markets. Prior to model fitting, the time series data for each market were inspected for missing observations, outliers and chronological consistency. In the current 2025-26 season, castor seed prices across Gujarat's major APMCs range between ₹5,900 and ₹6,350 per quintal, with mustard at approximately ₹6,125 per quintal and groundnut at ₹7,178 per quintal, reflecting a mixed but relatively stable oilseed price environment in the state.
Structural Time Series Model Framework
A structural time series model (STSM) represents an observed price series Yₜ as the additive sum of interpretable unobserved components (Harvey, 1996) [11] :
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) [19] .
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) penalises log-likelihood by the number of hyperparameters n:
Lower AIC indicates a better-fitting, more parsimonious model.
Schwarz-Bayes Information Criterion (SBC)
SBC (Schwarz, 1978) 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.
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 overparameterised models:
It increases only when a new predictor genuinely improves model fit beyond chance expectation.
Results and Discussion Descriptive Statistics of Castor Prices
Table 2 presents the summary statistics of monthly modal castor prices for the Thara, Patan and Visnagar markets over their respective study periods. The Thara market dataset spans January 2006 to December 2022 (204 observations), with prices ranging from ₹1,384.84/q to ₹7,409.68/q, a mean of ₹3,792.68/q and a standard deviation of ₹1,346.42/q. The coefficient of variation (CV) of 35.50% indicates moderate price variability.
The Patan market covers a longer period, July 2003 to December 2022 (234 observations). Prices ranged from ₹1,396.75/q to ₹7,361.60/q, with a mean of ₹3,508.00/q, standard deviation of ₹1,446.57/q and a higher CV of 41.24%, reflecting greater price volatility than Thara. The Visnagar market, also spanning July 2003 to December 2022 (234 observations), exhibited a price range of ₹1,280.96/q to ₹7,316.41/q, mean of ₹3,516.11/q, standard deviation of ₹1,437.04/q and a CV of 40.87% comparable to Patan. No missing observations were recorded in any of the three markets. The comparative analysis of price trends across the three markets reveals both common price movements and marketspecific variations. In the early years, prices remained relatively stable with moderate fluctuations across all markets, indicating broadly similar supply-demand conditions. From approximately 2010 onwards, a gradual upward trend became evident, with a more pronounced price surge during 2019-2021, likely attributable to common regional macroeconomic and export demand factors. After reaching peak levels, prices in all three markets exhibited a slight decline toward the end of the study period. These findings are consistent with the market integration patterns documented by Jalthariya et al. (2025) [15] , who confirmed co-movement in castor prices across Gujarat's major markets alongside market-specific differences in fluctuation magnitude. Venkatesa et al. (2024) [21] similarly reported that castor price levels and variability differ across markets, corroborating the cross-market differences observed in the present study.
Box-plot analysis of the price distribution revealed notable differences in central tendency and spread across the three markets. The Thara market exhibited the highest median price with a moderate interquartile range, indicating relatively stable price realizations for producers. In contrast, Patan and Visnagar showed lower median prices with wider interquartile ranges, reflecting greater price instability. Upper-end outliers were particularly prominent in the Thara market, representing periods of acute price spikes driven by supply shortages during off-season periods, demand surges due to export requirements or processing demand and speculative trading behavior. Such irregular extreme price movements are consistent with the behavior of the irregular component in structural time series models, which captures temporary shocks and unexpected market disturbances (Commandeur and Koopman, 2007) [6] .
Goodness-of-Fit and Residual Diagnostics
Table 3 presents the likelihood-based goodness-of-fit measures and residual diagnostic statistics for the STSMs fitted to castor prices in the three markets. All models were specified with five estimated parameters and utilized all available non-missing observations. A consistent modeling framework was maintained across markets, retaining all structural components irrespective of their individual statistical significance to ensure a comprehensive representation of price dynamics (Harvey, 1996) [11] . [14] indicate superior model adequacy for castor price forecasting.
Parameter Estimation and Significance Testing
Table 4 presents the chi-square significance tests for the structural components of castor prices across the three markets, based on the final state of the estimated models. The irregular component was statistically insignificant in all three markets (χ² ≈ 0.00; p ≈ 1.000), indicating that random disturbances do not constitute a dominant driver of castor price movements. In contrast, the level component was highly significant across all markets (Thara: χ² = 311.65; Patan: χ² = 452.92; Visnagar: χ² = 451.77; all p < 0.0001), underscoring the strong influence of the underlying price level on observed prices.
The slope component was similarly significant in all three markets (Thara: χ² = 47.43; Patan: χ² = 88.41; Visnagar: χ² = 87.13; all p < 0.0001), confirming the presence of a systematic long-term upward trend in castor prices. The cycle component was statistically significant in all markets (Thara: χ² = 20.02; Patan: χ² = 28.17; Visnagar: χ² = 28.68; all p < 0.0001), implying meaningful medium-term cyclical price movements. The seasonal component exhibited market-specific behavior: it was statistically insignificant in the Thara market (χ² = 15.54; p = 0.1591) but significant in Patan (χ² = 23.30; p = 0.0160) and Visnagar (χ² = 35.57; p = 0.0002), indicating that seasonal patterns in castor prices are more pronounced in the Patan and Visnagar markets. Such market-specific differences in the significance of seasonal and other unobserved components are well-documented in the structural time series literature (Harvey and Shephard, 1993; Durbin and Koopman, 2012) [13,9] .
Trend Component Estimates
Table 4 presents the estimates and standard errors of the trend components (level and slope) for castor prices based on the final state of the fitted STSMs. The estimated level component reflects the underlying average price in each market at the end of the sample period. Among the three markets, the Thara market recorded the highest-level estimate (₹5,755.88/q), followed by Patan (₹5,707.88/q) and Visnagar (₹5,701.69/q). All three level estimates were statistically significant (p < 0.01), confirming broadly similar underlying baseline price levels across the markets with Thara exhibiting marginally better price realization.
All three markets showed positive and statistically significant slope estimates, confirming a persistent longterm upward trend in castor prices throughout the study period. The Thara market recorded a slightly higher slope estimate (19.20 ₹/q per month) compared to Patan (18.80 ₹/q per month) and Visnagar (18.68 ₹/q per month), suggesting a marginally faster rate of price increase in the Thara market. These findings indicate that castor prices across all three markets are characterized by a strong, statistically significant upward long-term trend, with only minor cross-market differences in the rate of growth.
Decomposition of Castor Prices into Structural Components
The decomposition of castor price series into trend, cyclic and seasonal components for the Thara, Patan and Visnagar markets revealed consistent patterns of price behavior across all three markets. In the Thara market, the smoothed trend exhibited a clear long-term upward movement with a more pronounced increase during the later years of the study period. The cyclic component captured medium-term fluctuations around the trend, with alternating phases of price increases and declines and noticeable cyclic activity in recent years. The combination of the smoothed trend and cycle closely tracked the observed price movements, demonstrating that these two components collectively explain a substantial proportion of overall price variation. Incorporating the seasonal component further improved the alignment of the fitted series with the actual price data, highlighting the contribution of short-term seasonal effects to castor price dynamics. In the Patan market, the smoothed trend exhibited a steady and consistent upward trajectory throughout the entire study period, reflecting sustained long-term price appreciation. Recurrent oscillations with varying amplitudes in the cyclic component indicated the presence of periodic market cycles and price adjustments. The combination of trend and cycle effectively captured major turning points in the price series, particularly during phases of sharp price escalation and subsequent correction. The inclusion of the seasonal component resulted in a closer approximation of the fitted series to the observed prices, underscoring the role of seasonality in explaining short-run price fluctuations in the Patan market. The Visnagar market demonstrated a similar pattern, with the smoothed trend indicating a persistent upward movement and noticeable acceleration in the later years. The cyclic component revealed pronounced medium-term fluctuations and their combination with the trend effectively reproduced major price turning points. Adding the seasonal component further refined the model fit. These findings collectively affirm that trend, cyclic and seasonal components jointly govern castor price dynamics across all three markets, consistent with the STSM decomposition framework of Harvey and Koopman (2000) [12] and Commandeur et al. (2011) [7] .
Model Validation and Price Forecasts
The fitted STSMs were validated using the out-of-sample testing data for January-December 2023. In the Thara market, percent forecast errors ranged from approximately 0.55% to 17.34%, with errors exceeding 10% primarily during the April-June 2023 period when actual prices declined faster than forecast. In the Patan market, forecast errors ranged from -0.25% to 17.16%, indicating generally acceptable forecasting accuracy with moderate month-tomonth deviations. For the Visnagar market, percent forecast errors ranged from 0.23% to 19.31%, reflecting satisfactory predictive performance. The forecast errors exceeding 15% observed in mid-2023 across all three markets correspond to the period of price correction following peak prices in late 2022 to early 2023, which was associated with weak export demand and increased market arrivals factors that are difficult to capture solely through historical price patterns. The out-of-sample forecasts for 2024 indicate a gradual stabilization of castor prices across the three markets. For the Thara market, prices are projected to moderate from ₹6,096.30/q in January 2024 to approximately ₹5,831.60/q by December 2024. Patan and Visnagar markets show similar trajectories, with prices expected to range between approximately ₹5,693-5,958/q and ₹5,708-5,974/q, respectively. These projections are broadly consistent with the prevailing market conditions in the 2025-26 season, in which castor prices across Gujarat APMCs are hovering between ₹5,900 and ₹6,350 per quintal. The widening confidence intervals over the forecast horizon appropriately reflect the increasing uncertainty associated with longerterm projections. Structural time series models are widely recognized for their utility in economic and commodity price forecasting due to their explicit modeling of underlying trend and seasonal dynamics within a state-space framework (Harvey, 1996; Durbin and Koopman, 2012) [11,9] .
Conclusion
The present study developed and validated Structural Time Series Models for monthly modal castor prices in three major APMC markets of Gujarat Thara, Patan and Visnagar over study periods spanning July 2003 to December 2022, revealing that all three markets exhibited a persistent, statistically significant long-term upward trend, confirmed by highly significant level and slope components across all models (p < 0.0001), with monthly price appreciation of approximately ₹18.68-₹19.20/q and Thara recording a marginally steeper rate of increase; significant cyclic components were identified in all three markets, indicating meaningful medium-term price cycles relevant to farm-level decision-making, while seasonal patterns were marketspecificsignificant in Patan and Visnagar but not in Thara underscoring the need for market-level rather than generalized regional model specification. Model goodnessof-fit was high across all markets, with MAPE below 5% and R² exceeding 0.95, outperforming previously reported values for structurally similar commodity price series, and validation forecasts for 2023 demonstrated satisfactory accuracy, with percent forecast errors remaining below approximately 20% and generally within 7-10% for most months, while out-of-sample projections for 2024 indicate gradual price stabilization across markets, with expected castor prices ranging approximately ₹5,708-₹6,096/q. These forecasts offer actionable intelligence for multiple stakeholders: farmers can use them to time the volume and timing of castor sales and input investments, traders and market intermediaries can leverage the projections for inventory planning and market strategy, and policymakers and government agencies responsible for price stabilization and MSP determination can draw on the decomposed trend, seasonal and cyclic components to design evidence-based interventions. Based on these findings, it is recommended that STSM-based price forecasting systems be integrated into agricultural market information services for real-time decision support, with future research extending the framework to incorporate exogenous covariates such as rainfall, crude oil prices and export demand indices to further improve forecasting accuracy during periods of external market shocks.
References
- Andrews DWK. The large sample correspondence between classical hypothesis tests and Bayesian posterior odds tests. Econometrica. 1994;62(6):13911414.
- Anonymous. Area, production and productivity of oilseed crops in Gujarat. Gandhinagar (India): Directorate of Agriculture, Government of Gujarat; 2024.
- Anonymous. Final estimates of area and production of principal oilseed crops (2024-25). New Delhi (India): Department of Agriculture and Farmers Welfare, Ministry of Agriculture and Farmers Welfare, Government of India; 2025.
- Ariyawansha RPC, Banneheka BMSG, Abeynayake NR, Herath HMLK. Structural time series modelling of monthly coconut price series in Sri Lanka. Sri Lanka J Appl Stat. 2020;21(1):1-20.
- Brockwell PJ, Davis RA. Time Series: Theory and Methods. 2nd ed. New York: Springer; 1991.
- Commandeur JJF, Koopman SJ. An Introduction to State Space Time Series Analysis. Oxford: Oxford University Press; 2007.
- Commandeur JJF, Koopman SJ, Zwinderman K. Statistical software for state space methods. J Stat Softw. 2011;41(1):1-18.
- Durbin J, Koopman SJ. Time Series Analysis by State Space Methods. 2nd ed. Oxford: Oxford University Press; 2012.
- Hamidi M, Zaher H. Castor oil plant (Ricinus communis L.): A review. J Pharm Pharmacol Res. 2018;2(1):1-9.
- Harvey AC. Forecasting, Structural Time Series Models and the Kalman Filter. Cambridge: Cambridge University Press; 1996.
- Harvey AC, Koopman SJ. Signal extraction and the formulation of unobserved components models. Econom J. 2000;3(1):84-107.
- Harvey AC, Shephard N. Structural time series models. In: Maddala GS, Rao CR, Vinod HD, editors. Handbook of Statistics. Vol. 11. Econometrics. Amsterdam: Elsevier; 1993. p. 261-302.
- Hazrana J. Price forecasting for edible oils in India using structural time series models [doctoral dissertation]. New Delhi (India): ICAR-Indian Agricultural Statistics Research Institute; 2017.
- Jalthariya M, Shah P, Patel R. Market integration and price transmission of castor in Gujarat. Indian J Agric Econ. 2025;80(1):45-60.
- Ravichandran S, Muthuraman K. Structural time series model for trend and forecasting India's rice production. J Indian Soc Agric Stat. 2006;60(1):23-30.
- Ravichandran S, Prajneshu. Efficient forecasting techniques for Indian foodgrain production. J Indian Soc Agric Stat. 2002;55(2):169-178.
- Ravichandran S, Prajneshu, Goyal AK. Structural time series models with cyclic fluctuations for all-India lac forecasting. J Indian Soc Agric Stat. 2002;55(3):275283.
- Shumway RH, Stoffer DS. Time Series Analysis and Its Applications. New York: Springer; 2000.
- Minneapolis: University of Minnesota Press; 1977. p. 331-409.
- Venkatesa P, Ramesh A, Kumar S. Price behaviour and variability of castor across major markets in India. Agric Econ Res Rev. 2024;37(1):55-66.
How this paper connects to the literature. Drag to explore, click any node to open that paper.
