Calculation and realization of new method grey residual error correction model

Aiming at the problem of prediction accuracy of stochastic volatility series, this paper proposes a method to optimize the grey model(GM(1,1)) from the perspective of residual error. In this study, a new fitting method is firstly used, which combines the wavelet function basis and the least square method to fit the residual data of the true value and the predicted value of the grey model(GM(1,1)). The residual prediction function is constructed by using the fitting method. Then, the prediction function of the grey model(GM(1,1)) is modified by the residual prediction function. Finally, an example of the wavelet residual-corrected grey prediction model (WGM) is obtained. The test results show that the fitting accuracy of the wavelet residual-corrected grey prediction model has irreplaceable advantages.


Introduction
Since its birth in 1982, the grey system theory has been widely used in the fields of economy, management and engineering technology [1][2][3][4][5][6][7][8][9][10]. Among them, the grey prediction model (GM (1,1)) is one of the core contents of the grey system theory. Its characteristics are that it needs fewer samples and the calculation is simple, so it is better than the traditional prediction method. However, in recent years, many scholars have proposed the improvement of the grey model and the study of its application scope The research can be roughly divided into two categories: 1) using the method of function transformation to improve the smoothness of the sequence can reduce the level ratio of the original data and make the level ratio fall within the allowable interval to achieve the purpose of improving the modeling accuracy; 2) According to the characteristics of the original data, we can further improve the gray prediction algorithm, optimize the background value, optimize the initial conditions, etc.
In literature [11][12][13][14][15][16][17], some scholars studied the function transformation from the perspective of the monotonicity of the function and the compression transformation, in order to further improve the accuracy of the model, and some scholars used the buffering operator to reduce the fluctuation. However, due to the need to restore the sequence of the new sequence generated by the function transformation after modeling, the accuracy of the final restoration is reduced and the effect is not ideal In literature [18][19][20][21][22][23][24][25][26][27], scholars not only believe that the average value of background value has errors, but also believe that it is unreasonable that the initial condition must pass through a certain point in the original data. Therefore, they propose some methods to solve this problem, such as improving the background value and initial condition, so as to improve the accuracy of the model However, in the process of improving the background value, the convergence of iterations and in the process of constructing the optimal background value, we should consider how the convergence of the iterative formula. If the iterative formula doesn't converge, then we can't get the optimal background value.
However, for the stochastic volatility series, from the perspective of improving the smoothness, the background value and initial value of the sequence by means of function transformation, the final effect of improving GM(1,1) model is not good. Literature [28][29][30] studied the stochastic volatility series. In literature [20], accelerated translation transformation and weighted mean transformation are proposed to process the original data to make the original data smoothly change. The grey model(GM(1,1)) is established for the transformed smooth data to first predict, and then the corresponding inverse transformation is carried out for the predicted data, so as to improve the prediction accuracy of the grey model. Literature [29,30] uses Fourier series to fit the residual and actual value of the mean model, and establishes the Fourier residual corrected grey prediction model (FGM) to predict practical problems, and the final prediction accuracy and effect was achieved good results.
In view of the stochastic volatility sequence prediction accuracy problem, this study put forward a kind of optimization from the perspective of residual method of grey GM (1, 1) model. Data fitting method is often used by people to obtain the approximate function relation, so as to provide quantitative relationship for further research. In many cases, the fitting function can be used to explain the data, in order to obtain better results than the interpolation and approximation function. The common method of data fitting is the least square method, and the basis functions mostly use n-degree polynomials, Chebyshev polynomials, Bernstein polynomials, trigonometric function [29,30], etc., The different basis functions will produce different fitting effects, so we make different choices. However, the stability of the calculation process and the accuracy of fitting are the main criteria to evaluate the merits and demerits of the basic functions. In this study, the combination of wavelet function basis and least square method is used to fit the residual data of the grey model. Since the residual data presents the stochastic volatility state and the wavelet function has good local characteristics and fluctuation, the wavelet function is selected as the basis function, which has a good fitting effect for the stochastic volatility residual. The constructed residual prediction function can accurately reflect the variation of residual, and then the prediction function of average gray GM (1,1) model can be modified by the residual prediction function, so as to improve the fitting accuracy of stochastic volatility sequence. The WGM model in this study and the FGM model in the literature [29] used to determine the PetroChina stock price closing price on May 9, 2018 solstice on May 23 [31] and the number of tourists in Taiwan on August 1, 2006 solstice on July31, 2007 show that the fitting accuracy and fitting effect of the grey prediction model with wavelet residual correction are better than GM (1,1) and FGM. The precision of the grey model series is improved, and the application range of the grey model is broadened.

Mean GM(1,1) model
The initial data is listed as ðiÞ. The first-order differential equation of the GM(1,1) model is Where t denotes the indepent variables in the system, a represents the developed coeffficient, b is the grey controlled variable, and a and b denote the model parameters requiring determination. The values of a and b become by the ordinal least-square method as Furthermore, accumulated matrix B is B ¼ À z ð1Þ ð2Þ À z ð1Þ ð3Þ � � � À z ð1Þ ðnÞ The grey parameters can be substituted into Eq (1) to obtain the solution of the differential equation:x Whenx ð1Þ ¼ x ð0Þ ð1Þ, the sequence one-order inverse-accumulated generating operation of reduction is obtained as:

