Effective Transfer Entropy Approach to Information Flow Among EPU, Investor Sentiment and Stock Market

In contrast to the traditional view that economic policy affects investor sentiment and eventually causes stock price fluctuations, we reveal that investor sentiment is a reflection of both economic policy and stock market information. This article first proposes an improved ETE method with a sliding window. We verify that this new method can capture the dynamic orders effectively by validating this method with the linear TE method. Furthermore, using the improved method, we investigate the strength and direction of information flow among economic policy uncertainty (EPU), investor sentiment and stock market by the novel concept of dynamic effective transfer entropy. The EPU and investor sentiment results show that EPU influenced investor sentiment mainly from August 2015 to June 2016. Among different policies, China's exchange rate reform policy and “circuit-breaker” policy in the stock market played an important role. Moreover, the analysis of sentiment and stock price returns shows that investor sentiment is more a reflection of changes in stock price returns with a 1-month lag order and that the stock market has a significant bargainer effect and a weaker bandwagon effect. Finally, there is no significant information flow transmission relationship between EPU and stock market volatility, indicating that stock market fluctuations are essentially not affected by national policy fluctuations. Although investor sentiment is affected by changes, such as exchange rate reform and stock market policies, many investors do not form consensus expectations.


INTRODUCTION
Transfer entropy arises from the formulation of conditional mutual information. When conditioning on past values of variables, it quantifies the reduction in uncertainty provided by these past values in predicting the dependent variable, which presents a natural way to model statistical causality between variables in multivariate distributions. In the general formulation, transfer entropy is a model-free statistic that is able to measure the time-directed transfer of information between stochastic variables and therefore provides an asymmetric method to measure information transfer.
The information transfer method has been widely used in the finance field. Kwon & Yang [1] employed it to measure the relationship between equities indices, showing that the information transfer was greatest from the US and toward the Asia Pacific region. In particular, the S&P 500 was shown to be the strongest driver of other stock indices. In earlier and somewhat related work, Marschinski and Kantz [2] defined and used effective transfer entropy to quantify contagion in financial markets. Kyrtsou et al. [3] proposed a Granger causality method based on partial transfer entropy to explore the complex relationships among the S&P 500, VIX and volume. Dimpfl and Peter [4] proposed an appropriate bootstrap to derive confidence bounds and showed in a simulation study that standard linear approaches in economics and finance, such as vector autoregressions and Granger causality tests, are not well-suited to detect information transfer. Garcia-Medina et al. [5] used random matrix theory and information theory to analyze the correlations and flow of information between 64,939 news items from The New York Times and 40 world financial indices over 10 months during the 2015-2016 period. Their results suggested a deep relationship between news and world indices and showed that the news drives world market movement. Sensoy et al. [6] explored the strength of information flow between exchange rates and stock prices by the effective transfer entropy with symbolic encoding methodology. Yang et al. [7] proposed an effective phase transfer entropy method based on the transfer entropy method. These scholars also analyzed the relationship among 9 stock indices from the U.S., Europe and China by using transfer entropy, effective transfer entropy, Rényi transfer entropy, and effective Rényi transfer entropy [8].
Although there are many studies on the correlation between EPU and financial or economic indices, there are few studies on the influence of EPU on investor sentiment. There is also a lack of research on the transmission pathways of the EPU, investor sentiment and stock market.
It is widely considered that national economic policies will pass relevant information to influence investor sentiment, affect investment decisions, and ultimately cause stock price fluctuations. However, the real situation may be more complicated especially in China. Motivated by previous studies, we follow the theorizing on information flow to reveal the transmission path of information among these three variables and to provide more references for macro policy makers.
The rest of this paper is organized as follows. In section Data Description, we describe the time series data used in the models. In section Methodology, we introduce the effective transfer entropy (ETE) method. In section An Improved Effective Transfer Entropy Method Based on a Sliding Window, we propose an improved ETE method based on sliding windows. In section Empirical Results, we present the empirical results of EPU, trade and the exchange rate obtained using the improved ETE model. Finally, we provide the conclusion of this paper.

DATA DESCRIPTION
The economic uncertainty index used in this article is an index compiled by Paul Luk's research team [43] from Hong Kong Baptist University. These authors construct the index using words from 10 Hong Kong newspapers, including Wen Wei Po, Sing Pao, etc. For each newspaper, the research group counts articles containing Chinese words related to economics, uncertainty and policy to formulate the economic policy uncertainty index. The latest data of the index and related papers can be downloaded from the web: https:// economicpolicyuncertaintyinchina.weebly.com/.
The investment sentiment index is constructed with the principal component method based on four underlying proxie, i.e., the relative strength index, the psychological line index, the trading volume and the adjusted turnover rate [40].

