2.1 Gray model

The Gray system theory, founded and developed by Chinese scholar Deng, extends the viewpoints and methods of general system theory, information theory, and cybernetics to the abstract system of society, economy, and ecology, incorporating the development of mathematical methods to develop the theory and method of Gray system. The modeling process is as follows.

(1) Raw series are

$$X^{(0)} = \left\{ \mathfrak{x}^{(0)}(\mathbf{1}), \mathfrak{x}^{(0)}(\mathbf{2}), \dots, \mathfrak{x}^{(0)}(m) \right\} \tag{1}$$

(2) To weaken the randomness of the original data, the accumulated generating series is derived:

$$X^{(1)}(k) = \sum\_{i=1}^{k} x^{(0)}(i). \tag{2}$$

(3) Based on the sequence of Xð Þ<sup>1</sup> ð Þ<sup>t</sup> , a new sequence <sup>Z</sup>ð Þ<sup>1</sup> ð Þ<sup>t</sup> is derived as follows:

$$Z^{(1)}(k) = \frac{1}{2} \mathfrak{x}^{(1)}(k) + \frac{1}{2} \mathfrak{x}^{(1)}(k-1) \tag{3}$$

(4) Then, whitened differential equation is obtained:

$$\mathbf{x}^{(0)}(k) + a\mathbf{Z}^{(1)}(k) = b \tag{4}$$

In Eq. (4) a is development coefficient, b is the parameter of Gray action, and Φ is identification parameter vector. Then, the least squares estimation of parameters satisfies the following equation:

Using Gray-Markov Model and Time Series Model to Predict Foreign Direct Investment Trend… DOI: http://dx.doi.org/10.5772/intechopen.83801

$$
\hat{\Phi} = \begin{pmatrix} \hat{a} \\ \hat{b} \end{pmatrix} = \left(B^T B\right)^{-1} B^T Y \tag{5}
$$

and

model. Meanwhile, the FDI level in the previous year has no direct influence on that in the next year, in line with the no-effect characteristic of Markov stochastic process. On the basis of the previous study of Gray-Markov model, it is used to predict the tendency of FDI in China, addressing the shortcomings of the Gray model for the low precision of the data sample with large fluctuation and compensating for the limitation that the Markov model requires the data to have a smooth process. As a comparison, the time series prediction model is introduced to evaluate FDI. Then, the fitting results are compared to decide the optimal prediction model.

Gray-Markov model is a forecasting method integrating the Gray theory with the Markov theory [17–25]. Firstly, GM(1,1) is constructed to obtain the predicted residual value. Then, the error state can be divided according to the residual values, and the error state can be obtained in light of the Markov prediction model. Then, based on the error state and transition matrix, the predicted sequence from GM(1,1) can be adjusted to obtain more precise predicting internals. The traditional GM(1,1) has its advantage in short-term prediction, while it has a poor fitting effect in forecasting the long-range and fluctuating data series. And the benefit of Markov stochastic process is the prediction of the large data series with random volatility. GMM has been proposed by He to predict the yield of cocoon and oil tea in Zhejiang Province. Subsequently, this model is widely used in the prediction of transportation, air accidents, and rainfall. Accordingly, we use GMM to predict FDI of China [26–28].

The Gray system theory, founded and developed by Chinese scholar Deng, extends the viewpoints and methods of general system theory, information theory, and cybernetics to the abstract system of society, economy, and ecology, incorporating the development of mathematical methods to develop the theory and method

> <sup>X</sup>ð Þ <sup>0</sup> <sup>¼</sup> <sup>x</sup>ð Þ <sup>0</sup> ð Þ<sup>1</sup> ; <sup>x</sup>ð Þ <sup>0</sup> ð Þ<sup>2</sup> ; ……; <sup>x</sup>ð Þ <sup>0</sup> ð Þ <sup>m</sup> n o

> > <sup>X</sup>ð Þ<sup>1</sup> ð Þ¼ <sup>k</sup> <sup>∑</sup>

2

<sup>Z</sup>ð Þ<sup>1</sup> ð Þ¼ <sup>k</sup> <sup>1</sup>

