# Dynamic Evaluation and Prediction for Macroeconomic Based on IGA-LSSVM

Authors: Xiaolong Bai
Journal: Journal of Sensors
 (2022)

---

## Abstract

Among all statistics, government statistics plays an extremely important role in socioeconomic activities, while the continuous changes of external factors bring new challenges to government statistics and have a great impact on the quality of statistics. With the rapid development of the economy and the maturity of the market economy system, the demand for government statistics from all walks of life has become more and more vigorous. In order to effectively improve the accuracy of macroeconomic outflow forecasting and further secure economic production, a weighted least squares support vector machine (LS-SVM) optimized with the immune genetic algorithm (IGA) is proposed to build a macroeconomic outflow forecasting model. For the nonlinearity, time-varying, and complexity of the economic outflow system, a new weighted strategy function is proposed to improve the LS-SVM, and then the IGA is introduced to optimize the improved LS-SVM with the kernel parameterδ and the regularization parameter γ. Finally, an experimental analysis is conducted using economic emergence data from economic history. The results show that the maximum relative error of forecasting using the model is 2.763%, the minimum relative error is 0.705%, the average relative error is 1.3298%, and the model has faster convergence, stronger generalization ability, and higher forecasting accuracy than other forecasting models.


---

## Body

## 1. Introduction

With the change of economic development mode and the continuous change of demand structure, China’s economic system is gradually moving towards the market economy system, and the interests of subjects are becoming more and more diversified [1]. The accuracy of individual indicators is no longer the only criterion for assessing the quality of data, and the data of different macroeconomic statistical indicators should be in a mutually coordinated relationship [2]. For this reason, both academic circles and government statistical departments have increased the exploration of statistical data quality assessment methods from the perspective of data coordination [3].The quality of government statistics is directly related to the accuracy of national macroeconomic control and the correctness of the development strategy of each economic entity, but the quality of Chinese government statistics has always been the core topic of socioeconomic activities and statistical work, and has been concerned by many scholars at home and abroad, becoming a difficult problem in the statistical field [4]. In addition to affecting economic activities, the quality of government statistics also directly reflects the credibility of the government [5]. Accurate, comprehensive, fast, and effective statistics can enhance the credibility of the government and play a very important role in the public’s access to information and correct decision-making [6].In recent years, China’s economy has experienced unprecedented sustained and rapid growth, and as China’s economic strength and international influence continue to grow, the quality of macroeconomic statistics as a measure of economic development has also attracted widespread attention from people at home and abroad [7]. However, scholars at home and abroad as well as people from all walks of life are constantly questioning the main macroeconomic statistics of China [8]. In order to make the majority of data users better understand the macroeconomic data of China, and to further align the macroeconomic statistics of China with international standards and enhance their international comparability, this paper considers it necessary to try to conduct an in-depth and systematic assessment of the data quality of the five major macroeconomic indicators of China from a new perspective [9]. This paper believes that it is necessary to try to conduct an in-depth assessment of the data quality of the five major macroeconomic indicators of China from a new perspective and draw corresponding conclusions from them, in order to provide some reference for the future economic decision-making and bring convenience to the data users [10].Wu and Ning (2018) pointed out that the official GDP data published in China since 1998 are suspected to be overestimated and biased much more than the errors caused by statistical technical difficulties, and that the official GDP growth rate does not reflect the real economic results, and the paper gives a true assessment of the economic growth in China [11, 12]. Blanchard [13] assessed the quality of Chinese energy statistics from 1990 to 2000 based on the assumption that energy data should be coherent between different items within energy data and concluded that energy data in the early 1990s were relatively accurate and reliable, but the quality of data has declined since the mid-1990s. Gupta and Kabundi [14] selected 10 core macroeconomic indicators and assessed the accuracy of GDP data by constructing a fixed-effects variable intercept model using panel data for 28 regions in China from 1984 to 2001. It was found that the regions did not find a basis for long-run errors in GDP data throughout the study period of 1984-2001. Sagaert et al. [15] constructed an econometric model based on the C-D production function and selected relevant indicator data from 1978 to 2004 to evaluate the accuracy of GDP by calculating traditional statistics such as COOK and W-K, which were calculated to obtain questionable GDP data for 1978, 1984-1986, and 1991. An et al. [16] constructed a data quality diagnosis method based on robust MM estimation based on C-D production function and evaluated the accuracy of Chinese GDP data from 1978 to 2008 and concluded that Chinese GDP data were relatively reliable.Summarizing the domestic and international literature, it is found that in terms of model estimation methods, most scholars still use the ordinary least squares method to estimate model parameters; however, OLS regression is vulnerable to the influence of a few outliers in the data set; thus, the model estimation results are inaccurate, and the residuals obtained according to the fitted model cannot detect all outliers [17]. In recent years, statisticians have begun to pay attention to robust estimation methods and establish data quality assessment models based on robust estimation methods, which can effectively solve the drawback of multiple outliers masking that often occurs in OLS methods.