METHODOLOGY
We calculate the statistical causality between time series using two different approaches. The first assumes linearity and employs vector autoregressive techniques to estimate the extent to which knowing the driving time series can help predict the dependent series. The second technique compares the difference in mutual information between the independent case and the joint case to describe the success of predicting the dependent series. When predictability is increased by considering the past values of the driving variable, statistical causality is observed.

Linear Causality
We model a time series as autoregressive by expressing its value Y t at time t as a sum of the contributions over m distinct lagged series using the following linear equation: k is a general coefficient term and ε t is the residual.
Linear regression estimates coefficient parameters β (Y) k , which minimize the sum of squared residuals.
To detect whether the values of some second time series X anticipate the future values of Y, we can compare Equation We determine that distribution Y is Granger caused by X if the residual in the second regression is significantly smaller than the residual in the first regression. When this distribution holds, then there must be some information transfer from X to Y. Following Geweke [44], we can represent the information transfer by where we adopt the transfer entropy notation (TE) following Barnett et al. [45], whose result shows Granger causality to be equivalent to transfer entropy for multivariate normal distributions.

Non-linear Causality
To detect non-linear causality, we apply an information-theoretic approach. Equation (3) measures the extent to which the additional information in the lagged variable reduces the variance in the model residuals. Transfer entropy extends this concept by considering the uncertainty instead of the variance. Adopting Shannon's measure of information [46], we can express the uncertainty associated with random variable X by where H(x) is the Shannon entropy of the distribution, and p(x) represents the probability of X = x, which can be conditioned on a second variable to give the conditional entropy: When two random variables share information, the mutual information is given by The entropy of Y conditioned on two variables is and the conditional mutual information is therefore Now, for each lag k, we can describe the information transfer from X t−k to Y t in terms of the following conditional mutual information: This equation represents the resolution of uncertainty in predicting Y when considering the past values of both Y and X compared with considering the past values of Y alone. Considering Equations (5) and (7), we can therefore represent the transfer entropy for a single lag k, which is shown in Equation (9), in terms of four separate joint entropy terms. Following equation (4), these terms may be estimated from the data using a non-parametric density estimation of the probability distributions. For multivariate normal statistics, Equations (9) and (3) coincide [45].

Effective Transfer Entropy (ETE)
It is a feature of the non-parametric estimation of entropy that the absolute scale of the transfer entropy measure has only limited meaning; to detect causality, a relative position must be considered. A simple technique proposed by Marschinski and Kantz [2] is the ETE, derived by subtracting from the observed transfer entropy an average transfer entropy figure calculated over independently shuffled time series, which destroys the temporal order and hence any possible causality. We adopt a shuffling approach producing 50 null-hypothesis transfer entropy values from independently shuffled time series over the same domain containing no causality. By calculating the mean and standard deviation of the shuffled transfer entropy figures, we estimate the significance of a causal result as the distance between the result and the average shuffled result standardized by the shuffled standard deviation: where TE shuffle is the mean of the shuffled values, and σ shuffle is the standard deviation. The shuffling of the time series destroys temporality and should ensure that the mean is approximately zero; therefore, the spread of the data dictates the significance of the result. Assuming that the distribution is close to Gaussian, we can say that a result with Z > 3 is roughly in the top 1% of results and hence is comparable to a p-value of 0.01. The nature of the method typically enables clearer significance to be observed with fewer shuffles, even without a strict Gaussian distribution; thus, this method is computationally more attractive than the p-value. This expression corresponds to the degree to which the result lies in the right tail of the distribution of the zerocausality shuffled samples and hence how unlikely the result is due to chance. Therefore, the Z-score figure represents the significance of the excess transfer entropy in the unshuffled case. We compute the Z-score in Equation (10) for both linear and non-linear results.

