Cross-Market Infection Research on Stock Herding Behavior Based on DGC-MSV Models and Bayesian Network

This paper is concerned with the multivariate stochastic volatility modeling of the stock market. We investigate a DGC-t-MSV model to ﬁnd the historical volatility spillovers between nine markets, including S&P, Nasdaq, SSE, SZSE, HSI, FTSE, CAC, DAX, and Nikkei indices. We use the Bayesian network to analyze the spreading of herd behavior between nine markets. The main results are as follows: (1) the DGC-t-MSV model we considered is a useful way to estimate the parameter and ﬁt the data well in the stock market; (2) our computational analysis shows that the S&P and Nasdaq have higher volatility spillovers to the Shanghai and Shenzhen stock markets; (3) the results also show that there is a strong correlation between stock markets in the same region.


Introduction
Price volatility in the stock market is the result of a combination of factors in the whole economy.
rough the observation of historical data, we can analyze the fluctuation over a period of time. e ARCH model [1] and stochastic volatility model [2] are two main models for studying the volatility of the time series. e SV model adds a random factor to the ARCH model, which makes the SV model better to fit the real stock fluctuations. e SV model is widely used to analyze the high-frequency financial time series [3,4]. Some researchers make various improved models based on the SV model, including added nonlinear [5] and mean equation [6], added an interrelated time series [7], added leverage and student distribution [8,9], and added twofactor simulation [10]. e study of the investor's behavior shows that the herd behavior does not only appear in a certain market but widely exists in various stock markets [11]. e crisis will cause herd behavior in the country where the crisis originated and spread to neighboring countries. However, the diversified asset plays an important role to explain the herding behavior in non-US markets [11]. So, the herd behavior exists not only in developed countries but also in emerging markets and underdeveloped markets [12].
Research on herd behavior has focused on a single market, such as the study of herd behavior in Chinese stock markets [13]. More and more herd behavior research studies began to pay attention to the spillover between markets. e authors in [14] find the herd behavior caused by the unexpected impact from both China and US markets and have proved that the Chinese market has a weaker response to the impact from the US market. After the financial crisis in 2008, there is growing evidence that herd behavior in different markets is likely to be driven by the same information at the same time [15,16]. ere are also studies of herd behavior with intercontinental features [17] and time-varying features [18]. Volatility spillover causes comovement between markets [19], especially in crisis [20,21].
Bayesian networks can reflect the uncertainty relationship between different markets. e Bayesian network is widely used in analysis and diagnosis [22]. e complex network and Bayesian network are often used in the stock market to reflect the interaction between traders [23][24][25].
e Bayesian method is also used to predict the stock market [26] and estimate volatility parameters [27]. Malagrino et al. [28] use the Bayesian network to verify the impact of the global stock market index on iBOVESPA.
Existing research focuses on herd behavior in one market. But with the integration of the world economy, the spread of herd behavior is no longer limited to a certain market. It is necessary to research on cross-market effects of the stock market volatility and herd behavior. In this paper, an improved multivariate stochastic volatility model is used to analyze the historical data of S&P, Nasdaq, SSE, SZSE, HSI, FTSE, CAC, DAX, and Nikkei indices. en, we use the volatility spillover correlation parameters between nine markets to build a Bayesian network. e article is organized as follows. Section 2 introduces the DGC-MSV-t model and the Bayesian network model. Section 3 analyzes the weekly data of nine representative stock indexes and establishes a Bayesian network based on the volatility spillover relationships. Section 4 concludes this paper.