The wavelet residual modified grey forecasting model (WGM)
The accuracy of predictions made using GM(1,1), this study applied the WGM(1,1) approach to increase its prediction capabilities. Fig 1 shows the process of WGM(1,1), while the following illustration details the method used to establish the steps of WGM for the residual correction, which are detailed as follows.
(1)Definition of error: (2)The wavelet basis is obtained by selecting the wavelet generating function Then, we get the residual� (3)Define the expression at a given two-dimensional data point (j, � (0) (j)), (4)Use the least square method to determine the coefficient a 2 , a 3 , � � �, a n , then the following equations is solved The matrix of the Eq (10) is expressed as We have a 2 , a 3 , � � �, a n , So as to find the residual fitting function The original value prediction function is:

Evalute accuracy of prediction
The accuray of the grey prediction model is usually checked by the posterior difference method. The model accuracy is evaluated by the mean square error ratio and the small error probability. The smaller the mean square error ratio and the smaller the probability of small errors, the higher the accuracy of the prediction model, The basic method is as follows: assuming X (0) for the original sequence,x ð0Þ for the GM(1,1) model simulation sequence, � (0) for the residual series, then x ð0Þ ðkÞ; Respectively, the mean of X (0) , variance; � ð0Þ ðkÞ ¼ x ð0Þ ðkÞ Àx ð0Þ ðkÞ; ðkÞ; Where � � is the mean of resdual � (0) (k),S 2 2 is the residual variance, and K is the mean square deviation. The mean square error ratio K and the small error probability P are calculated from K ¼ S 2 S 1 and P ¼ pðj �ðkÞ À � � j< 0:6745S 1 Þ. The accuracy of the model is shown in Table 1. In addition to the evaluation of the posterior error index, there are the following evaluation methods: (1)Average residual 1 n X n k¼1 ½x ð0Þ ðkÞ Àx ð0Þ ðkÞ�; (2)Average relative errore

3.Application experiment analysis
The data of Example 1 and Example 2 analysis WGM model prediction accuracy. The experiments were done using Matlab2015b software. It can be seen from the above Table 2 that the mean residual error and the mean relative error of the residual correction model of the new method are 2.5602 × 10 −9 and 5.235025317962417 × 10 −14 , respectively, while the FGM(1, 1) models are 0.130 and 0.849031398741481, respectively. It can be seen from this order of magnitude that the residual correction model of the new method has higher simulation accuracy than the FGM(1,1) model and the GM(1,1), which indicates that the residual correction model of the new method has the best simulation effect.

Simulation value analysis
Example 2: The experiment was conducted with the original data of the number of tourists visiting Taiwan during August 1, 2006-July 31, 2007. The data of the number of tourists visiting Taiwan comes from literature [29].
The experimental data calculates that a = 0.00491, b = 179544.95413 in the mean model is calculated from the experimental data, then the calculation formula for the simulation value of the mean model is: As can be seen from the above Table 3, the mean residual error and mean relative error of the new residual correction model method are 1.1008 × 10 −7 and 2.451254681202029 × 10 −12 , respectively, while the FGM(1,1) model is 0.0296 and 0.886095333,respectively. From this order of magnitude, it can be seen that the residual correction model of the new method has higher simulation accuracy than the FGM(1,1) model and the GM(1,1), which indicates that the residual correction model of the new method has better simulation effect.

WGM model simulation diagram analysis
The statistics of the Tables 2 and 3 show the actual number,forecast number,residual error, average residual,average relative error,mean absolute error, mean square error and posterior

PLOS ONE
The grey residual error correction model error by GM(1,1) and FGM(1,1) and WGM(1,1). The evaluation indicators displayed from the two different sets of data show that the evaluation indicators of the WGM method constructed in this study are far superior to the evaluation indicators corresponding to the GM method and the FGM method. It shows that the simulation accuracy of the WGM method is higher than that of the GM method and the FGM method, and the fit of the WGM method to the random fluctuation data is better, which increases the application range of the grey system. The statistics of the Tables 2 and 3 indicate the short-term efficiency of the WGM. Figs 2 and 3 compare actual value, GM forecasting value and FGM forecasting value and WGM forecasting value. The results show that the cures of GM appear flat and FGM and WGM follows undulating appearance, but WGM is more effective than FGM in predicting stochastic volatility data. From the results, this study develops an accuracy forecasting model for improving the effectiveness of PteroChina stock price and taiwan's tourism demand in making short-term and stochastic volatility predictions.

4.Summary
From the experimental analysis, the WGM has better simulation effect and higher prediction accuracy than the GM and FGM. The prediction effect of the WGM established in this paper is better than the FGM established in literature [29], and the simulation accuracy of the WGM is higher.
According to the residual analysis and research of the grey model (GM (1,1)), a new method residual correction prediction model(WGM) is established in this paper. This study of WGM makes the following contributions: 1)combing the grey forecasting and wavelet series model to refine the forecasting effectiveness for the stochastic volatility data; 2)proving an effective method for the application; 3)improving the accuracy of short-term forecasting in case involving sample data with significant fluctuations.