(4) Then, whitened differential equation is obtained:

(2) To weaken the randomness of the original data, the accumulated generating

k i¼1

<sup>x</sup>ð Þ<sup>1</sup> ð Þþ <sup>k</sup> <sup>1</sup>

In Eq. (4) a is development coefficient, b is the parameter of Gray action, and Φ is identification parameter vector. Then, the least squares estimation of parameters

ð Þ<sup>t</sup> , a new sequence <sup>Z</sup>ð Þ<sup>1</sup>

2

(1)

<sup>x</sup>ð Þ <sup>0</sup> ð Þ<sup>i</sup> : (2)

<sup>x</sup>ð Þ<sup>1</sup> ð Þ <sup>k</sup> � <sup>1</sup> (3)

<sup>x</sup>ð Þ <sup>0</sup> ð Þþ <sup>k</sup> aZð Þ<sup>1</sup> ð Þ¼ <sup>k</sup> <sup>b</sup> (4)

ð Þ<sup>t</sup> is derived as follows:

of Gray system. The modeling process is as follows.

(3) Based on the sequence of Xð Þ<sup>1</sup>

satisfies the following equation:

102

2. Gray-Markov model

Time Series Analysis - Data, Methods, and Applications

2.1 Gray model

(1) Raw series are

series is derived:

$$B = \begin{pmatrix} -Z^{(1)}(2) & \mathbf{1} \\ -Z^{(1)}(3) & \mathbf{1} \\ \vdots & \vdots \\ -Z^{(1)}(m) & \mathbf{1} \end{pmatrix}, Y = \begin{pmatrix} \varkappa^{(0)}(2) \\ \varkappa^{(0)}(3) \\ \vdots \\ \varkappa^{(0)}(m) \end{pmatrix} \tag{6}$$

By differentiating <sup>x</sup>ð Þ<sup>1</sup> ð Þ<sup>k</sup> , a whitened differential equation can be written as dxð Þ<sup>1</sup> dt <sup>þ</sup> axð Þ<sup>1</sup> ð Þ¼ <sup>k</sup> <sup>b</sup>

(5) The whitened time response is as follows:

$$
\hat{\boldsymbol{\alpha}}^{(1)}(\boldsymbol{k}+\mathbf{1}) = \left(\boldsymbol{\alpha}^{(1)}(\mathbf{1}) - \frac{\hat{\boldsymbol{b}}}{\hat{\boldsymbol{a}}}\right)\boldsymbol{e}^{(-\hat{\boldsymbol{a}}\boldsymbol{k})} + \frac{\hat{\boldsymbol{b}}}{\hat{\boldsymbol{a}}}\tag{7}
$$

Reducing the sequence of <sup>x</sup>^ð Þ<sup>1</sup> ð Þ <sup>k</sup> <sup>þ</sup> <sup>1</sup> ð Þ <sup>k</sup> <sup>¼</sup> <sup>1</sup>; <sup>2</sup>; …; <sup>m</sup> � <sup>1</sup> , the following sequence is obtained:

$$\hat{X}^{(0)} = \left\{ \hat{\mathfrak{x}}^{(0)}(\mathbf{1}), \hat{\mathfrak{x}}^{(0)}(\mathbf{2}), \dots, \hat{\mathfrak{x}}^{(0)}(m) \right\} \tag{8}$$

(6) Model testing

Model test is divided into residual test and Gray-relating test. Residual test is to obtain the difference between predicting value and the actual value. Firstly, the absolute residuals and relative residuals about <sup>X</sup>ð Þ <sup>0</sup> and <sup>X</sup>^ ð Þ <sup>0</sup> are calculated:

$$\Delta^{(0)}(i) = \hat{\mathfrak{x}}^{(0)}(i) - \mathfrak{x}^{(0)}(i) (i = \mathbf{1}, \mathbf{2}, \dots, n) \tag{9}$$

$$\phi(i) = \frac{\Delta^{(0)}(i)}{\hat{\mathfrak{x}}^{(0)}(i)}(i = \mathbf{1}, \mathbf{2}, \dots, n) \tag{10}$$