Stochastic Volatility Model and Bayesian
Network Classifiers (1) In equation (1), the known parameter is the yield sequence p t , the unknown parameter q t and ψ t are unobservable variables, p t represents the standard logarithmic yield at time t, ε t indicates the logarithmic volatility, ξ t indicates the independent disturbance of the volatility, ξ t and ε t are irrelevant, σ represents the standard error of the volatility disturbance, and ψ 1 is a continuous parameter that reflects the impact of current volatility on future.
Based on the GC-MSV model and the DC-MSV model proposed by Yu and Meyer [29], we build the multivariate stochastic volatility model with dynamic correlation, Granger causality, and t-distribution.
Equation (2) has two sets of time series. Taking the SSE index and the S&P index as examples, p c represents the yield of the SSE index and p a represents the yield of the S&P index. ψ � ψ cc ψ ca ψ ac ψ aa , where ψ ac represents the volatility spillover from the SSE index to the S&P index, ψ ca is the opposite, and ψ aa and ψ cc represent the autocorrelation of the SSE and S&P index. ρ t represents the dynamic correlation [29]. o reflects the degree of freedom. In equations (3)- (6), we describe the design procedure of the DGC-MSV model. With a given q t+1 , μ and ψ parameters obey e density t is the degree of freedom o as follows: erefore, the distribution density of f(p t /q t ) is as follows: at is to say, (p t /ε t ) also obeys the t-distribution, i.e., ). e likelihood function L can be expressed as follows: 2 Complexity
In order to calculate the marginal posterior distribution of the target parameter, h(a/p) needs to find the normali- e MCMC method has proven to be the most effective way to solve the high-dimensional calculation problem [30]. Here, we use the WinBUGS software package to calculate this problem of the multivariate SV model.

Markov chain.
e Markov chain assumes that the parameter of the random process X t , t ∈ T is a discrete set I � x 1 , x 2 , . . . . We use the Markov chain as follows: erefore, the statistical properties of the Markov chain are completely determined by its one-step transition probability: It is necessary to use Gibbs sampling to determine this conditional probability in the practical application of the Markov chain.

Gibbs Sampling.
Gibbs sampling is the most famous MCMC sampling algorithm [31]. e process of one-step Gibbs sampling is given as follows: . , x (t) n− 1 )) Its transition probability from x to x ′ is as follows: Considering the Gibbs sampling as a multidimensional normal random vector, it is possible to set X � (X 1 , X 2 ) to obey the multivariate normal distribution as follows: erefore, when t ⟶ ∞, the distribution of (x (t) 1 , x (t) 2 ) will converge to the target distribution.

Bayesian Classifier.
e Bayesian classifier refers to a kind of the Bayesian network learning method [32]. Assume U � A 1 , A 2 , . . . , A n , C is the n attribute variables of the instance, it can be represented by the vector x i � (a 1 , a 2 , . . . , a n ). a i is the value of A i . C is a class variable. c is the value of C. e probability that x i belongs to the class c j is as follows: p c j a 1 , a 2 , . . . , a n � p a 1 , a 2 , . . . , a n /c j p c j p a 1 , a 2 , . . . , a n � αp a 1 , a 2 , . . . , a n c j p c j , where α is a regularization factor, p(c j ) is the prior probability of c j , and p(c j /(a 1 , a 2 , . . . , a n )) is the posterior probability of c j . e prior probability is independent of the training data. According to the chain rule of probability, it can be expressed as follows: p c j a 1 , a 2 , . . . , a n � αp c j n i�1 p a 1 , a 2 , . . . , a i− 1 , c j .
Complexity e key to use the Bayesian classification is how to calculate p(a 1 , a 2 , . . . , a i− 1 , c j ). Different Bayesian classification models calculate it in different ways.