Improved Method Based on a Sliding Window and Comparison With a Traditional Linear Method
Keskin and Aste [47] validated that the non-linear TE method would be useful for detecting a non-linear process. However, the lag order they found was global and unique and thus was unsuitable for capturing the accurate order between two non-stationary series. For non-stationary time series, the data structure changes over time, which means that the causal relationships also evolve dynamically. In addition, due to policy or unexpected events, the causal structure of real financial sequences tends to change over time. Therefore, it would be inaccurate to use a single k to measure global causality.
Considering that the locality of non-stationary data may be stationary or approximately stationary, this paper proposes an improved transfer entropy method based on a sliding window to solve the influence of a non-stationary data structure on traditional transfer entropy. The improved method calculates the transfer entropy as described in section Nonlinear Causality but is limited to a certain time segment. Through forward scrolling, the transfer entropy at each time point is obtained, and the causal relationship between the two times series can be revealed. In addition to its ability to capture the structural changes between two time series, the improved method can help us trace the specific time period of the structural change, which cannot be achieved using the traditional linear TE method. We next verify the validity of the algorithm.
First, we generate a time series X following the geometric Brownian motion according to Equation (11) as follows: where η t is a noise obeying the standard normal distribution, η t ∼ N(0, 1), and µ and σ represent the drift coefficient and the diffusion coefficient, respectively. Y depends on X, and the equation is constructed as follows ( Equation 12): where X ′ t−k is another time series generated according to Equation (11). k is the given lag order, and α ∈ (0, 1) determines the dependence strength between the series Y and X, i.e., the values of the transfer entropy.
As shown in Figure 2, for a correlation series with a single lag structure, both the traditional transfer entropy, i.e., the linear TE, and the improved TE method can capture the lag order accurately. However, according to the Z-score significance test, we can observe that when the temporal order is destroyed, the linear TE does not show significance in the relevant order; thus, the linear TE method depends on time evolution. As shown in Figure 3, the linear TE could only identify the order k = 4, which is the highest corresponding transfer entropy value (Z-score indicates that the value is above a significant level). However, the improved TE could detect both k = 4 and k = 5. Moreover, as shown in Figure 4, we can also track the specific time period during which the lead-lag order fluctuates with the improved method. We These new series show obvious structure fluctuations, and the features are more consistent with the characteristics of real financial data.
Due to the shortcomings of traditional linear methods in revealing dynamic orders, in the empirical analysis in section Empirical Results, we apply the improved transfer entropy to explore the information flow between all sequences. The sliding window length of all structures is 36 months with a forward step size of 1 month.

Comparison With the Granger Causality Test
The Granger causality test is essentially a test used to determine whether a lagging variable can be introduced into an equation containing other variables. If a variable is affected by the lag of other variables, the variables are considered to have   Granger causality. For the sequences X and Y, using different lag orders, we obtain the causality test results of the two sequences ( Table 1).

Granger causality is a regression-based interpretation of
Wiener's causality definition [48]. In this section, the Granger causality test is employed as a comparison with the improved TE to detect the true lag orders. Following Granger's work [49], we model the Granger causality test with the following two regression equations: where X denotes the object needed to find the Granger cause, Y denotes the object needed to determine whether it can Granger cause X, and residuals u t and v t are assumed to be mutually independent and individually distributed with a zero mean and constant variance. These equations were tested using the following hypothesis:  The F − test can be expressed as follows: where RSS 0 is the residual sum of squares of Equation (13), RSS 1 is the residual sum of squares of Equation (14), n is the number of observations, and p is a lag value. We reject the hypothesis H 0 and accept that Y is a Granger cause of X if and only if F > F(p, n − 2p − 1). The model order p can be determined by minimizing the AIC [50], which is defined as follows: where σ is the estimated noise covariance, m is the dimension of the stochastic process andn is the length of the data window used to estimate the model. For example, to detect the causal relationship from exports to US EPU, Y should be set to the exports sequence, while X should be set to the US EPU sequence. In contrast, Y should be set to the US EPU before detecting the causal relationship between US EPU and the exports. The Granger causality test based on the sliding window method can also obtain the order and significance of two series' correlation. Using Y and X as an example, we elaborate upon the processes of the Granger model estimation within a fixed window as follows: (a) The maximum of the lag value p is set to a fixed number, such as 10. (b) By calculating the total AIC of Equations (13) and (14) by traversing the p value from 1 to 10, we obtain the corresponding p of the minimum AIC. The experimental results show that the optimal p is 5. (c) Equations (13) and (14) are estimated by OLS with p = 5. (d) F and F(p, n − 2p − 1) are calculated according to Equation (15). The results show that F = 4.0635 and F(p, n−2p−1) = 3.8549 (at the 99% confidence level). (e) If F>F(p,n-2p−1), we conclude that Y can significantly Granger cause X. (f) The window is moved forward by a 1-month step, and steps (a-e) are repeated.
Using the process described above, we obtained the Granger causality test results based on a window length W = 36 ( Figure 5A). As shown in Figure 5A, although the Granger causality test can identify k = 2, it cannot effectively capture the two orders of 4 and 5. Using k = 4 cannot pass the significance test; although using k = 5 can pass the significance test, there may be other orders, such as k = 8. The improved TE method can accurately identify three different orders ( Figure 5B). In addition, the stage during which the order jumps cannot pass the significance test.

