Research on Gold Demand Prediciton Based on GM-GPR Model

The prediction system of gold demands in China is faced with issues such as uncertain factors, limited historical data, and nonlinearity. In order to have a more accurate prediction of gold demands, a prediction method based on the integration of grey prediction and Gaussian process regression is proposed. Specifically, equal weights are assigned to each model and a grey prediction is adopted to reflect the uncertain and changing relationship of gold demands, with Gaussian process regression indicating the nonlinear impacts of factors on gold demands. Moreover, modified particle swarm optimization plays a role in optimizing the hyper-parameters of Gaussian process regression, which solves the issue that conjugate gradient algorithms depend on initial value setting and are susceptible to be confined by locally optimal solutions. According to the study, the proposal of the paper is superior to a separate Gaussian process regression or grey prediction in terms of better predicting gold demands.


INTRODUCTION
As a special precious metal, gold has both commodity attributes and currency attributes. It is not only an important raw material for industrial production, but also has a good investment, value-added, and valuepreserving role. Therefore, gold is favored by individuals, investment institutions and governments; however, China's gold Reserves only account for 3.7% of the world's total, but 12% of the world's gold is produced. Faced with high demand and small reserves, effective forecasting of gold demand has become an urgent problem.
China's gold demand system is a complex system that is affected by both linear and non-linear factors. Therefore, the use of a single model to model cannot reflect the gold demand relationship well, and a combination model should be used. Because the combination model can be reasonable by giving each model, and the weight is used to explain the influence of different factors on its demand, thereby improving the forecasting accuracy. Gray prediction (GM (1,1)) [3][4] is a single sequence modeling, which only uses the behavior sequence of the system, and no external action sequence. The gray effect of the model is the data mined from the background value , Used to reflect the relationship of data changes, its exact connotation is gray, unclear, it is a concrete manifestation of connotation extension, its advantage is that it does not require input, and the data change relationship is found from the behavior sequence; Gaussian Process Regression (GPR) [5][6][7][8] is a non-parametric model developed based on Bayesian and statistical machine learning. Its advantage is that it is suitable for small samples and nonlinear complex systems, but its hyperparameter optimization conjugate gradient algorithm is easily limited. Based on the local optimal solution and dependent on the setting of the initial value.
According to the above analysis, if an effective forecast of gold demand is achieved, it is necessary to look for the law of data change from gold consumption to reflect its gray law, and use a nonlinear model to reflect its complex nonlinear relationship; therefore, this article Based on gray prediction and Gaussian process regression, a combined forecasting method is proposed. Gray prediction is used to mine the relationship between demand data changes in the gold demand system to express the impact of uncertain factors on gold consumption. Gaussian process regression is used to reflect factors for the non-linear impact of gold demand, the improved particle swarm algorithm is used to optimize the Gaussian process regression hyperparameters to solve the problems of being limited to local optimal solutions and dependent on the initial value setting [9][10]. Combining the two models and then we consider assigning equal weight to each model. Finally, the Chinese gold demand is used as a verification, which proves the forecast validity of the combined model.
The Gaussian process regression based on Bayesian theory and statistical learning theory is a non-parametric model that uses Gaussian priors for regression analysis. It is good in complex regression problems characterized by multi-dimensional, small sample, and nonlinearity. Performance. In recent years, some scholars at home and abroad have applied it to more complicated prediction systems, and achieved good prediction results. A Gaussian process is a set of any finite number of random variables with joint distribution, and its properties are determined by the mean function and the covariance function, x x is a random variable, which in turn indicates that gaussian process is The joint prior distribution of the observed value y and the predicted value is the 1 n  order covariance between the test point * x and the input of the training set X Matrix; dimensional identity matrix; the hyperparameters are generally adaptively optimized by maximizing the marginal likelihood function. Therefore, the posterior distribution of the predicted value is calculated as (4), The 95% confidence interval of the predicted value is (5).

COMBINED MODEL
Since the changing trend of gold consumption has inaccurate connotations, it is assumed that its changes follow a certain growth law. At the same time, this growth law may be affected by other non-linear factors, leading to deviations from the expected growth law, and thus The consumption change process produces fluctuations; therefore, it is considered to use the gray forecast model to explore the data change law of gold consumption, and use Gaussian process regression to reflect the non-linear influence of factors on gold consumption; finally, give the two models equal weights, so that The combined model is more in line with the true relationship of changes in the demand for gold, thereby improving the prediction accuracy.

