Monthly pork price forecasting method based on Census X12-GM(1,1) combination model

Background In recent years, the price of pork in China continues to fluctuate at a high level. The forecast of pork price becomes more important. Single prediction models are often used for this work, but they are not accurate enough. This paper proposes a new method based on Census X12-GM(1,1) combination model. Methods Monthly pork price data from January 2014 to December 2020 were obtained from the State Statistics Bureau(Mainland China). Census X12 model was adopted to get the long-term trend factor, business cycle change factor and seasonal factor of pork price data before September 2020. GM (1,1) model was used to fit and predict the long-term trend factor and business cycle change factor. The fitting and forecasting values of GM(1,1) were multiplied by the seasonal factor and empirical seasonal factor individually to obtain the fitting and forecasting values of the original monthly pork price series. Results The expression of GM(1,1) model for fitting and forecasting long-term trend factor and and business cycle change factor was X(1)(k) = −1704.80e−0.022(k−1) + 1742.36. Empirical seasonal factor of predicted values was 1.002 Using Census X12-GM(1,1) method, the final forecast values of pork price from July 2020 to December 2020 were 34.75, 33.98, 33.23, 32.50, 31.78 and 31.08 respectively. Compared with ARIMA, GM(1,1) and Holt-Winters models, Root mean square error (RMSE), mean absolute percentage error (MAPE) and mean absolute error (MAE) of Census X12-GM(1,1) method was the lowest on forecasting part. Conclusions Compared with other single model, Census X12-GM(1,1) method has better prediction accuracy for monthly pork price series. The monthly pork price predicted by Census X12-GM(1,1) method can be used as an important reference for stakeholders.


Introduction
In many country, pork is one of the daily necessities for most ordinary families. According to statistics, China needs about 54 million tons of pork every year, but the data released by National Bureau of statistics(Mainland China), pork output in 2019 is only 42.55 million tons, which shows that there is still a big gap between this quantity and the actual demand. Although pig breeding enterprises and individuals have also applied some innovative technologies to expand the production of pigs, the imbalance between supply and demand of pork is still an important factor affecting the price of pork in China [1]. The rising price of pork in 2019 is also an important factor leading to the continuous rise of China CPI [2]. The stability and controllability of pork price is not only related to the living standard of ordinary people, but also reflects the level of national governance in a sense.
Through the analysis of pork price trend, government departments can formulate strategies according to local conditions [3], such as encouraging breeding, putting government reserve pork into the market, or taking restrictive measures. Understanding the change of pork price in advance can also make farmers, middlemen and final consumers prepare for the follow-up plan [4]. For example, farmers can decide whether to expand the scale, middlemen can decide whether to increase or reduce the quantity of pork stocks, and final consumers may also consider whether to replace pork with other food. It takes about six months for a pig to become a marketable pork commodity from birth, that is to say, the price changes in the next six months are most meaningful for stakeholders [5].
Nowadays, there are many mathematical models that can be used to fit and predict time series data [6]. The monthly pork price data are a kind of typical time series. The models commonly used to fit and forecast time series include ARIMA model, grey system model, Holt winters exponential smoothing model and so on. With the development of artificial intelligence technology, various kinds of neural network technology are also used to forecast time series [7][8][9]. In addition, in order to analyze the factors that affect the change of time series, Census X12 model is used to decompose the seasonal and long-term change trend of time series [10][11][12]. In order to improve the accuracy of time series prediction, multiple model combination method is also widely used [13][14][15][16].
GM (1,1) model is one of the most important models for time series prediction [17]. It is one of the core contents of the grey system theory established by Professor Deng Julong in 1982 [18]. It describes the dynamic changes of time series by establishing a first-order linear ordinary differential equation. Its characteristic is that it can use a small amount of data to model and predict the series data. GM (1,1) model can be used to predict a wide range of time series, such as traffic data prediction [19][20][21][22], financial data prediction [23,24], agricultural data prediction, weather data, geological disaster data, disease prevention and control data, etc [25][26][27][28]. At the same time, in order to further improve the prediction accuracy, GM (1,1) model is also combined with other models [29][30][31][32].
In this paper, a new model combination method based on Census X12 model and GM (1,1) model was used to fit and forecast monthly pork price series. By comparing the prediction results of this method with other models, it was proved that X12-GM(1,1) model combination method has higher prediction accuracy. In the process of forecasting monthly pork price time series using Census X12-GM(1,1) method, a calculation parameter called empirical seasonal factor was constructed. When Census X12-GM(1,1) method is applied to other types of time series, the calculation formula of the empirical seasonal factor may be different.