EMPIRICAL RESULTS
Since traditional linear methods cannot identify dynamic orders between time series or track specific lead-lag orders when structural fluctuations occur, we apply the improved transfer entropy to explore the information flow among EPU, investor sentiment and the stock market.

EPU and Investor Sentiment
Based on the dynamic TE method, we analyze the causal relationship between EPU and investor sentiment. As shown in Frontiers in Physics | www.frontiersin.org Figure 6A, there is an obvious dynamic order in the correlation between EPU and investor sentiment. As shown in Figure 6C, a Z-score > 3 is mainly located in August 2015-June 2016. This means that during this time period, EPU had a significant impact on investor sentiment, and uncertain information about national economic policies significantly affected investor sentiment. From Figure 6B, it can also be seen that in this stage, the EPU's transfer entropy to investor sentiment was significantly higher than the impact of investor sentiment on EPU.
The impact on investor sentiment is related to the nature of the policy, i.e., whether the policy is a domestic policy or a foreign policy. During this period, China's economic policy involved the following two important measures: a change in the CNY fixing mechanism and the launch of the "circuit-breaker" mechanism.
On August 11, 2015, the central bank made more reference to the closing price of the previous day in the daily CNY-USD mid-price quotation formation mechanism. This change makes the method of forming the middle price more marketoriented, which more closely reflects the actual supply-demand relationship of the market compared to the previous method.
The circuit-breaker benchmark index is the CSI 300 Index, which uses two thresholds of 5 and 7%. When the CSI 300 Index triggers a 5% breaking threshold, the three exchanges suspend trading for 15 min, and if the 5% is triggered late in the day or 7% is triggered at any time throughout the day, trading is suspended until the market closes. From January 4th to January 7th, the breaking mechanism was implemented for only 3 days, and it became the shortest-lived stock market policy in the history of Chinese securities. This policy uncertainty had a great impact on investor sentiment.
Before August 2015, there were incidents such as the bankruptcy of Lehman Brothers (September 2008), the downgrade of the US sovereign credit rating (August 2011), and the European debt crisis (January 2011-January 2014). However, probably because these events did not occur in China, their impact on consumer sentiment was not significant.

Investment Sentiment Index and the Stock Market
The correlation between sentiment and stock price returns is illustrated in Figure 7. As shown in Figure 7C, the impact of sentiment on stock returns is non-significant; in contrast, the fluctuation in stock price returns has a significant impact on investor sentiment throughout the time period. This shows that in the Chinese stock market, using emotions to predict changes in stock prices is useless, and investor sentiment is more a lagging reflection of stock price returns. Figure 7A shows that the lag time is approximately 1 month. Our results further verify the long-term correlation characteristics suggesting that investor sentiment is mainly affected by fluctuation in the market, which may be related to the existence of cyclical fluctuations in the market and futures arbitrage [40].
The study conducted by Brown and Cliff [29,51] revealed that the bandwagon effect and bargain shopper effect can offset each other, reducing the predictability of stock returns. The bandwagon effect indicates that higher investor sentiment could increase the stock price, which is reflected in the positive correlation between stock prices and sentiment during the same period; in contrast, the bargain shopper effect indicates that investors optimistically believe the shares at a relatively low price represent a purchase opportunity; therefore, their sentiment negatively changes the returns.
The bargain shopper and bandwagon effect make it difficult to explore the causality between investor sentiment and stock returns. In our analysis results, the bandwagon effect is weaker, and the bargain shopper effect is more significant. The bandwagon effect reflects the herd effect of investors. This effect makes the stock market prone to sudden rises and falls in the short term; it cannot reflect the true value of a company and is not conducive to the healthy and stable development of the stock market.