Bayesian Network.
e Bayesian network is a directed acyclic graph (DAG). Each node corresponds to a conditional probability table as P � P P( e network structure S is a DAG consisting of a set of node variables V(V � V 1 , V 2 , . . . , V n ) and a set of directed edges L(L � (V i V j /(V i , V j )), t∈ nV ). e network structure is expressed as follows: S � (V, L).

Data and Preprocessing.
In this section, the DGC-t-MSV model proposed in Section 2.1 is fitted to the historical stock market data. We choose the most popular index, including S&P, Nasdaq, SSE, SZSE, HSI, FTSE, CAC, DAX, and Nikkei. ese are representative stock indices in America, Europe, and Asia. We collected the daily price from January 2, 2013, to May 15, 2018. en, we calculate 282 weekly data and standardize them. ey can reflect the cross-market volatility between the world's major economies. e S&P and Nasdaq are both major markets in America. e British FTSE, French CAC, and German DAX are known as the three major European stock indices. e SSE and SZSE are the emerging markets which are growing fast. e Nikkei and HSI are both important and developed markets in Asia. e weekly data are used to eliminate the week effects and the different time zones of the global market. e descriptive statistics is shown in Table 1.

Parameter Estimation.
In this paper, Bayesian simulation is performed by the WinBUGs package. Taking S&P index and SSE index as examples, we abandon the first 10,000 iterations as the so-called "burn-in." en, we simulate the last 100,000 iterations to obtain the posterior parameters, as shown in Table 2.
In Table 2, ψ ac represents the volatility spillover from the SSE index to the S&P index. e mean value of ψ ac is less than 0.1, which means the spillover from the SSE to the S&P index is not significant. ψ ca has a mean value of 0.5662, which is greater than 0.1. So the spillover from the S&P to the SSE is significant. e volatility level parameter μ sp of the S&P is 0.0529. And μ sh of the SSE index is 1.012. Obviously, the absolute value of the volatility level μ sh is greater than μ sp , reflecting that the risk of the Shanghai stock market is higher than that of the S&P market. e volatility persistence parameter ψ aa of the S&P index is 0.8737, and ψ cc of the SSE index is 0.7671. e S&P index volatility persistence is stronger than the SSE index. Figure 1 shows that μ sp and μ sh are convergent. Each parameter has a MCMC error of less than 5% of the sample standard deviation (SD). Other parameter results are convergent too. We do not show them in the text due to space limitations. It can be seen from Figure 2 that the dynamic correlation coefficient ρ is higher. All estimated results of volatility spillover parameters are shown in Table 3. We use NA, SP, SH, SZ, HK, JP, UK, FA, and GE to represent Nasdaq, S&P, SSE, SZSE, HSI, Nikkei, FTSE, CAC, and DAX indices.

Bayesian Network.
e volatility spillover relationship is a ring diagram. It does not allow a ring diagram in the Bayesian network. In order to facilitate the research, it is     Complexity 5 necessary to extract the directed acyclic graph from a certain node. is paper uses GeNie software to establish the Bayesian network. GeNie software is one of the commonly used software for Bayesian network simulation. We assume that the initial probability of herd infection between markets is consistent. Based on the significant volatility spillover parameters in Table 2, the relationship between the Nasdaq market and other markets is extracted, as shown in Figure 3.
In ordinary, the infection probability of herd behavior between each market is shown in Figure 3. In Figure 4, we test the spillover effect caused by the Nasdaq market when it has a terrible crisis. We assume that the HK stock market is totally emerging as a herd behavior, as shown in Figure 5. In Figure 5, it can be found that the herd behavior in Hong Kong will cause a large volatility spillover in Asia, generally higher than 80%. e market in Europe and US is not sensitive to the crisis of Hong Kong. It shows that the Asian investors are highly concerned about Hong Kong.

Conclusion
is paper analyzes the volatility spillover using the DGC-t-MSV model and Bayesian network. e above calculation results and the conclusions of the analysis can reflect the current situation of international stock markets, indicating that the method used in this paper is effective.
(1) Analysis of volatility spillover shows that there is an extensive linkage between international markets. Most developed stock markets will quickly respond to abnormal impact in major global stock markets, such as the Hong Kong stock market. e Bayesian network simulation proves that the Hong Kong stock market has a wide range of influence. e Nasdaq and S&P indices reflect the high global influence of the US stock market. erefore, we must pay more attention to the contagious and influential stock markets, such as the Nasdaq and S&P. is result will help investors to understand the volatility correlation between stock markets and explain some impact factors such as crossmarket herd behavior. (2) By establishing a Bayesian network, it can be found that the stock market is more sensitive in one economic region. is paper uses weekly data to avoid the effects of the week and the time difference. It can be found that, in Europe, the British FTSE Index, the French CAC40 Index, and the German DAX30 Index are more closely related. In the Asian market, the Shanghai SSE Index, the Shenzhen SZSE Index, and the Hong Kong HSI Index are more closely related.
is is an obvious phenomenon of regional economics. In general, the spread of herd behavior is related to the regional division.
is result shows that investors should pay more attention to the crisis in the surrounding markets. (3) Using the MSV model and the Bayesian network, it can be found that the Chinese stock market is more closely linked to the foreign stock market, especially the US market. is result can reflect the trading relationship between China and US.
e research in this paper shows that stock investors should avoid some highly correlated markets when they allocate diversified stock assets. ey can lower the risk by choosing the market with lower correlation. e DGC-t-MSV model used in this paper can simulate the impact of multiple random factors on the market. e Bayesian network can clearly reflect the relationship between multiple markets. Further research will use the self-learning method to learn these random factors in the Bayesian network.

Data Availability
e data used to support the findings of this study are included within the article.

Conflicts of Interest
e authors declare there are no conflicts of interest regarding the publication of this paper.