## 2. Related Work

Although foreign research on macroeconomics has been relatively mature, domestic research on macroeconomics is relatively rare, and there is no systematic introduction and research in related fields, and most of the literature is only a simple introduction to macroeconomics and simple application in the field of auditing. This indicates that the law has not attracted sufficient attention of domestic scholars, and there is still a considerable gap with foreign countries in this regard.In terms of assessing the quality of audited financial data, Azis et al. [18] gives the origin and meaning of macroeconomics, then uses the annual financial data of a university to illustrate how to use macroeconomics to assess the data, suggests that analyzing the first two digits of the data can give more accurate results than analyzing only the first digit of the data, and finally summarizes the specific steps of using macroeconomics in the field of auditing [19]. From the daily experience of CPAs, with the help of Excel tools, it was found that the main financial data published by Chinese listed companies are well in line with macroeconomics, and the data that do not comply with this law can only indicate signs of fraud, which provides strong evidence for auditors to detect financial fraud. Forrester [20] briefly summarizes the application of macroeconomics in the security market, followed by a detailed description of the sample selection described in the article, and finally applies the macroeconomic goodness-of-fit test and statistical tests to investigate whether there is artificial manipulation of profits in the annual accounting statement net profits of 3570 listed companies on the Shanghai and Shenzhen exchanges in China between 2000 and 2002. McAlinn et al. [6] identifies fraudulent practices in auditing finances and applies existing foreign experience to Chinese auditing research. Rossi and Sekhposyan [8] explains the scope and steps of macroeconomics in the field of auditing, specifies how to apply the law through actual financial data, and suggests that computer-related software can be used to analyze whether the data conforms to macroeconomics. Zheng-wan et al. [11] suggests that with the development of modern information technology, the audit model has evolved into a data-based audit and then introduces the basic principles of macroeconomics, the conditions of use, and the steps of analysis. Wu and Ning [12] briefly introduced the meaning of macroeconomics and its scope of use and proposed that macroeconomics is a useful supplement to audit sampling techniques based on the analysis of the shortcomings of audit sampling. The macroeconomics and correlation coefficients are combined with the quarterly and annual financial data of balance sheet and income statement of listed companies, and the Excel software is used to check the authenticity of the financial data of listed companies.From the above literature review, it can be seen that the research on macroeconomics in China started relatively late compared with that in foreign countries, and it is far less extensive and deeper than the research already conducted in foreign countries. According to the existing research in China, most of the articles only focus on the existence of fraud and artificial manipulation of financial data in the field of auditing.


## 3. Diagnosis of the Quality of Macroeconomic Statistics

### 3.1. Trend-Fitting Diagnostic Method

The existing trend-fitting diagnostic method assesses the coordination between data by calculating the error rate between the actual statistical values of the explanatory variables in periodt and the estimated values obtained according to the model, and if the error rate exceeds the permissible error range set by itself, the data in that period are considered to be inconsistent, and the credibility of this data is doubtful. The specific formula is as follows:
(1)δt=yt−y^tyt,where δt represents the error rate, yt represents the actual statistical value, and y^t represents the estimated value.From reading the extensive literature, it is found that statisticians generally consider macroeconomic data estimates to be suspect when they deviate from the actual values by more than 5%. In this paper, based on the previous research, the maximum allowable error rate is also set to 5%.


### 3.2. Statistical Diagnosis Method