EPU and Stock Market
If investor sentiment has a significant impact on the stock price, then according to our expectations, national policy information will be transmitted to the stock price through investors' expectations and eventually cause stock price fluctuations; in other words, EPU also has some kind of information transmission relationship with the stock price. However, the results now show that both stock price fluctuations and EPU have an effect on investor sentiment and are not affected by investor sentiment. Therefore, either the stock price fluctuations and EPU have a weak information transmission effect or there is a mutually offsetting effect.
To further verify our assumptions, we explore the information transfer relationship between EPU and stock price returns (Figure 8). As shown from the results of Figure 8C, there are only a few discontinuous time points with a Z-score > 3 in the entire event period. Overall, the information transmitted by the EPU to the stock market is non-significant; in other words, the EPU has no obvious information transmission relationship with the stock market.
A considerable number of related studies showed that the stock market and EPU are significantly negatively correlated [11,12,21,52]. Regarding the relationship between China's EPU and the stock market, Chen and Chiang [21] also verified that the stock returns in China are negatively correlated with EPU. Notably, the main correlation revealed by Chen and Chiang based on the GARCH method is the overall correlation between sequences. However, we reveal a time-varying relationship between sequences based on non-linear methods. As shown in Figure 8C, it can be concluded that in the short term, China's EPU also significantly impacts the stock market during the period from 2011 to 2012 and in 2016, but in the long run, this effect is generally not significant.

DISCUSSION
According to the efficient market hypothesis theory, an efficient market ( Figure 9A) should reflect all changes in information, including regular investor sentiment changes and shocking policy fluctuations. Therefore, the information flow should flow from the EPU and investor sentiment to the stock market. In addition, since policy shocks often affect sentiment in the short term, information flow should flow from policy to sentiment, but this is uncertain.
The results show that the Shanghai Stock market is not yet an efficient market ( Figure 9B) and cannot reflect information from regular investment and low-frequency policy shocks. Therefore, investors can reap potential excess profits through operations. Furthermore, the stock market cannot form an effective path to reflect investor sentiment information; thus, in the long run, EPU cannot affect the stock market.
Compared with the market and policy factors, investor sentiment has a certain lag (Figure 9B), reflecting the volatility information of the two. Therefore, we should consider policy factors when studying the construction of investor sentiment indicators, which is rarely investigated in research concerning the factors affecting investor sentiment.

CONCLUSION
A widely accepted fact is that economic policy affects investor sentiment and will be ultimately reflected in the stock market through investment decisions, causing stock price volatility. Therefore, is this really the case?
Since traditional linear methods cannot identify the dynamic orders between time series and are unable to track specific lead-lag orders when structural fluctuations occur, we proposed an improved transfer entropy method based on a sliding window. By comparing with the linear ETE method and Granger causality method, we verify the effectiveness of the improved method. The main advantages of this methodology are the easy implementation-interpretation by non-parametricity to capture the non-linear dynamics and the point in time when the structure changes. Therefore, this method is considered a nice and promising alternative to the standard measures. We further employ this improved method to examine the information flow among EPU, investor sentiment and stock market.
The results of the information flow analysis of EPU and investment sentiment show that EPU influenced investor sentiment mainly from August 2015 to June 2016. Among different policies, China's exchange rate reform policy and "circuit-breaker" policy have played an important role. For other time periods, there are also points in time when policies were highly uncertain, such as the bankruptcy of Lehman Brothers (September 2008), the downgrade of the US sovereign credit rating (August 2011), and the European debt crisis (January 2011-January 2014). However, likely because these events did not occur in China, their impact on consumer sentiment was non-significant.
The analysis of the information flow between sentiment and stock price returns shows that the impact of sentiment on returns is non-significant, while the fluctuation in stock price returns has a significant impact on investor sentiment. Therefore, using emotions to predict changes in stock prices is valueless. Investor sentiment is more a reflection of changes in stock price returns with a 1-month lag order. The results show that in the Chinese stock market, the bargainer effect is more significant and the bandwagon effect is weaker.
There is no direct information flow from EPU to stock market, and according to our previous analysis, there is no indirect information flow through which EPU transmits information to the stock market through investor sentiment. Therefore, stock market fluctuations are basically not affected by national policy fluctuations. Although investor sentiment is affected by changes such as exchange rate reform and stock market policies, this effect is reflected only at the emotional level. Many investors can digest and neutralize extreme emotions. Therefore, a final consensus is not easy to form.

DATA AVAILABILITY STATEMENT
All datasets generated for this study are included in the article/supplementary material.