Comparative evaluation of ARIMA and machine learning models for paddy price forecasting in Gujarat
Abstract
Paddy (Oryza sativa L.) is the most critical staple food crop in India, with production of 150,180 thousand tonnes from 51,270 thousand hectares at a yield of 2,929 kg/ha during 2024-25. Price volatility of paddy is driven by seasonal supply cycles, weather-induced yield shocks, government procurement policies and macroeconomic forces, making reliable price forecasting essential for farmers, traders and policymakers. This study applied statistical and machine learning techniques to forecast weekly paddy prices in two major Gujarat markets Khambhat (2009-2023) and Dahod (2002-2023) sourced from the Agmarknet portal. Four models were developed and compared: ARIMA, ANN, RNN and a Hybrid (ARIMA-ANN) model. Stationarity was confirmed using the Augmented Dickey-Fuller (ADF) test after first-order differencing, and nonlinearity was verified using the Brock-Dechert-Scheinkman (BDS) test. ARIMA (1,1,2) with drift was selected for Khambhat and ARIMA (0,1,1) without drift for Dahod. ANN achieved MAPE of 5.09% (Khambhat) and 2.74% (Dahod), outperforming ARIMA significantly. The RNN model recorded the best performance with MAPE of 3.20% and 2.07% for Khambhat and Dahod respectively, surpassing ANN, Hybrid and ARIMA models. The Hybrid ARIMA-ANN improved over standalone ARIMA but could not match ANN or RNN. Overall model ranking was RNN > ANN > Hybrid > ARIMA across both markets. The RNN model was used to generate 52-week forecasts for 2024, with PFE within ±10% for most weeks in both markets, confirming its practical utility for paddy price forecasting in Gujarat.
Full Text
Tables and figures are in the full-text PDF.
Introduction
Cereals play an important role in Indian agriculture, constituting the principal component of the human diet for thousands of years. Rice, wheat, maize and to a lesser extent jowar and millets constitute the major cereals, with more than 50 per cent of the world's daily caloric intake derived directly from cereal grain consumption. India is the second-largest producer of rice in the world with paddy production reaching approximately 150,180 thousand tonnes from an area of 51,270 thousand hectares at a yield of 2,929 kg per hectare during 2024-25 (Anon., 2025a). In Gujarat, paddy occupies an area of 9,100 thousand hectares with a production of 22,320 thousand tonnes and a yield of 2,453 kg per hectare during 2024-25 (Anon., 2025b). Agricultural price forecasts are meant to assist farmers, governments and agribusiness industries in making decisions that influence producers, consumers and policymakers. As a result, policymakers, traders and farmers are concerned about the ability to reliably estimate the prices of cereal crops. Price volatility of paddy crop is high owing to various factors including seasonal supply cycles, weather-induced yield shocks, government procurement policies and macroeconomic forces. To overcome these issues, the present study was undertaken to develop appropriate models for forecasting weekly paddy price series in major markets of Gujarat. The data-driven approach of machine learning models, including ANN and RNN, offers a feasible price forecasting technique when the underlying relationship is nonlinear and complex (Harshith and Adhikari, 2023) [4] .
Materials and Methodology 2.1 Data:
The data on weekly prices (₹/quintal) of paddy crop of Gujarat were collected from the official Agmarknet portal (https://agmarknet.gov.in/) of the Ministry of Agriculture and Farmers Welfare, Government of India (Anon., 2023). Daily prices were converted into weekly averages. Markets were selected based on highest arrivals and data availability as presented in Table 1. The data were split into 80 per cent for training and 20 per cent for testing.
Data Preprocessing
The daily price data were cleaned and converted into weekly average prices for analysis. Missing values were imputed using a rolling average of the previous five days. Input variables were scaled to the range (0, 1) using Min Max Scaler from the Scikit-learn library before training neural network models, and forecasted outputs were inversetransformed to the original scale after prediction.
Stationarity Test
The time series was said to be stationary if its mean and variance remain constant over time. The Augmented Dickey-Fuller (ADF) test given by Dickey and Fuller (1981) [5] was used to assess stationarity. The regression equation estimated is:
Where, ∆Y𝑡 = Y𝑡 -Y𝑡-1, 𝛼1, 𝛼2 and 𝛽𝑖 are parameters of the regression model, ℎ is lag length and 𝛿 =𝜌 -1 and -1 ≤ 𝜌 ≤ 1
• H0: Time series is nonstationary • H1: Time series is stationary If the p-value from the ADF test falls below the significance level (0.05), H₀ is rejected and the series is declared stationary. Differencing was applied to achieve stationarity where required.
Nonlinearity Test
Before applying machine learning models, the presence of nonlinearity in the residuals was verified using the Brock-Dechert-Scheinkman (BDS) test (Brock et al., 1996) [6] . The BDS statistic is based on the correlation integral:
Where, Tm = T-(m-1) and I X t m , X s m is an indicator function which equals 1 if the sup norm ‖X t m -X s m ‖ < ∈ and equals 0 otherwise. The BDS statistic is:
Where, S m, T is the standard deviation. Under fairly moderate regularity conditions, the BDS statistic converges in distribution to N (0, 1) (Bisaglia and Gerolimetto, 2014) [7] .
• H0: Time series is linear • H1: Time series is nonlinear • H0: Time series is linear • H1: Time series is nonlinear
ARIMA Model
The future value of a variable is assumed to be a linear function of past observations and random errors. The ARIMA (p, d, q) model is expressed as:
Where, 𝑦 𝑡 and ε 𝑡 are the actual value and random error at time t respectively; 𝛷 𝑖 (i = 1, …, p) and θⱼ (j = 1, …, q) are model parameters; p is the AR order; d is the order of differencing; and q is the MA order. The Box-Jenkins methodology was followed in five steps: 1. Stationarity testing using the ADF test.
2. Model identification using ACF and PACF plots. The most suitable model was selected using the smallest Akaike Information Criterion (AIC) or Bayesian Information Criterion (BIC):
Where, m = p + q, L is the likelihood function, σ² is error variance and n is the number of observations. Adequacy of the fitted model was confirmed through the Ljung-Box Q* statistic:
which follows a chi-square distribution with (h -m) degrees of freedom. Non-significance of Q* confirms that residuals are white noise.
Artificial Neural Network (ANN) Model
ANN is a data-driven nonlinear model that learns complex patterns directly from data without requiring prior specification of functional form. The ANN output is computed as:
Where, 𝑦 𝑡 is the output; 𝑦 𝑡-𝑖 (i = 1, …, k) are the k lagged inputs; αⱼ and βᵢⱼ are the connection weights; g is the activation function; and εt is the random error. In this study, 13 lagged weekly prices were used as inputs. The Rectified Linear Unit (ReLU) activation function was employed in the hidden layers:
A linear activation function was used in the output layer. Models were optimised using the Adaptive Moment Estimation (Adam) algorithm with Mean Squared Error (MSE) as the loss function. The optimal architecture (number of layers, neurons, learning rate, batch size and epochs) was determined by systematic hyperparameter tuning.
Recurrent Neural Network (RNN) Model
Unlike feedforward networks, RNNs include recurrent connections that allow information to be retained across time steps, making them suited to sequential price data. The hidden state at each time step is updated as:
Where, 𝑥 𝑡 t is the input vector, ℎ 𝑡 is the hidden state, 𝑊 𝑥ℎ and 𝑊 ℎℎ are weight matrices, 𝑏 ℎ is the bias vector and 𝜎 ℎ is the activation function. The output is given by:
In this study, two SimpleRNN layers with 64 units each were used, followed by a dense output layer with linear activation. Data were reshaped into the format (batch size, time steps, features) required by the RNN architecture. The Adam optimiser and MSE loss function were applied.
Hybrid Model
Real-world price series typically contain both linear and nonlinear patterns. Since neither ARIMA nor ANN alone models both adequately, a hybrid ARIMA-ANN model was used. The time series is decomposed as:
Where, 𝐿 𝑡 is the linear component modelled by ARIMA and 𝑁 𝑡 is the nonlinear component. The residuals from the ARIMA model are:
These residuals, confirmed to be nonlinear by the BDS test, are then modelled using an ANN:
The combined forecast is obtained as:
This two-step approach exploits the linear modelling strength of ARIMA and the nonlinear modelling capability of ANN simultaneously.
Forecast Evaluation Methods
The forecasting performance of all models was compared using four error criteria:
Discussion
Visualisation of the time series data was the foremost process in the analysis. Time plots of weekly paddy prices for both markets showed a consistent upward trend over the study period, reflecting the influence of rising input costs, government procurement prices and market-level demand pressures. Descriptive statistics of the price series used in the experiments are presented in Table 2. The Augmented Dickey-Fuller (ADF) test was used to test stationarity of the price series. Results presented in Table 3 revealed that original paddy price series of both markets were non-stationary; after first-order differencing each series became stationary. The BDS nonlinearity test was applied to each series. Results presented in Table 4 showed that for Khambhat, the null hypothesis of linearity could not be rejected at 0.5σ but was rejected at 1.0σ, 1.5σ and 2.0σ (p<0.001) for both embedding dimensions. For Dahod, the null hypothesis was rejected at all epsilon levels (0.5σ to 2.0σ) with p-values below 0.001. This confirmed significant nonlinear patterns in both markets, justifying the use of machine learning models.
ARIMA Model Results
After visualizing the ACF-PACF plots and confirming stationarity through the ADF test, various ARIMA (p, d, q) structures with and without drift were fitted and compared using AIC and BIC values. The possible ARIMA structures for both paddy markets are presented in Tables 5 and6. Based on the lowest AIC and BIC values, the best ARIMA models selected were ARIMA (1, 1, 2) with drift for Khambhat and ARIMA (0, 1, 1) without drift for Dahod. The BDS test applied to ARIMA residuals of both markets confirmed significant nonlinearity (p<0.001) at all embedding dimensions, indicated that the ARIMA residuals contained nonlinear patterns not captured by the linear model. This provided the justification for proceeding with the neural network-based models.
ANN Model Results:
The ANN models for both paddy markets used 13 lagged weekly prices as inputs. The ReLU activation function was used in the hidden layers and linear activation in the output layer. The Adam optimiser with MSE loss function was employed. The optimal architectures determined by hyperparameter tuning are presented in Table 7.
RNN Model Results
The RNN models were developed using two SimpleRNN layers with 64 units each, followed by a dense output layer with linear activation. The input tensor was structured as (batch size, 4 time steps, 1 feature). The Adam optimiser with MSE loss function was applied. The architecture and performance of the RNN models are summarised in Table 8. (2024) [10] for rice prices in West Bengal, who demonstrated that [12] RNNs with proper preprocessing and hyperparameter tuning consistently outperform conventional statistical models.
Hybrid ARIMA-ANN Model Results:
After confirming nonlinearity in the ARIMA residuals through the BDS test, the hybrid ARIMA-ANN models were developed. The ARIMA residuals were used as inputs to an ANN to capture the remaining nonlinear patterns. The final hybrid forecast was obtained by combining the ARIMA and ANN predictions. Performance of the hybrid models is presented in Table 9. The hybrid ARIMA-ANN model outperformed standalone ARIMA across both paddy markets, with RMSE values reduced to nearly half those of ARIMA. However, the hybrid model did not surpass the standalone ANN or RNN models. Similar findings were reported by Sinha (2011) [11] , he observed that the hybrid ARIMA-ANN model improved upon ARIMA but did not outperform the standalone ANN model, particularly when the linear and nonlinear structures interact multiplicatively rather than additively.
Comparison of ARIMA, ANN, RNN and Hybrid
Models: A comprehensive comparison of the forecasting performance of all four models for each paddy market is presented in Table 10. The best model for each market is identified on the basis of the lowest RMSE, MAE, MAPE and MSE values. [10,12] , who reported that RNN outperformed both ANN and classical models for agricultural price forecasting.
Weekly Paddy Price Forecasting for 2024
Following model evaluation, the best-performing RNN model was employed in recursive multi-step forecasting mode to generate 52-week price projections for 2024 for both paddy markets. A representative set of forecasted and actual prices along with the Percentage Forecast Error (PFE) for both markets of paddy crop is presented in Table 11.
References
- Anonymous. Agriculture Marketing Website. 2023. Agmarknet. http://agmarknet.gov.in.
- Anonymous. Ministry of Agriculture of India. 2025. IndiaStatAgri. https://www.indiastatagri.com.
- Anonymous. Directorate of Agriculture, Government of Gujarat. 2025. https://dag.gujarat.gov.in.
- Harshith N, Adhikari V. Cracking the code of insect communication: a machine learning approach in acoustic entomology. Krishi Science. 2023;4(4):81-85.
- Dickey DA, Fuller WA. Likelihood ratio statistics for autoregressive time series with a unit root. Econometrica. 1981;49(4):1057-1072.
- Brock W, Dechert W, Scheinkman J. A test for independence based on the correlation dimension. Econom Rev. 1996;15:197-235.
- Bisaglia L, Gerolimetto M. Testing for (non) linearity in economic time series: a Monte Carlo comparison. Working Paper Series, Department of Statistical Sciences, University of Padua. 2014;3.
- Jha GK, Sinha K. Agricultural price forecasting using neural network model: an innovative information delivery system. Agric Econ Res Rev. 2013;26(2):229239.
- Suthar B, Pundir RS, Popat R. Groundnut price forecasting in Gondal market of Gujarat: a comparison of ARIMA and ANN models. Indian J Agric Mark. 2023;37(1):51-60.
- Kumari P, Goswami V, Harshith N, Pundir RS. Recurrent neural network architecture for forecasting banana prices in Gujarat, India. PLoS One. 2023;18(6):e0275702.
- Sinha K. A study on combining ARIMA and artificial neural networks for time series forecasting [MSc (Agriculture) thesis]. New Delhi: Indian Agricultural Statistics Research Institute; 2011.
- Ghetiya RL, Chandan GY, Kumari P, Nihala ACK, Pansuriya A. Price forecasting models for rice in West Bengal, India. Int J Res Agron. 2024;7(11):183-188.
How this paper connects to the literature. Drag to explore, click any node to open that paper.