Then, below is the average value of relative residuals:

$$
\Phi = \frac{1}{n} \sum\_{i=1}^{n} \phi\_i \tag{11}
$$

Given the value of α, it is called residual qualification model when Φ , α. The value of α can be 0.01, 0.05, or 0.10, and the corresponding model is perfect, qualified, and barely qualified.

As shown in Eq. (12), Gray correlation degree measures the correlating coefficient between the original sequence and the reference sequence:

$$\varepsilon\_{i}(k) = \frac{\min\_{l} \min\_{k} |\varkappa(k) - \varkappa\_{i}(k)| + \rho \max\_{l} \max\_{k} |\varkappa(k) - \varkappa\_{i}(k)|}{|\varkappa(k) - \varkappa\_{i}(k)| + \rho \max\_{l} \max\_{k} |\varkappa(k) - \varkappa\_{i}(k)|} \tag{12}$$

i denotes the ith group of fitting data, and k denotes the kth one in a certain group. ρ denotes the distinguish coefficient varying from 0 to 1, which is always set as 0.5. However, the correlation coefficient varies with moments, which results in disperse information. Combining the correlation coefficient in different moments

together, we can obtain the correlation degree between the original curve and the fitting curve:

$$r\_i = \frac{1}{n} \sum\_{k=1}^{n} \varepsilon\_i(k) \tag{13}$$

3.1 Preliminary analysis of data and modeling identification

Time series prediction is a statistical method processing dynamic data, which is a random sequence arranged in chronological order or a set of ordered random variables defined in probabilistic space {Xt, t = 1, 2, …, n}, in which the parameter t represents time. In the TSM, if the samples' autocorrelation function f g ρ^<sup>k</sup> decreases to zero based on the negative exponential function, then it can be preliminarily judged that this sequence is a stationary autoregressive moving average model (ARMA). If the absolute value of the sample autocorrelation function in the q-step

Using Gray-Markov Model and Time Series Model to Predict Foreign Direct Investment Trend…

delay ρ^kð Þ k≤ q is greater than twice of the standard deviation and the value

moving average model (MA(q)). In a similar vein, we can judge p-step

moving average coefficient θi, the mean μ, and the variance σ<sup>2</sup>

of partial autocorrelation function f g φ^kk .

DOI: http://dx.doi.org/10.5772/intechopen.83801

3.2 Parameter estimation

sequence in the ARMA model.

3.4 Optimal model selection

4. Comparison of GMM and TSM

4.1 GMM predicting FDI of China

(LSE) of FDI is as follows:

105

3.3 Diagnostic test

of ρ^kð Þ k . q is less than twice of the standard deviation, then the sequence is q-step

autoregressive moving average model (AR(p)) according to the truncation situation

In order to fit the TSM, we need to estimate the autoregressive coefficient φi, the

The purpose of diagnostic test is to check and test the rationality of the model, including residual test, autocorrelation function of residual error and partial autocorrelation function test, and the significance test of parameters in the model.

Model recognition is only a preliminary selection of TSM. Considering the actual observed errors and statistical errors, several models are taken as candidate models. And the most common methods of selecting optimal models include F-test method,

Take the FDI value of China over the period from 1990 to 2016 as the original

<sup>X</sup>ð Þ <sup>0</sup> ¼ f34.87, 43.66, 110.08, …, 1260<sup>g</sup>

Based on Eq. (5) and using the software MATLAB, the least squares estimation

<sup>¼</sup> �0:<sup>0697</sup> <sup>243</sup>:<sup>795</sup>

criterion function method (AIC criterion, BIC criterion, SBC criterion).

data (unit, \$100 million; data source, Ministry of Commerce of the PRC):

Based on Eq. (7), time-response function can be written as x k ^ð Þ¼ þ 1 <sup>3530</sup>:59e<sup>0</sup>:0697<sup>k</sup> � <sup>3495</sup>:72. Residual values can be obtained according to relative

<sup>Φ</sup> <sup>¼</sup> <sup>a</sup>^ ^ b  <sup>ε</sup> of the white noise