Grey prediction model
Z is an immediate mean generating sequence of (1) X , (2) 1 so, we can get the least squares parameters of model and minimizing (8) to get the prediction equation is Restore predicted value is

Gaussian process regression model
Different kernel functions will lead to different prediction accuracy. In order to improve the prediction accuracy of the model, the square exponential covariance function is selected after verification, the expression is equation (11), and the zero-mean function is selected as the mean function.
The hyperparameter of the squared exponent covariance kernel function is 1 2 , T = ,the hyperparameter of the marginal likelihood function is 3 ,The final hyperparameter is 1 2 3 , , In order to solve the problem that the optimization process of the conjugate gradient algorithm is easy to fall into the local optimal solution and depends on the initial value, the particle swarm optimization algorithm with the inertial weight gradually decreasing with the number of optimization iterations is used to optimize the parameters to ensure that the feasible solution flies to a relatively high level. A good area also can optimize locally. The weight change formula is as shown in formula (12), which is the velocity inertia weight and the population inertia weight. The optimization steps are as follows Step 1: Set the hyperparameter optimization range, and initialize the particle swarm algorithm, the population size, the number of iterations, the learning factor and, the velocity inertia weight and the population inertia weight, and randomize the initial position and initial velocity of each particle.
Step 2: Fitness calculation; construct fitness function as shown in formula (13), where yi^* represents the predicted value of the training set, and yi represents the true value.
Step 3: Update the position and speed, perform boundary condition processing, and determine whether to update the individual optimal value and optimal position of the particle, and the global optimal position and optimal value of the particle swarm.
Step 4: Loop calculation, return to 3 until the convergence condition is met or the maximum number of iterations is reached, and the optimal value is output.
Step 5: Obtain the optimal solution and assign it as the initial value to the conjugate gradient algorithm to obtain the final hyperparameter solution.
Bring the optimized hyperparameters into the model, and then introduce the Gaussian process regression model as formula (14)

Building a combined model
The weight represents the contribution rate of each single model to the combined model. Under the assumptions mentioned in this article, the demand for gold is affected by uncertain factors and the nonlinear and complex relationship with the factors. Therefore, each model needs to be given a reasonable weight. Reflects the influence of different reasons on the demand for gold; according to previous scholars' research, the weights obtained through complex calculations are often not as good as assigning equal weights to each model. At the same time, the demand for gold lacks prior knowledge, so it is difficult to assign subjectively Each model has a reasonable weight; therefore, the weighting method in this paper adopts the equal weight method, that is, assuming that the combined model has a submodel, the weight of each model is. Therefore, the final prediction model is (15)

EMPIRICAL RESEARCH
This article selects China's gold consumption data from 2007 to 2018 and normalizes it. The data from 2007 to 2016 is used as the modeling data, and the data from 2017 to 2018 is used as the test set to verify the effectiveness of the combined model.

Factor selection
The demand for gold ( y ) in China is mainly composed of three aspects. First, jewelry and investment gold. Gold consumption has a very strong relationship with per captive an income, and the price of gold will affect consumers' willingness to buy gold. Therefore, the per capita national income (

Results discussion
According to the gold consumption data, the gray prediction model formula is obtained according to the gray prediction system,   Table Ⅱ that the combination model proposed in this paper takes into account the uncertain factors in the gold demand system, as well as the linear and non-linear complexity, its predicted MSE=0.003, which is much lower than the gray predicted 0.0907 and Gaussian process The regression is 0.0364, and the average prediction error percentage is 4.1%, which is much lower than the 22% of gray prediction and 14% of Gaussian process regression. The prediction performance of the combined model is better than that of Gaussian process regression and gray prediction under the same conditions. Excellent, it can effectively predict the annual demand for gold in China.

ANALYSIS CONCLUSION
This article proposes a combination model to forecast gold demand to make up for the shortcomings of a single model. Among them, with the help of gray forecasting behavior sequence modeling to mine the internal change relationship of gold consumption data, so as to reflect the influence of uncertain factors on its demand; use the good performance of the Gaussian process regression model in small samples, nonlinear and other characteristics, Reflects the non-linear impact of gold demand. The conclusion shows that the model combined by the gray forecasting model and the Gaussian process regression model effectively predicts my country's annual gold consumption.