Robust regression by itself enables the estimation results to be more resistant to outliers and reduce the impact of outliers on the estimation results when there are outliers in the data set, but it also enables the identification of the type of outliers and the diagnosis of data quality through the robust residual-robust distance diagnostic plot (RR-RD diagnostic plot). The vertical axis of the RR-RD diagnostic plot is the standardized robust residualsRRt=et/σ^S, and the horizontal axis is the robust martingale distance RDt in the independent variable X-space.
(2)RDt=xt−μMCD′∑MCD−1xt−μMCDRDt2~χp2,t=1,2,⋯,n.In equation (2), the μMCD mean vector and covariance matrix ∑MCD are robust estimates obtained from MCD estimation to resist the effect of outliers on the estimation results, and p refers to the number of explanatory variables in the model.Based on the RR-RD diagnostic chart, it is possible not only to diagnose which data points are outliers but also to identify the type of outliers. On the vertical axis, under the assumption that the residuals obey a normal distribution, this data point can be regarded as an outlier in terms ofY if RRt<−x1.07952 or RRt>x1.07952, RRt. The criticalvalue±2.24, where 2.24 is the maximum distance allowed to deviate in the Y direction, is the maximum allowed deviation distance in the later section. On the horizontal axis, this data point can be considered an outlier on the X side if RDt>xp.07952 (p is the number of explanatory variables in the model), and this robust distance is considered to be overleveraged. The RR-RD diagnostic plot divides the data points into four categories.RRt and RDt are small for normal values, RRt is large and RDt is small for longitudinal outliers, RRt and RDt are both large for bad leverage points, and RRt is small and RDt is large for good leverage points. Among the four types of data points, normal values and good leverage points are consistent with the overall trend of the data set and do not lead to the degradation of data quality, but longitudinal outliers and bad leverage points are far from the overall trend of the data set from X-space or Y-space, and the presence of these two types of data points increases the standard error of the regression coefficients, which leads to the degradation of data quality.


## 3.1. Trend-Fitting Diagnostic Method

The existing trend-fitting diagnostic method assesses the coordination between data by calculating the error rate between the actual statistical values of the explanatory variables in periodt and the estimated values obtained according to the model, and if the error rate exceeds the permissible error range set by itself, the data in that period are considered to be inconsistent, and the credibility of this data is doubtful. The specific formula is as follows:
(1)δt=yt−y^tyt,where δt represents the error rate, yt represents the actual statistical value, and y^t represents the estimated value.From reading the extensive literature, it is found that statisticians generally consider macroeconomic data estimates to be suspect when they deviate from the actual values by more than 5%. In this paper, based on the previous research, the maximum allowable error rate is also set to 5%.


## 3.2. Statistical Diagnosis Method

Robust regression by itself enables the estimation results to be more resistant to outliers and reduce the impact of outliers on the estimation results when there are outliers in the data set, but it also enables the identification of the type of outliers and the diagnosis of data quality through the robust residual-robust distance diagnostic plot (RR-RD diagnostic plot). The vertical axis of the RR-RD diagnostic plot is the standardized robust residualsRRt=et/σ^S, and the horizontal axis is the robust martingale distance RDt in the independent variable X-space.
(2)RDt=xt−μMCD′∑MCD−1xt−μMCDRDt2~χp2,t=1,2,⋯,n.In equation (2), the μMCD mean vector and covariance matrix ∑MCD are robust estimates obtained from MCD estimation to resist the effect of outliers on the estimation results, and p refers to the number of explanatory variables in the model.Based on the RR-RD diagnostic chart, it is possible not only to diagnose which data points are outliers but also to identify the type of outliers. On the vertical axis, under the assumption that the residuals obey a normal distribution, this data point can be regarded as an outlier in terms ofY if RRt<−x1.07952 or RRt>x1.07952, RRt. The criticalvalue±2.24, where 2.24 is the maximum distance allowed to deviate in the Y direction, is the maximum allowed deviation distance in the later section. On the horizontal axis, this data point can be considered an outlier on the X side if RDt>xp.07952 (p is the number of explanatory variables in the model), and this robust distance is considered to be overleveraged. The RR-RD diagnostic plot divides the data points into four categories.RRt and RDt are small for normal values, RRt is large and RDt is small for longitudinal outliers, RRt and RDt are both large for bad leverage points, and RRt is small and RDt is large for good leverage points. Among the four types of data points, normal values and good leverage points are consistent with the overall trend of the data set and do not lead to the degradation of data quality, but longitudinal outliers and bad leverage points are far from the overall trend of the data set from X-space or Y-space, and the presence of these two types of data points increases the standard error of the regression coefficients, which leads to the degradation of data quality.