Materials source
The original monthly pork price data from January 2014 to December 2020 were collected from the National Bureau of statistics(Mainland China). We divided the sample data into two parts, the data from January 2014 to June 2020 were used for model fitting, and the data from July 2020 to December 2020 were used to evaluate the accuracy of model prediction.

Census X12 model
The traditional time series analysis method divides the fluctuation of time series into four factors: long-term trend change factor (T), seasonal change factor (S), business cycle change factor (C) and irregular change factor (I). Census X12 model is a decomposition method of seasonal factor of time series. Based on the different degree of independence between the factors, the model can be divided into additive decomposition model and multiplicative decomposition model.
The basic principle of Census X12 is to decompose the long-term trend change factor and business cycle change factor by the centralized moving weighted average method. The seasonal change factor is obtained by dividing the monthly data average of the time series by the total average, and the irregular change factor is obtained by dividing the original series by the longterm trend change factor, business cycle change factor and seasonal change factor. The algorithm of Census X12 multiplication model is shown as follows: Step one: Initial estimate of seasonal adjustment After centralization of 12 items moving average, After eliminating the residual trend of season factor, So, after seasonal adjustment, the initial estimation has Step two: Calculation of tentative trend cycle factor and final season factor Using "Henderson" moving average formula, tentative trend cycle factor can be calculated. That is At this point, second estimate results of seasonal adjustment shows as follows Step three: Calculation of final trend cycle factor and season factor Using "Henderson" moving average fourmula, final trend cycle factor can be calculated. That is So final season factor has t So far, the final decomposition multiplication model of series Y t can be expressed as

GM(1,1) model
The grey prediction theory was put forward by Chinese scholar Deng Julong in 1982. This method mainly aims at small samples with little data and missing information. In grey system theory, GM (1,1) model is the most basic time series prediction model. It can model and predict according to a small amount of information. The modeling process of GM (1,1) model is shown as follows: Step one: The original sequence of GM (1,1) model was established. That is X ð0Þ ¼ ðx ð0Þ ð1Þ; x ð0Þ ð2Þ; . . . ; x ð0Þ ðnÞÞ Step two: Establishing one time accumulation generating sequence of the original sequence of GM (1,1) mode.
Step three: The mean generation sequence of X (1) is established as follows Z ð1Þ ¼ ðz ð1Þ ð2Þ; z ð1Þ ð3Þ; . . . ; z ð1Þ ðnÞÞ Step four: Constructing data matrix B and data vector Y, solving the values of development coefficient a and grey action quantity b.
x (0) (k) + az (1) (k) = b is the mean form of GM(1,1) model, and dx ð1Þ dt þ ax ð1Þ ¼ b is the whitening differential equation of GM(1,1) model. Finally, Whether the GM (1,1) model can be applied to practical problems needs to be judged, and generally the average relative error, correlation degree, mean square error ratio and other indicators need to be verified.

Census X12-GM(1,1) method
The algorithm of census X12-GM (1,1) method is divided into the following steps: Step one: Acquisition of the original time series (Y t ) Step two: Factor decomposition of the original time series (Y t ) Census X12 model is used to decompose the component factors of the original time series (Y t ). The result is that the original time series (Y t ) is decomposed into long-term trend change factor, business cycle change factor (TC), seasonal change factor (S) and irregular change factor (I).
Step three: Fitting and forecasting of long-term change factor, business cycle cycle change factor (TC) In this step, the GM(1,1) model is used. The fitting value and prediction value (TC) of the long-term trend change factor and the business cycle change factor (TC) are obtained.
Step four: Multiplication operation of The fitting value and prediction value (TC) and seasonal change factor (S) It should be noted that the fitting value is multiplied by the seasonal factor of the original time series at the corresponding time point, and the predicted value is multiplied by a empirical value (S em ) and the empirical value is calculated as follows: S em ¼ 1 þ y n À y nÀ 1 10 y n and y n−1 represent the last two values of the original sequence to be predicted. Finally, the fitting value and prediction value (Ŷ t ) of the original time series data (Y t ) based on X12-GM(1,1) method are obtained.
The algorithm flow chart of Census X12-GM (1,1) method is shown in Fig 1.

Comparison of prediction accuracy
In order to evaluate the prediction accuracy of different methods, this paper uses root mean square error (RMSE), mean absolute percentage error (MAPE), mean absolute error (MAE) as evaluation indexes [33,34]. These indexes are espressed as:

RMSE ¼
ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi 1 n

