Short-term forecast of pig price index on an agricultural internet platform
Abstract
From the perspective of agribusiness, the market price of live pigs reflects the current demand. Therefore, tracking and forecasting market prices are important tasks in agrimanagement, by which the production schedule can be adjusted to increase profit. An agricultural internet platform was developed as an integrated cloud service for market tracking. To quantitatively forecast online pig trading, in this study, a short-term forecasting model of the pig price index was developed; the model automatically retrieved historical data as a training data set and determined the price index forecast with an autoregressive integrated moving average (ARIMA) algorithm for a time-series analysis. The mean square error (MSE) of the AR(1) model for predicting the pig price index in Henan Province was 159.010, and the MSE of the ARIMA(1,1) model for predicting pig price index in Fujian Province was 92.294. The results demonstrated that the error between the predicted calculation and verification test results was small, and the results efficiently improved the prediction accuracy (EconLit citations: C6, L86, Q1).
1 INTRODUCTION
As an important part of China’s agricultural economic system, the pig industry provides a strong guarantee for the national stability and well-being of Chinese people (e.g., Somwaru, Xiaohui & Tuan, 2003). China, by far the world’s largest producer of pork, is home to approximately half the world’s porcine population with 650–700 million pigs, but most pigs are located on tens of millions of small and medium-sized pig farms (e.g., Riedel, Schiborra, Huelsebusch, Huanming & Schlecht, 2012). With sustainable development, sufficient diversification of the pig industrial economy and construction of an agricultural internet platform can function in parallel (e.g., Lehmann, Reiche, & Schiefer, 2012; Verdouw, Vucic, Sundmaeker, & Beulens, 2014). An agricultural internet platform can reconstruct the pig industry value chain, thus generating a new specialized division of labor and corresponding financial service mode to increase the commercial value of small and medium-sized agribusinesses (e.g., Cadilhon, 2013; Canavari, Fritz, Hofstede, Matopoulos, & Vlachopoulou, 2010). A two-sided market is usually used to describe the agricultural internet platform, and stakeholders are often used to describe the platform participants, including pig farm managers, brokers, purchasers from meat processing enterprises, and financial institutions (e.g., Su, 2016; Yang, Wang, Cao, & Lu, 2017). Although the operational mechanisms of agricultural internet platforms have been well established, a remaining question is whether online pig trading can be predicted quantitatively.
During recent years, the seasonal fluctuations in pig prices have been obvious, and there has been a multiyear cyclical fluctuation, which is determined based on the growth characteristics of pigs that have been inherited over several thousand years (e.g., Tan & Zapata, 2003). In fact, globally, the current monetary and financial factors of pig market price formation and fluctuation are playing an increasingly significant role (e.g., Saghaian & Marchant, 2002). Recent developments in trade literature suggest that asymmetric information and increasing pig price volatility are the main economic forces that led to the decision to apply quantitative forecasts to online pig trading (e.g., Debello & Gardebroek, 2010; Jiang & Wang, 2009). Considering statistical methods with traditional calculations and the foundation of agricultural intelligence computing, it is necessary and feasible to select the pig price index as a key performance indicator for the quantitative forecasting of online pig trading (e.g., Suharjito, Machfud, Sukardi, Haryanto, & Marimin, 2011; Wang, Li, & Liu, 2017). To date, the literature on quantitative forecasts of livestock market prices has focused on long-term forecasts using quantitative methods, with little research applying short-term forecasts (e.g., Ezekiel, 1927; Foster, Havenner, & Walburger, 1995). In a practical sense, only short-term predictions should be relied upon, because longer-term predictions could have greater social and economic effects, particularly if they are false.
Therefore, the objective of this letter is to use a time-series analysis framework to make short-term predictions of a pig price index on the agricultural internet platform using agricultural intelligence computing practices.
2 EXPERIMENTAL DESIGN
In this experiment, the agricultural internet platform was developed as an integrated cloud service for agribusiness that utilizes smart devices and back-end servers for data acquisition, cleaning, mining, analysis, and visualization to facilitate agrimanagement. In addition to basic services, such as agricultural intelligence computing, farm production tracking, purchase–sales–storage, enterprise management, live pig trading and supply chain finance, innovative services such as short-term forecasting of a pig price index and pig farmers’ credit ratings were also developed and verified on the platform (Figure 1).