## 4. Improving LS-SVM

The basic idea of weighted LS-SVM is to set different weights for each training sample according to the degree of influence on the modeling. The author constructs a new weighting strategy function by considering the time factor and the similarity between samples:(3)gi=λigTi+1−λigDi,where gi is the importance of the i-th sample, which is composed of 2 parts, such as the time weight function gTi and the similarity function gDi, λi∈0,1 is used to adjust the weights of both, gTi is taken according to the time of the training sample from the test sample, the closer the training sample is to the test sample, the more important it is, gDi is taken according to the Euclidean distance of the training sample from the test sample, and the closer the training sample is to the test sample, the more important it is. The closer the training sample is, the more important it is.Usingxi,yi as the input and output of the model, the improved LS-SVM can be described as solving the following minimum problem:
(4)minw,b,ew,e=12wTw+12γ∑k=1Ngiei2,where w is the weight vector, γ>0 is the regularization parameter, and ei is the error variable.
(5)s.t.yi=wfxi+b+ei,i=1,2,⋯,N,where fxi denotes the nonlinear mapping of the sample to the high-dimensional feature space, and b is the bias value.The Lagrangian multiplierαi is introduced to construct the following Lagrangian function:
(6)Lw,b,e,α=Jw,e−∑k=1NαiwTfxi+b+ei−yi.The improved LS kuuch matrix can be obtained by combining the optimized SVM Kuhn matrix:(7)αb=01T1Ω+Vγ−10yN,where Vγ=diag1/γg1,⋯,1/γgN;yTN=y1,⋯,yN, 1T=11,⋯,1N, Ω is the kernel matrix, and its elements Kxi,yi=fxiTfxj are called kernel functions.The author selects the radial basis function (RBF)Kxi,xj=exp−x−xi2/δ2 and finally obtains the improved LS-SVM fitting model as
(8)ϕx=∑i=1LαiKxi,x+b.The time weights are determined based on the properties of the normal distribution, i.e.,gTi=exp−ti−t2/2β, where ti is the sampling moment of the i-th training sample, t is the sampling moment of the current test sample, and β is determined based on the distribution of the sample prediction error.The similarity weights are determined by nonlinear interpolation. Let the similarity weight of the training sample with the smallest Euclidean distance from the predicted sample be 1 and the similarity weight of the training sample with the largest Euclidean distance from the predicted sample be 0. The nonlinear interpolation function selectsgD=e−t2/2β, tj as the sampling moment of the j-th test sample, and then the similarity weights of the other training samples are determined by nonlinear interpolation of the normal distribution function [21, 22].


## 5. IGA-LSSVM-Based Economic Outflow Prediction

The model needs to normalize the sample data with inconsistent magnitudes before making predictions, and the normalization interval chosen by the author is [0.1, 0.9], and the normalization formula is as follows:(9)Y=X−XminXmax−Xmin×0.8+0.1,where X,Xmin and Xmax are the sample data, the minimum value in the sample data, and the maximum value in the sample data, respectively, and Y is the normalized data. After the prediction operation is completed, the predicted data are normalized by the inverse normalization formula:
(10)X=Xmin+Y−0.1Xmax−Xmin0.8×0.8.The specific steps of economic outflow prediction based on IGA-LSSVM are as follows:Step 1.
Determine the input and output layers of the model and obtain the sample data and then preprocess the sample data according to equation (9).Step 2.
Select the optimal kernel parameterδ and the optimal regularization parameter γ of LS-SVM using IGA and then train the model based on the training sample set to obtain the IGA-LSSVM-based gas outflow prediction model.Step 3.
The trained IGA-LSSVM model is used to predict the prediction sample set, and after the prediction is completed, the inverse normalization process is performed according to equation (10), and then the error analysis is performed [23, 24].


## 6. Economic Outflow Prediction Test and Analysis