Data processing and analysis
Excel 2013 software was used to store the original monthly pork price time series from the National Bureau of statistics(Mainland China). Eview 9 software was used to build census X12 model and GSTA 7 software was used to build GM (1,1) model. The curve of fitting value and predicted value of Census X12-GM (1,1) method was also drawn by Eview 9 software.

Overview of original monthly pork price time series
A total of 84 numbers were collected to develop Census X12-GM(1,1) method.

Fitting and forecasting with GM (1,1) model
Next, the GM (1,1) model was built using the time series composed of long-term trend change factor and business cycle change factor (TC). Finally, we got the GM (1,1) model: X (1) (k) = −1704.80e −0.022(k−1) + 1742.36. It should be noted that the model only used the long-term trend change factor and business cycle change factor (TC) of March 2020, April 2020, May 2020 and June 2020. There were two reasons for using these four data in modeling. On the one hand, the GM (1,1) model based on static data has a very good fitting effect, but the model fitting is not our key task. On the other hand, GM (1,1) model is more suitable for small sample and scarce data. Three to five sample points are enough [35]. The predicted values of longterm trend change factor and business cycle change factor (TC) obtained by GM (1,1) model were shown in Table 1.

Calculation of final fitting value and predicted value with Census X12-GM (1,1) method
Using Census X12 model, the seasonal factor of the original monthly pork price time series had be obtained. Using GM (1,1) model, the fitting value and predicted value of long-term trend change factor and business cycle change factor (TC) had be obtained. Census X12-GM (1,1) method was to multiply the above two kinds of data according to the corresponding time points. Here, It should be noted that the empirical seasonal factor(1.002) was multiplied by the predicted value. The empirical seasonal factor was obtained by special calculation. The final predicted value obtained by Census X12-GM(1,1) method was shown in Table 2.

Comparison of different methods
In  Table 3. Meanwhile, the prediction error indexes of the above four methods were also calculated and shown in Table 4. The above indexes proved that Census X12-GM (1,1) method had the best prediction performance for monthly pork price time series.

Prediction
Census X12-GM(1,1) method was used to obtain the time series data of pork price in January 2021, February 2021 and March 2021 ( Table 5). The forecast data showed that the price of pork would decrease significantly in the next six months.

Discussion
When the prediction results of multiple models was compared, some key information of other models was omitted. Next, the details of the other models will be shown. When ARIMA model was used to fit the monthly pork price series, the normative modeling steps were carried out. Firstly, ADF (Augmented Dickey-Fuller test) was used to judge the stationarity of the original pork price series. After the first-order difference of the original series, the original pork price series met the requirements of stationarity. Next, ARIMA (0,1,1) and ARIMA (2,1,3) were created respectively according to the ACF (Autocorrelation Function) and PACF(Partial Autocorrelation Function) graph. Finally, by comprehensively judging the values of R 2 , AIC (Akaike Info Criterion) and SC (Schwarz Criterion), ARIMA (2,1,3) was chosen. Of course, the residual after fitting the original time series with ARIMA (2,1,3) model was also tested for correlation, the result showed that it was white noise.
The specific form of single GM (1,1) model used to directly fit the original monthly pork price time series was X (1) (k) = −768.93e −0.045(k−1) + 806.13. The post test ratio (c) and small error probability (P) of the model are acceptable.
Holt-winters model is a kind of exponential smoothing method for fitting time series, which can be subdivided into seasonless model, additive model and multiplicative model. According to the actual situation of the data, we used its multiplicative model.its parameter values were automatically set as α = 1, β = 0.34, γ = 0 by the Eviews software.
In the process of using Census X12-GM(1,1) method to forecast monthly pork price, we used a parameter which was called an empirical seasonal factor. This parameter comed from the results of many experiments. For other practice series, the seasonal factors may be different, so it should be judged again according to the historical data. Census X12-GM(1,1) method only predicted the pork price data in the next six months. This is because the pig breeding cycle is about six months. It is also feasible to use Census X12-GM(1,1) method for longer time prediction, but the longer the time, the worse the accuracy.

Conclusion
In this paper, several different methods were used to forecast monthly pork price data, including ARIMA model, GM (1,1) model, Holt winters model and Census X12-GM(1,1) method. By comparing RMSE, MAPE and MAE indexes, it was proved that Census X12-GM (1,1) method was more accurate. The prediction results of Census X12-GM(1,1) method can provide important reference for pig farmers, policy-making departments, middlemen and final consumers.
Supporting information S1 File. The data of pork price from January 2014 to December 2020.