Weekly price prediction of garlic and ginger using complex exponential smoothing
Abstract
Garlic and ginger crops are commercially significant spices with high export value. Over the last few years, there are more fluctuation in price, which has put growers at more risk and indirectly reduced production. Furthermore, the advanced price forecasts for both crops became a valuable input for policymakers in order to stabilize prices and a key factor of effective market intelligence service. Therefore, the study aims to identify the appropriate forecasting model for the weekly prices of garlic and ginger. For this purpose, the study used the 331 weekly observations of wholesale prices for garlic and ginger crops which were collected from the 22nd week of 2016 to the 35th week of 2022 for the Varanasi market. The statistical tests identified the presence of non-normal, nonstationary and nonlinearity features in both price series. The perusal of the literature suggested that the ARIMA and Exponential smoothing models were implied as benchmark models. Based on the presence of characteristics, the complex exponential smoothing model and Time delay neural network were selected as candidate models. From this comparative analysis, the results of accuracy measures suggested that complex exponential smoothing showed better performance compared to benchmark models and Time delay neural networks. This study recommended that complex exponential smoothing is a suitable model for forecasting the future values of garlic and ginger prices.
Full Text
Tables and figures are in the full-text PDF.
Introduction
India is the largest producer, consumer, and export of spices at the global level. As a result, India is known as the "Spice Bowl of the World". This is not just because of their production, but also due to their excellent flavour, rich aroma, and rich texture. Among key spices, Ginger and garlic had the greater share of 30% and 19% of India's total spices production respectively. Furthermore, India is the second largest exporter of ginger after China. Both crops are wellknown spices and are being cultivated for fresh vegetables as well as dried spices (Mathew et al., 2018) [8] . Garlic and ginger prices showed higher price fluctuation in the past few years, exposing the growers to more risk. Moreover, these fluctuations are subject to climate risks impacting production and market arrivals (Jhade & Singh, 2021) [4] . The awareness of various market channels, crop weather advisory and market intelligence services will help farmers to reduce risk. Among these, market intelligence services become efficient if the price information is accurate and timely available. Additionally, it helps policymakers to make policies regarding stabilization prices. The price of agricultural commodities exhibits the characteristics such as high volatility, nonstationarity, nonlinearity, seasonality, and calendar effects (Wang et al., 2022) [13] . It poses a great challenge in the price forecasting task of both crops. Moreover, the prices depend on many factors which could not be quantified. Therefore, historical data are used for modeling the characteristics and forecasting future value. The most popular univariate method is ARIMA which is utilized to predict the future values of garlic in previous studies (Wang, 2018) [12] . To handle the nonlinear characteristics of prices, the machine learning method especially ANN got great attention in the price forecasting domain (Jha & Sinha, 2014; Lama et al., 2016; Singh, 2021; Rajpoot et al., 2022) [3,6,10,9] . Li et al., (2015) [7] suggested the prediction of weekly data is important compared to monthly because the price fluctuation occurs over a week. Svetunkov et al., (2022) [11] mentioned that Complex exponential smoothing performed better in high-frequency data such as weekly, daily and hourly data. The involvement of complex numbers in this model captures the complex mixture of nonlinearity and seasonality. Therefore, in this study, ARIMA and Exponential Smoothing were used as benchmark models. Complex exponential smoothing and Time delay neural network were selected as the candidate models. The study aims to identify the appropriate model to forecast the future prices of garlic and ginger.
Materials and Methods
Weekly price data of ginger and garlic crops from the 22 nd week of 2016 to the 35 th week of 2022 were collected for the Varanasi market from the website http://www.upkrishivipran.in/. Each series consist of 313 observations. The data was split into a training set and a test set. The data from the 22 nd week of 2016 to the 9 th week of 2022 were used as a training set to build the model and the 10 th week of 2022 to the 35 th week of 2022 was used as a test set to check the performance of the models.
ARIMA
ARIMA, which was introduced by Box Jenkins, is the most well-known method of analyzing univariate time series. In the time series process {y t }, present values are related to its past values. Generally, Time series is generated by a linear aggregation of random shock. In practice, the successful model should have parameters parsimoniously. It is possible to accomplish this with a small number of autoregressive and moving average terms. ARIMA can be expressed as
Where, (1-B) d is a number of differences, 𝜀 𝑡 = 𝑁(0, 𝜎 2 ) or white noise. In the consideration of seasonality, Seasonal Autoregressive integrated moving average can be implied. It can be written as
Where, s is seasonal frequency, (1 -𝐵 𝑠 ) 𝐷 is number of seasonal differences, (1 -𝐵) 𝑑 is number of differences, 𝜀 𝑡 = 𝑊𝑁(0, 𝜎 2 ) indicating white noise. The box Jenkins methodology was used to identify the best ARIMA model for future forecasts. The automatic algorithm for identifying the appropriate ARIMA model was achieved with the help of the forecast package in R.
Exponential Smoothing
Brown (1959) [14] , Holt (1957) [15] and Winters (1960) [16] are the pioneers to develop the exponential smoothing model. Forecast values are determined by weighted averages of prior data, with the weights declining exponentially from present to past observations in the exponential smoothing method. The time series data are split into trend, seasonal, and error components by exponential smoothing. There are five types of Trends, three types of seasonality, and two types of error which are presented in Figure 1. [2] . A recursive form is provided as the general form for 30 exponential smoothing models.
𝑦 𝑡 = 𝑤(𝑥 𝑡-1 ) + 𝑟(𝑥 𝑡-1 )𝜀 𝑡
Where 𝑥 𝑡 = (𝑙 𝑡 , 𝑏 𝑡 , 𝑠 𝑡 , 𝑠 𝑡-1 , … , 𝑠 𝑡-𝑚+1 ) is the state vector, {𝜀 𝑡 } is a Gaussian white noise process with variance 𝜎 2 and 𝜇 𝑡 = 𝑤(𝑥 𝑡-1 ). The model with additive errors has 𝑟(𝑥 𝑡-1 ) = 1, therefore 𝑦 𝑡 = 𝜇 𝑡 + 𝜀 𝑡 . The model with multiplicative errors has 𝑟(𝑥 𝑡-1 ) = 𝜇 𝑡 , so 𝑦 𝑡 = 𝜇 𝑡 (1 + 𝜀 𝑡 ). Hyndman & Khandakar, (2008) [1] have created the smooth package in R for the automatic selection of the exponential smoothing model. Svetunkov et al., (2016) [17] proposed a new approach to exponential smoothing which is based on the new term "information potential", an unobserved time series component. In this method, the observed values of a time series are converted to complex numbers by combining the information potential. Instead of real variables in the exponential model, the complex variable was applied in the following equation by using information potential.
Complex exponential smoothing
Where 𝑦 ̂𝑡is the estimated value of the time series, 𝑝̂𝑡 is the estimated value of information potential and 𝛼 0 + 𝑖𝛼 1 is the complex smoothing parameter. The complex-valued function can be represented by a system of two real-valued functions as following equations.
The final forecast of CES is the combination of the above two parts. It revealed that CES is the nonlinear method that is connected with first and second equations and changes simultaneously based on the complex smoothing parameter value. The recursive form of complex exponential smoothing was given below
) is the information potential persistence vector and 𝑤 = ( 1 0 ) is the measurement vector. In this model, model selection is done among non-seasonal CES and Seasonal CES with the help of minimum AIC and BIC values. The complex exponential smoothing model of given data is performed using the smooth package of R.
Time delay Neural Network (TDNN)
ANNs are a type of model that is replicated of the structure of neurons in the brain. Conventional models rely on assumptions like linearity, normality, and stationarity. In the case of ANN, it does not rely on a prior assumption of a data-generating process and is capable of understanding numerous nonlinear structures and complicated relationships contained in the data. In this architecture, the input layer, hidden layer, and output layer were the most essential terms. In univariate analysis, the number of input layers was determined using the lagged values of the same variable. This crucial number could be determined by examining the structure of autocorrelation. A single hidden layer has been frequently used in forecasting time series. Choosing the output layer is a simple task because we often just require one output. The time delay neural network's general statement is stated as
Where, 𝛼 𝑗 (𝑗 = 0,1,2, … , 𝑞) and 𝛽 𝑖𝑗 (𝑖 = 0,1,2, … , 𝑝, 𝑗 = 0,1,2, … , 𝑞) are the model parameters or connection weights, p is the number of input nodes and q is the number of hidden nodes. Each node in the hidden layer receives the weighted sum of all inputs and bias terms, the value of which is always one. Each hidden node transforms this weighted sum of input variables using the activation function, which is defined as the nonlinear relationship between a network's inputs and outputs. Sigmoid functions are normally employed as activation functions for hidden layer transfer functions.
Similar to the input node, the output node also receives the weighted sum of the output from every hidden node and converts the weighted total using its activation function to produce an output. It can be described as
Where w is a vector of network parameters and f is a function of the network structure. This structure behaves similarly to a nonlinear autoregressive model. Neural networks have adaptive nature like learning by doing. For this purpose, the data in this study was divided into two sets: a training set and a test set. The training set is used to estimate parameters and build the network, whereas the test set is used to determine sample performance. The TDNN was executed by forecast package in R studio.
Accuracy measures
To measure the effectiveness of models for vegetable price forecasting, widely applied accuracy measures (Koutsandreas et al., 2022) [5] , including Root Mean Square Error (RMSE), Mean Absolute Error (MAE) and Mean Absolute Percentage Error (MAPE), are calculated by the following equations.
Results and Discussion
The descriptive statistics of both series utilized in the study are provided in Table 1 As mentioned in methodology, based on the lowest AIC and BIC values, seasonal ARIMA (1,1,1)(1,0,0) 52 and (2,1,1)(0,1,1) 52 were found to be an appropriate model for the price series of garlic and ginger. The parameter of the selected model was estimated by the maximum likelihood method which was given in Table 4 along with residual analysis. The residuals of the fitted model were tested by the Ljung box test and graphical representation which were provided in Table 4 and Figure 3. The p values of the test were 0.87 and 0.74, which confirmed that the residuals were not auto-correlated and the residual plots with ACF and histogram were presented in Figure 3 which revealed that the residuals were white noise. The selected models were adequate for both series which were used for validation purposes. Similar way, the best exponential smoothing model was selected based on the minimum AIC and BIC. Among thirty models, ETS (M, M d , N) and ETS (A, A d , N) were found as the best fit for the garlic and ginger series respectively. The identified model failed to capture the seasonality in weekly data. The estimated parameters of models were depicted in Table 5 along with residual analysis. According to the p-value of the Ljung Box test, the residuals were independent. The seasonal complex smoothing model was chosen from the model-building step, based on the lowest value of AIC and BIC. The estimated parameters of the seasonal complex exponential model were shown in Table 6. In both price series, the parameter 𝛼 1 was greater than one. Therefore, the model is expected to produce an exponential trajectory. In the machine learning model, the best fit is determined by the lowest RMSE and MAPE. Based on this, the appropriate model for the garlic price series was chosen with six lagged, one seasonal lagged, and four hidden nodes (7:4s:1l). Likewise, the model with one lagged, one seasonal lagged, and two hidden nodes was found to be the best fit for the price series of ginger. With this model, the sigmoid function and linear function are added as activation functions of the hidden layer and output layer.
Conclusion
In this study, a different forecasting model has been implied to predict the weekly wholesale price of garlic and ginger for the Varanasi market. The study aims to identify a stable approach for weekly data with nonstationary and nonlinear characteristics. The challenges faced in weekly data of garlic and ginger are high frequency, less consistency in seasonality, and high fluctuations. The Classical model ARIMA and the Exponential Smoothing model were used as benchmark models. The previous literature suggested that the Complex Exponential Smoothing and Time Delay Neural Networks were able to handle nonlinearity and high-frequency data. From comparative analysis, Complex exponential smoothing was captured and modelled the price series of garlic in a good manner. In the case of the ginger price series, Complex exponential smoothing showed dominant performance compared to benchmark models followed by a Time delay neural network. Based on the results obtained in this study, the statistical model namely the complex exponential smoothing model showed significant performance compared to the machine learning method. This study also helps policymakers to make decisions about the relative price of garlic and ginger.
References
- Hyndman RJ, Koehler AB, Snyder RD, Grose S. A state space framework for automatic forecasting using. International Journal of Forecasting. 2002;18(3):439-454.
- Jha GK, Sinha K. Time-delay neural networks for time series prediction: An application to the monthly wholesale price of oilseeds in India. Neural Computing and Applications. 2014;24(3-4):563-571.
- Jhade S, Singh A. Integration and causality of major garlic markets in Uttar Pradesh State. The Journal of Research ANGRAU. 2021;49(2):100-106.
- Koutsandreas D, Spiliotis E, Petropoulos F, Assimakopoulos V. On the selection of forecasting accuracy measures. Journal of the Operational Research Society. 2022;73(5):937-954.
- Lama A, Jha GK, Gurung B, Kumar Pau R, Bharadwaj A, Parsad R. A Comparative Study on Time-delay Neural Network and GARCH Models for Forecasting Agricultural Commodity Price Volatility. Journal of the Indian Society of Agricultural Statistics. 2016;70(1):7-18.
- Li YN, Li JY, Zhao WX, Zhao FG. Study on early warning of fluctuation in the prices of ginger. Advance Journal of Food Science and Technology. 2015;9(10):802-806.
- Mathew M, Vani N, Aparna B. Economics of production of ginger in Wayanad district of Kerala, India. Economic Affairs. 2018;63(3):627-632.
- Rajpoot K, Singla S, Singh A, Shekhar S. Impact of COVID-19 lockdown on prices of potato and onion in metropolitan cities of India, Journal of Agribusiness in Developing and Emerging Economies. 2022;12(3):386399.
- Singh A. Comparison of artificial neural networks and statistical methods for forecasting prices of different edible oils in Indian markets. International Research Journal of Modernization in Engineering Technology and Science. 2021;3:1044-1050.
- Svetunkov I, Kourentzes N, Ord JK. Complex exponential smoothing. Naval Research Logistics. 2022;69(8):1108-1123.
- Wang B, Liu P, Zhang C, Wang J, Peng L. Prediction of garlic price based on ARIMA model. In Cloud Computing and Security: 4th International Conference, ICCCS, Haikou, China. Revised Selected Papers, Part I. Springer International Publishing. 2018 June;4:731-739.
- Wang Y, Liu P, Zhu K, Liu L, Zhang Y, Xu G. A GarlicPrice-Prediction Approach Based on Combined LSTM and GARCH-Family Model. Applied Sciences. 2022;12(22):113-66.
- Holt F, Mayer A. A design procedure for dielectric microwave lenses of large aperture ratio and large scanning angle. IRE Transactions on Antennas and Propagation. 1957 Jan;5(1):25-30.
- Winters PR. Forecasting sales by exponentially weighted moving averages. Management science. 1960 Apr;6(3):324-42.
Cited by 3
From OpenAlex, OpenCitations and reference lists read by Scinovex
- Research on Ginger Price Prediction Model Based on Deep Learning ↗
Fengyu Li, Xianyong Meng, Ke Zhu, Jun Yan, Lining Liu, Pingzeng Liu · Agriculture · 2025
In order to ensure the price stability of niche agricultural products and enhance farmers’ income, the study delves into the pattern of the ginger price fluctuation rule and its main influencing factors. By combining seasonal decomposition STL, long and short-term memory network LSTM, attention mechanism ATT and Kolmogorov-Arnold network, a combined STL-LSTM-ATT-KAN prediction model is developed, and the model parameters…
❝ 4PDF - Hybrid deep learning model for vegetable price forecasting based on principal component analysis and attention mechanism ↗
Xinzhi Chen, Chengzhi Cai, Xinyi He, Duan Mei · Physica Scripta · 2024
Abstract With the aim of enhancing the accuracy of current models for forecasting vegetable prices and improving market structures, this study focuses on the prices of bell peppers at the Nanhuanqiao Market in Suzhou. In this paper, we propose a hybrid Convolutional Neural Network (CNN) and Gated Recurrent Unit (GRU) model for vegetable price forecasting based on Principal Component Analysis…
❝ 4 - Forecasting of area and production of sorghum in Maharashtra, India using ARIMA and ANN models
A Jadhav, Abhishek Singh, S. B. Chavan, Abha Goyal · International Journal of Research in Agronomy · 2025
Sorghum, a highly valued crop in India, has been experiencing a decline in production over the past two decades, despite India being the largest producer and consumer of millets. Forecasting expected area under cultivation and production of sorghum in advance can play a pivotal role in reversing this trend. This study made an attempt to find suitable model for sorghum area and production forecasting in Maharashtra, India. From 1966 to 2021, data on sorghum area and production were gathered and forecasted using ARIMA and ANN techniques. ARIMA (0, 1, 1) with drift is fitted best for the sorghum
How this paper connects to the literature. Drag to explore, click any node to open that paper.