There are many factors affecting the economic outflow, and the model is compared with the weighted LS-SVM proposed in the literature [25] based on the prediction error of the sample. 2 prediction methods are chosen RBF, the same optimal model parameters are selected by IGA optimization, and the prediction results and the relative error of prediction are shown in Figures 1 and 2. From Figure 2, it can be seen that the maximum relative error of the prediction using the IGA-LSSVM-based economic outflow prediction model is 2.763%, the minimum relative error is 0.705%, and the average relative error is 1.3298%.Figure 1
Comparison of prediction values and practical ones.Figure 2
Relative errors of prediction values.In contrast, the maximum relative error of the prediction using the weighted LSSVM prediction model proposed in the literature [13] based on the prediction error of the sample is 6.263%, the minimum relative error is 1.759%, and the average relative error is 3.4897%. The above prediction results show that the economic outflow prediction model based on IGA-LSSVM established in the paper has stronger generalization ability and higher prediction accuracy, which is a reasonable and reliable method for predicting economic outflows [26].Figure3 shows the comparison of the optimization process of IGA and GA. It can be seen that IGA is significantly better than GA in the whole parameter search process, reaching the optimum in 45 generations, while GA reaches the optimum only in 83 generations.Figure 3
Comparison in terms of optimization speed between IGA and GA.


## 7. Macroeconomics in Statistical Data Quality Assessment

If the distribution pattern of the sample data does not match with the theoretical distribution pattern described by macroeconomics, we can assume that the phenomenon may be caused by human factors, i.e., there are artificial fabrication, falsification, and deliberate concealment to a certain extent, and then we can assume that the data may be problematic. The macroeconomics is given in different data. Macroeconomics gives the probability distribution of the first digitd1 in the different data as
(11)Pd1=∫d1d1+1Pxdx∫110Pxdx=log101+1d1,d1=1,2,3,⋯,9.ThePd1 represents the probability of nonzero numbers appearing in the first place of different data, and the probability distribution is shown in Figure 4.Figure 4
Probability distribution of Benford’s law.With the continuous research on macroeconomics, the probability distribution of the second digitd2, the third digit d3, and the fourth digit d4 in a data has been gradually explored, and the logarithmic law can be extended to higher digits ②. Based on the studied logarithm law, we can obtain the probability of the first, second, third, and fourth digits of numbers 0-9, as shown in Table 1, where Pdn denotes the probability of occurrence of each digit in the nth position.Table 1
Expected probability of occurrence of the numbers 0-9 in the first four digits of different data.
NumberPd1Pd2Pd3Pd410.310030.120010.101880.1001720.189080.119880.101220.1001330.130010.108860.100060.1000940.124340.104630.100570.1000650.096120.103360.100130.0999760.076860.099870.099850.0998770.068130.093370.099610.0998580.056590.900090.098420.0998390.046870.880000.098260.09981Total1.000001.000001.000001.00000For example, when the first digit is 1, the probability of occurrence is 31.003%, while when the first digit is 9, the probability of occurrence is only 4.687%, and the gap between the maximum and minimum probabilities is as high as 26.133%; the probability of occurrence of the second digit is obviously much more concentrated than that of the first digit, with a maximum probability of 12.001% and a minimum probability of 8.8%. The probability of the second digit is much more concentrated than that of the first digit, with a maximum probability of 12.001% and a minimum probability of 8.8%, and the gap between them is reduced from 26.133% to 3.201%; the probability of the third digit is even more concentrated, fluctuating around 10%; the fourth digit is more obvious. We can thus see that as the number of digits in the sample increases, the probability of each digit appearing 0-9 tends to be more and more consistent, i.e., the probability of each digit appearing is equal to 0.1, as is commonly believed.


## 8. Conclusion

Although the model-based abnormal numerical observation and parameter stability analysis method is more scientific than the first three methods, when using this method, we must first ensure that all the data used in the model are real and reliable; in solving practical problems, we can first apply macroeconomic tests to the statistical data to be evaluated, and when abnormal data are found, we can carefully check these figures in a targeted manner. When anomalous data are found, these figures can be carefully checked to see if there is any artificial manipulation, thus ensuring the quality of the statistics. In this paper, based on the macroeconomic dynamic assessment and prediction of IGA-LSSVM, from the perspective of feasibility, most of the statistics in real life have a specific distribution law, and this distribution law has some inherent connection with the theoretical distribution law of macroeconomics; so, when assessing the quality of major statistics in China, we can make reference to macroeconomics and expect to get better results.



---

*Source: 6823102-2022-06-08.xml*