Technical architecture diagram of the agricultural internet platform [Color figure can be viewed at wileyonlinelibrary.com]
In the process of time-series data collection, the pig price index for 9 months was selected as the representative sample including trading date, geographical location, number of pigs, total weight, price per unit, and trading volumes. This study had network applications program wherever time-series data was continuously collected, but the data collection device had limited local buffer space and communication bandwidth, so that the data had to be compressed and sent back during the collection process. Reasonable ranges of price fluctuations were determined, and the pig price indexes for Henan and Fujian provinces in China were obtained as the representative sample. With changes in environmental policy and the industrial model, Fujian Province, located in the coastal area, has experienced a decline in its proportion of agriculture and a decrease in the development of the pig industry, and this province is considered the area into which pigs are transferred. As the main production area of grain crops, Henan Province has an increasingly prominent advantage in terms of the cost of feed and is primarily considered the province out of which pigs are transferred.
The time-series analysis framework of this study was as follows: First, the time-series was constructed and developed in the Python Integrated Development Environment. Then, the autoregressive integrated moving average (ARIMA) model was selected and designed to analyze the pig price index. Moreover, the ARIMA model was constructed based on the aspects of a stationarity test, model identification, model verification, model prediction, and performance evaluation (e.g., Hassan, 2014).
3 RESULTS AND DISCUSSION
After Dickey–Fuller testing, the results indicated that the series of the pig price index in Henan and Fujian provinces were stationary; therefore, no more additional transformation or differentiation was needed before fitting the data to the ARIMA model (parameter d = 0). The autocorrelation function (ACF) and partial autocorrelation function (PACF) graph of the ARIMA model that forecasted pig price index in Henan Province is plotted to determine the autoregressive order p and the moving average order q (Figure 2). The results showed that p = 1 and q = 0, and this mode was called the AR(1) model for predicting the pig price index in Henan Province. Similarly, the ARIMA(1,1) model for predicting the pig price index in Fujian Province can also be constructed.

ACF and PACF graphs of ARIMA model for predicting the pig price index in Henan Province. ACF: autocorrelation function; ARIMA: autoregressive integrated moving average; PACF: partial autocorrelation function [Color figure can be viewed at wileyonlinelibrary.com]


After establishing the model, the validity of the whole model needed to be tested. An ACF graph of the residual series of the pig price index in Henan Province is developed (Figure 3). The results showed that the ACF of the residuals was not significant, and the autocorrelation coefficient was within two standard deviations. Therefore, the residual series was white noise, and the AR(1) model for predicting the pig price index in Henan Province was effective. Similarly, the ARIMA(1,1) model for predicting the pig price index in Fujian Province was also effective.

ACF graph of the residual series of the pig price index in Henan Province. ACF: autocorrelation function [Color figure can be viewed at wileyonlinelibrary.com]
This study used ARIMA model to predict the pig price index and took the mean square error (MSE) as evaluation index to evaluate the performance of the forecasting model. A rolling forecast of the pig price index was needed given the dependence on observations in prior time steps of the ARIMA model. The ARIMA model was recreated after each new observation was received. All observations were tracked in a list called history that was seeded with the training data and to which new observations were appended for each iteration. The figure of predicted calculation and verification test results is plotted (Figure 4). The MSE of the AR(1) model for predicting the pig price index in Henan Province was 159.010, and the error between the predicted calculation and verification test results was low. This method was used to evaluate the performance of pig price index forecasting, and the results have shown an efficiently improved accuracy of prediction. Similarly, the MSE of the ARIMA(1,1) model for predicting pig price index in Fujian Province was 92.294.

The rolling forecast of the pig price index in Henan Province [Color figure can be viewed at wileyonlinelibrary.com]
4 CONCLUDING REMARKS
In this study, the short-term forecasting model of the pig price index was developed for the quantitative forecasting of online pig trading. Quantitative forecasting was integrated into the agricultural internet platform, providing agribusiness services for pig farm managers, brokers, purchasers from farm product processing enterprises, and financial institutions. Currently, the daily updated pig price indexes cover 26 provincial markets. According to our experiment for short-term forecasting, the recommended algorithm was ARIMA. For future studies, we recommend considering other features in addition to historical price, such as breed area, transport cost, location of market, pork processing cost and retail price index. In addition, an evolutionary algorithm is important to apply for feature selection, since the size of features increases in the future.
Biography
Dr. Ming Wang is a research assistant at the College of Water Resources and Civil Engineering, China Agricultural University. His e-mail address is [email protected]. He completed his Undergraduate (2009), Masters (2011) and PhD (2017) programs at China Agricultural University. His research interests are in online to offline business of agricultural products, agricultural market monitoring system, international agri-food trade, agricultural intelligent device.