# Dynamic Cross-Correlation between Online Sentiment and Stock Market Performance: A Global View

Authors: Kewei Xu; Yuanyuan Pang; Jiatong Han
Journal: Discrete Dynamics in Nature and Society
 (2021)

---

## Abstract

This paper focuses on investigating the dynamic cross-correlation relationship between online sentiment and returns of major global stock markets based on the MF-DCCA method. We use Daily Happiness (DHS), an index derived from Twitter posts through textual analysis as a proxy of online sentiment. By dividing the global financial markets into developed and developing ones, we are able to test the heterogeneous relationship between stock market performance and sentiment at different economic developing level. Empirical results show that there exists a power-law cross-correlation relationship between financial market and online sentiment in some developed countries and all developing countries, and the relationship is more stable in the developing countries. Moreover, we apply rolling window analysis to capture the dynamic evolution characteristics and find the relationship has a strong consistency over time. Our work provides a much more delicate perspective to test the relationship between online sentiment and financial markets performance and enriches the existing literature.


---

## Body

## 1. Introduction

Investor behavior in financial market cannot be fully explained by classical financial theory under the hypothesis of completely rational person. The behavioral financial theory takes human behavioral bias including limited investor attention [1–3] and emotional behavior into consideration, guiding researchers to examine the relationship between sentiment and financial market performance. Various proxies have been come up with the aim of capturing sentiment precisely, including closed-end fund discount [4, 5], indices extracted from financial and market indicators [6], and indices generated by textual analysis through either financial newspapers [7] or social media [8, 9]. Compared with others, the sentiment indicator, based on social media information, is exogenous to financial markets and can be acquired at high frequencies, making it practical in sentiment study.The interaction between media sentiment and stock market activity began to draw widespread attention since Tetlock [7] found that the emotional orientation of Wall Street Journal content has the function of predicting board movements of stock market, and high media pessimism reveals a downward price pressure on stock market. Alanyali [8] did a similar research based on Financial Times press issues. With the rapid development of modern technology, social media contains not only newspapers but also Internet social platforms, making capturing social media sentiment through Internet search engine data possible. Various proxies have been employed to represent online sentiment, and these sentiment proxies can be based on Facebook posts [9, 10], Google search [11, 12], or Baidu search index [13, 14]. In particular, Bollen et al. [15] analyze the text content of daily Twitter and found that the sentiment index derived from Twitter is correlated with Dow Jones Industrial Average over time. Another widely used sentiment indicator based on Twitter posts is Daily Happiness Index (DHS), an index extracted from 10% of all tweets using textual analysis. DHS is derived from the worldwide social media Twitter with millions of thousands of users, and the massive users around the world ensure the rationality of using DHS to measure online sentiment. Compared with the sentiment index extracted from financial market, DHS provides a broader horizon of sentiment. In fact, a strand of recent papers have documented a link between sentiment proxies strictly exogenous to financial markets and stock returns, including the loss of sports games [16], morning sunshine [17], TV program [18], and even sunspots and the stars [19]. Meanwhile, DHS is strictly exogenous to the financial market and avoids the endogenous problems that may arise later. The existing literature using DHS as a sentiment proxy mainly focuses either on the linear relationship between sentiment and stock market performance [20–22] or on the lead-lag Granger causality relationship in developed financial markets [23]. These research methods have shortcomings in capturing the microdynamic changes and nonlinear relationship between sentiment and stock market performance. A more simulation model is urgently needed to generate more pervasive and accurate profile of sentiment.Deepening of globalization not only enables people from different countries to share messages via the same social media, but also makes financial markets worldwide connect with each other [24–27] more intensely. Thus, it is of great importance to characterize the correlation between online sentiment and financial market performance in a worldwide perspective and further study the heterogeneity of the relationship between sentiment and different markets. In this paper, we investigate the cross-correlation between online sentiment and returns of major global financial markets. Specifically, we choose Daily Happiness (DHS) as the exogenous proxy for online sentiment and characterize the nonlinear relationship between sentiment and stock market returns dynamically through MF-DCCA, which has been proved to be practical in simulating multifractal features of financial market.Our research may contribute to the existing literature in two ways: On one hand, we characterize the dynamic relationship between online sentiment and stock market return using MF-DCCA, and the cross-correlation between the two is distinguished in different wavebands. Thus, a much more delicate perspective has been found to test the relationship between sentiment and financial markets. On the other hand, previous researches mainly use DHS as a sentiment proxy of either the US market [7] or other individual market [9,10]. In this paper, we divide the global stock market into subsamples according to the economic development level and compare the similarities and differences of the cross-correlation relationship between online sentiment and stock market performance.The rest of the paper is organized as follows.Section 2 introduces the model and methodology, Section 3 describes the data in this study, Section 4 presents the empirical results, and Section 5 concludes the paper.


## 2. Methodology

We mainly follow the rationale of Zhou [27], using MF-DCCA (multifractal detrended cross-correlation analysis) model to assume the dynamic relationship between online sentiment and stock market. MF-DCCA model is a Frontier approach to measure nonlinear and unstable correlations. This research branch is originated from [28], in which DEA model is proposed and gradually became the most widely used nonlinear analyzed method. Subsequent studies continue to optimize DEA model [29–31]. Podobnik and Stanley [32] creatively apply DEA to the long-range cross-correlation analysis of two nonstationary series and construct a new method named DCCA. On this basis, Zhou [27] added multifractal function method into DCCA and proposed MF-DCCA. MF-DCCA has advantages in fitting nonlinearity and multifractals in the cross-correlation between time series in the financial market and has been widely used [32–38].For any two equal-time series of lengthNxi, yi, i=1,2,…,N, there are five main steps to construct MF-DCCA algorithm.Step 1. Construct two accumulated differential sequences as profiles:(1)Xt=∑k=1txk−x¯,Yt=∑k=1tyk−y¯,t=1,2,…,N,x¯=1N∑k=1Nxk,y¯=1N∑k=1Nyk,wherex¯ and y¯ are the mean values of the time series, respectively.Step 2. Divide Xt and Yt into Ns=intN/s nonoverlapping segments of equal lengths s. Notably, N is often difficult to maintain as an integer multiple of s, which will cause the part of the end of the sequence that is less than s to be discarded by calculating intN/s. To solve this, we perform the same segmentation process from the end forward again and finally get 2 Ns nonoverlapping parts containing all the information in the original time series.Step 3. For each segment, evaluate the local trend with least squares fit, and then calculate the difference between the original time series and the fitting polynomial to get the detrended covariance.For segmentλ=1,2,…,Ns,(2)F2s,λ=1s∑k=1sXλ−1s+kk−Xλ˜kYλ−1s+kk−Yλ˜k.For the flashback segmentλ=Ns+1,Ns+2,…,2Ns,(3)F2s,λ=1s∑k=1sXN−λ−Ns+kk−Xλ˜kYN−λ−Ns+kk−Yλ˜k.Step 4. Take the average value of all the detrended covariances to obtain the q-order fluctuation function.For anyq≠0,(4)Fqs=12Ns∑λ=12NsF2s,λq/21/q.For anyq=0,(5)Fqs=exp14Ns∑λ=12NsF2s,λ.It is worth noting that MF-DCCA degenerates to the conventional DCCA method whenq=2.Step 5. Draw a log-log graph with Fqs set as the y axis and s as the x axis, and observe the trends at different scales. Specifically, there exists a power-law cross-correlation relationship of the following form if the two series have long-range cross-correlation:(6)Fqs∽sHxyq,where the scaling exponentHxyq for each q can be obtained by observing the slope of the log–log plots of Fqs versus s through ordinary least squares.Hxyq<0.5 reveals that the two series fluctuate towards the opposite direction. On the contrary, when Hxyq>0.5, there is a positive cross-correlation between the two sequences; that is, when one sequence fluctuates in the positive direction, the other will also fluctuate in the same direction. No significant cross-correlation relationship exists ifHxyq=0.5. If q=2, MF-DCCA collapses to DCCA, and the exponent Hxyq is equivalent to the generalized Hurst exponent.


## 3. Data

We use the Daily Happiness Index (DHS) extracted from Twitter as a proxy for online sentiment in accordance with previous literature [20–23]. DHS is compiled by Hedonometer using Amazon’s Mechanical Turk service and natural language text analysis algorithm (For more details on DHS, see http://hedonometer.org/index.html). DHS conveys 10% of all daily Twitter information (Nearly 50 million text messages). Massive real social data ensure the authority of DHS in measuring the online sentiment. We obtain DHS index from September 10th, 2008, to August 31st, 2019.We use market size and trading volume as the basis for selecting representative financial markets in this study. Our empirical sample includes the world’s top 20 stock market daily data indices, covering Asian, European, and American main stock exchanges. Among these 20 indices, S & P500, NASDAQ, and Dow Jones Industrial Average and other four indices are all from USA. We choose the two highest-ranked indices, S & P 500 and NASDAQ as representatives in order to solve multicollinearity between indices. Meanwhile, we drop Shanghai Composite Index from our sample because Twitter is prohibited in Chinese Mainland, and DHS cannot reflect the online sentiment of local Chinese mainland effectively. Our final sample is, thus, containing 11 stock market indices of 10 countries in total (All stock market data used in this paper are from YAHOO! Finance:http://finance.yahoo.com). The developed markets include the United States (S & P500 and NASDAQ), the United Kingdom (FTSE), Germany (DAX), France (FCHI), Japan (Nikkei), and South Korea (KOSPI), and the developing countries include Brazil (BVSP), Mexico (MXX), India (BSE), and Indonesia (JKSE), respectively. The time interval is from September 10th, 2008, to August 31st, 2019, and nonsynchronized time period data is excluded in each group to ensure comparability. Table 1 presents daily summary statistics of return (%) of each financial market indices in our final sample, whereas Figure 1 depicts the trend for DHS.Table 1
Descriptive statistics: DHS and return (%) of financial market indices.
Obs.MeanStd.Min25%Median75%MaxDHS40026.0210.0465.7745.9876.0206.0536.357S & P50027580.0401.242−9.035−0.3740.0650.55111.580NASDAQ27580.0561.341−9.142−0.4550.0960.68111.806FTSE26630.0170.904−4.838−0.4340.0240.5153.840DAX26400.0331.406−7.073−0.5650.0690.67511.402FCHI27870.0201.421−9.037−0.6180.0370.68611.176Nikkei26440.0311.548−11.406−0.6590.0680.81114.150KOSPI26480.0221.182−10.571−0.4600.0400.58611.946BVSP26400.0371.707−11.393−0.8460.0300.90414.656MXX27260.0251.162−7.008−0.5100.0360.57311.005BSE27340.0391.278−10.956−0.5560.0550.63517.339JKSE27360.0601.248−10.690−0.4780.1000.6407.640Figure 1
Evolution of daily happiness index during 2008–2019.This table shows the descriptive statistics for our sentiment indicator-DHS and 11 major global market index returns, including the United States (S & P500 and NASDAQ), the United Kingdom (FTSE), Germany (DAX), France (FCHI), Japan (Nikkei), and South Korea (KOSPI), and the developing countries include Brazil (BVSP), Mexico (MXX), India (BSE), and Indonesia (JKSE), respectively. Mean represents the mean value of each variable, while Std. stands for standard deviation. We also report the quartile of each variable. Figures are expressed in percentage.


## 4. Empirical Results

### 4.1. Cross-Correlation Test

It is necessary to verify whether there is a cross-correlation between online sentiment and stock market returns before using MF-DCCA for dynamic cross-correlation analysis. Following previous studies [29, 30, 34, 35], we employ Qcc statistic test to quantitatively measure the cross-correlations between online sentiment and stock market returns. The cross-correlation statistic Qcc between the time series xi and yi is defined as(7)Qccm=N2∑i=1mci2N−i,where their cross-correlation function is shown as follows:(8)ci=∑k=i+1Nreturnkdhsk−i∑k=1Nreturnk2∑k=1Ndhsk2.According to Podobnik and Stanley [29], the cross-correlation statistic Qccm is approximately χ2m distributed with m degrees of freedom. The null hypothesis of χ2 test is that there is no cross-correlation between the two series. In other words, if the statistic Qccm is larger than the critical value of Chi-Square test, the null hypothesis is rejected, indicating that two series are cross-correlated.Figure2 shows the cross-correlation test result between stock market returns and online sentiment measured by DHS in developed countries, while Figure 3 exhibits the test results in the developing ones. The horizontal axis indicates the degrees of freedom m after the natural logarithm, and the vertical axis is the statistic Qccm. Full line marked with circles is the cross-correlation statistics of online sentiment and the corresponding financial market. Full line representing the critical value of the χ2m distribution Qccm with m degrees of freedom at the 5% significance level is shown as comparison. We set freedom m ranging from 1 to 1500.Figure 2
The cross-correlation statistics between online sentiment (DHS) and stock market return in developed countries: (a) US: SP500, (b) US: Nasdaq, (c) Japan: Nikkei, (d) Korea: KOSPI, (e) Germany: DAX, and (f) UK: FTSE.
(a)(b)(c)(d)(e)(f)Figure 3
The cross-correlation statistics between online sentiment (DHS) and stock market return in developing countries: (a) Brazil: BVSP, (b) Indonesia: JKSE, (c) Mexico: MXX, and (d) India: BSE.
(a)(b)(c)(d)The results in Figure2 show that, in the United States, Japan, and Germany, the cross-correlation statistics Qccm of these four financial markets are all lager than the critical value regardless of degrees of freedom, suggesting a significant cross-correlation between online sentiment and financial market return in these countries. As to the other two developed countries, South Korea and UK, the cross-correlation statistics Qccm are quite close to or even lower than the critical value of χ2m distribution at 5% significant level under large degrees of freedom. The empirical results show that, in the developed countries, the relationship between online sentiment and stock market return is heterogeneous. When it comes to the developing countries, we can see that, in Figure 3, the cross-correlation statistics Qccm are all higher than the critical value. To sum up, the cross-correlation between online sentiment and financial market return is stronger in the developing countries compared with that in the developed ones. The empirical results provide a complementary to Zhang et al. [21] by analyzing the different dynamic correlations between financial markets and sentiment in developing and developed countries, respectively. In addition, compared with Da et al. [11, 12], we are concerned about the cross-correlation rather than linear relationship between online sentiment and stock market performance.


### 4.2. MF-DCCA

In theQccm test of cross-correlation, South Korea, UK, and France cannot reject the null hypothesis; that is, there is insufficient evidence to prove that there is a significant cross-correlation between financial market return and the online sentiment measured by DHS index. The other seven countries reject the null hypothesis, confirming a significant cross-correlation between financial market return and online sentiment. The cross-correlation test based on the statistics Qccm gives a clue for the presence of cross-correlation qualitatively. In this part, we try to test the cross-correlations quantitatively by estimating the cross-correlation exponent using MF-DCCA method.In this paper, the range of the slitting lengths is set to 10<s<N/4 (N is the length of the financial market return sequence in each group), and the fluctuation function order q is set to be ranging from −10 to 10. The corresponding online sentiment sequence belongs to the small-band sequence when q<0; otherwise, it belongs to the large-band sequence. Figure 4 shows the log–log plots of logFqs versus logs as q=−10,−9,…,9,10 for the fluctuation function of financial markets and investor sentiment in both developed countries(left side) and developing ones (right side). It can be seen that all curves belonging to 8 financial markets overall present an obvious linear trend despite the fluctuation with the changes of different interval length s. The empirical results demonstrate that there is a significant power-law cross-correlation between financial markets and online sentiment.Figure 4
Log-log plots oflogFqs versus logs for the developed (developing) financial markets return and online sentiment: (a) US: SP500, (b) US: Nasdaq, (c) Brazil: BVSP, (d) Indonesia: JKSE, (e) Japan: Nikkei, (f) Germany: DAX, (g) Mexico: MXX, and (h) India: BSE.
(a)(b)(c)(d)(e)(f)(g)(h)In Figure4, the fluctuation function of financial market returns and online sentiment in various countries shows a relatively stable trend before logs∗, and after that, the trend changed significantly. s∗ is the “crossover” defined by Podobnik et al. [32]. We use the crossover to divide the cross-correlation between two sequences into short-term relationships (when s<s∗) and long-term relationships (when s>s∗). Specifically, in the developed countries, the “crossover” of the cross-correlation relationship between the market return of S & P500 (USA), NASDAQ (USA), Nikkei225 (Japan), and DAX (German) and online sentiment occurs at about 245 days, 255 days, 95 days, and 102 days, respectively. Among the developing countries, the “crossover” of the cross-correlation between the return of the BVSP (Brazil), JKSE (Indonesia), MXX (Mexico), BSE (India), and online sentiment is at about 79 days, 96 days, 61 days, and 161 days, respectively.We further construct the scaling exponentHxyq of the fluctuation function between the return of each financial market and online sentiment under different time length s and different order q, so as to explore the heterogeneity of markets in different countries. Table 2 shows the average value of scaling cross-correlation exponents Hxyq in the developed countries and developing countries under different order q for long term S>S∗ and short term S<S∗. As is shown, when q=2, Hxy2 are all greater than 0.5 in different countries, proving a strong positive cross-correlation between financial market return and online sentiment. In other words, financial market returns tend to change in the same direction as online sentiment measured by DHS does. However, it is also noteworthy that, in our sample, the fluctuation scaling exponent Hxyq in the developed countries is smaller than that in the developing countries. In addition, in the developed countries, Hxyq is close to 0.5 Hxy2=0.5564 in the short term (when s<s∗), which means that the degree of synergy between the financial markets and online sentiment is low.Table 2
Average value of scaling cross-correlation exponentsHxyq for the stock market returns and online sentiment in developed and developing countries.
QDeveloped countriesDeveloping countriesS<S∗S>S∗S<S∗S>S∗−100.66300.85550.80451.0520−90.65620.85200.79761.0478−80.64870.84820.78991.0432−70.64050.84410.78141.0383−60.63170.83960.77231.0329−50.62220.83460.76261.0270−40.61210.82890.75261.0202−30.60140.82180.74241.0119−20.59000.81250.73201.0012−10.57820.79970.72200.986400.56680.78160.71410.965610.55830.75690.71300.935620.55640.72490.72700.893230.56280.68730.75880.838440.57380.64850.79620.778850.58380.61240.82610.723560.59010.58140.84530.676770.59310.55570.85640.638880.59370.53490.86220.608390.59280.51790.86480.5839100.59120.50400.86570.5640ΔH (q < 0)0.08480.05590.08250.0656ΔH (q > 0)0.03540.25280.15260.3716ΔH (all)0.10660.35150.15260.4880To further study the multifractal nature of the cross-correlation coefficient between financial market and online sentiment, we calculate the degree of multifractalΔHq under different wavebands:(9)ΔHq=maxHq−minHq.The greater theΔHq is, the greater the degree of multifractal is. The last three rows of Table 2 show the crossover between the two under different order q. Overall, the fractal degree of the cross-correlation between financial market and online sentiment in the developing countries is significantly greater than that in the developed countries. The empirical results show that the relationship between financial market return and online sentiment is more stable in the developed countries, whereas they have weaker cross-correlation relationship compared with the developing countries. It is easy to conclude that although the cross-correlation between the return of financial markets and online sentiment in developing countries is stronger, the volatility is also greater, and the relationship is more unstable.Considering different wavebands (q < 0 or q > 0), the degree of fractal in the small waveband (q < 0) of financial markets and online sentiment in developing countries is significantly smaller than that in the large waveband (q > 0). This supplement shows that, in the developing countries, the cross-correlation between financial markets and online sentiment is more stable in small wave band.This finding is consistent with most studies except Zhang et al. [40], whose work proves that, in the long run, the relationship between internet activity and Chinese market volatility is more accurate. This may partially be due to the difference between China and our sample countries in financial market composition as well as internet development level.


### 4.3. Rolling Windows Discussion

Grech and Mazur [39] argued that the exponent at a given time depends on the time-window length. To rule out the impact of time-window length, we redo the empirical test using MF-DCCA based on rolling windows. MF-DCCA based on rolling window is practical in capturing the dynamic evolution characteristics of the cross-correlation relationship between the financial market of various countries and the online sentiment measured by DHS. Following Wang et al. (2010), we set one year (about 250 trading days) as the time interval and 1 trading day as the step size of the rolling window. Figures 5 and 6 are the results of cross-correlation relationship between financial market return and online sentiment through rolling window test.Figure 5
The dynamic evolution of the cross-correlation between financial market return and online sentiment in developed countries (q = 2): (a) US: SP500, (b) US: Nasdaq, (c) Japan: Nikkei, and (d) Germany: DAX.
(a)(b)(c)(d)Figure 6
The dynamic evolution of the cross-correlation between financial market return and online sentiment in developing countries (q = 2): (a) Brazil: BRL, (b) Indonesia: Jakarta, (c) Mexico: MXX, (d) India: BSE.
(a)(b)(c)(d)It can be seen from the figures that the cross-correlation relationship between financial market returns and online sentiment shows strong consistency over time, and this finding applies to all countries. Moreover, the cross-correlation relationship has declined rapidly with the short sharp drop of the global financial market at the end of 2015. The scaling exponentHxy2 of some countries even fell below the critical value, which indicates that the cross-correlation relationship between financial market return and online sentiment can be affected by macroeconomic environment and even changed from positive to negative.Table3 shows the statistical characteristics of the dynamic cross-correlation between financial market returns and online sentiment in various countries. Overall, the averages of scaling exponent index Hxy2 are all greater than 0.5 regardless of the nationality, giving a clue that the financial markets and online sentiment generally show a positive cross-correlation worldwide. Besides, the standard deviation of the Hxy2 of the developing markets is generally larger than that of the developed country markets; this implies that financial markets in the developing countries tend to fluctuate more and more easily be affected by online sentiment, and this situation has improved in the developed countries. Zhang et al. [20] focus on testing whether there exists the linear or nonlinear Granger causality between sentiment and major financial markets returns, and they find out a strong relationship in the USA, but in the Middle East and North Africa, there only exists one direction Granger causality pattern from DHS to market returns. Different from theirs, we find evidence that the developing countries tend to be fluctuated more intensely by online sentiment; this may be because we focus on dynamic correlations, while Zhang et al. [23] were concerned with causality relationship between sentiment and financial market performance.Table 3
Statistical characteristics of dynamic cross-correlation between financial markets return and online sentiment.
MeanStdMinMaxS & P5000.66840.08480.45950.8569NASDAQ0.67050.07460.46480.8347Nikkei0.68780.06380.50270.8514DAX0.67390.06270.48690.8128BVSP0.67980.08340.42910.8728JKSE0.64480.08130.41970.8478MXX0.64500.07630.40230.8317BSE0.66850.06500.50110.8104


## 4.1. Cross-Correlation Test

It is necessary to verify whether there is a cross-correlation between online sentiment and stock market returns before using MF-DCCA for dynamic cross-correlation analysis. Following previous studies [29, 30, 34, 35], we employ Qcc statistic test to quantitatively measure the cross-correlations between online sentiment and stock market returns. The cross-correlation statistic Qcc between the time series xi and yi is defined as(7)Qccm=N2∑i=1mci2N−i,where their cross-correlation function is shown as follows:(8)ci=∑k=i+1Nreturnkdhsk−i∑k=1Nreturnk2∑k=1Ndhsk2.According to Podobnik and Stanley [29], the cross-correlation statistic Qccm is approximately χ2m distributed with m degrees of freedom. The null hypothesis of χ2 test is that there is no cross-correlation between the two series. In other words, if the statistic Qccm is larger than the critical value of Chi-Square test, the null hypothesis is rejected, indicating that two series are cross-correlated.Figure2 shows the cross-correlation test result between stock market returns and online sentiment measured by DHS in developed countries, while Figure 3 exhibits the test results in the developing ones. The horizontal axis indicates the degrees of freedom m after the natural logarithm, and the vertical axis is the statistic Qccm. Full line marked with circles is the cross-correlation statistics of online sentiment and the corresponding financial market. Full line representing the critical value of the χ2m distribution Qccm with m degrees of freedom at the 5% significance level is shown as comparison. We set freedom m ranging from 1 to 1500.Figure 2
The cross-correlation statistics between online sentiment (DHS) and stock market return in developed countries: (a) US: SP500, (b) US: Nasdaq, (c) Japan: Nikkei, (d) Korea: KOSPI, (e) Germany: DAX, and (f) UK: FTSE.
(a)(b)(c)(d)(e)(f)Figure 3
The cross-correlation statistics between online sentiment (DHS) and stock market return in developing countries: (a) Brazil: BVSP, (b) Indonesia: JKSE, (c) Mexico: MXX, and (d) India: BSE.
(a)(b)(c)(d)The results in Figure2 show that, in the United States, Japan, and Germany, the cross-correlation statistics Qccm of these four financial markets are all lager than the critical value regardless of degrees of freedom, suggesting a significant cross-correlation between online sentiment and financial market return in these countries. As to the other two developed countries, South Korea and UK, the cross-correlation statistics Qccm are quite close to or even lower than the critical value of χ2m distribution at 5% significant level under large degrees of freedom. The empirical results show that, in the developed countries, the relationship between online sentiment and stock market return is heterogeneous. When it comes to the developing countries, we can see that, in Figure 3, the cross-correlation statistics Qccm are all higher than the critical value. To sum up, the cross-correlation between online sentiment and financial market return is stronger in the developing countries compared with that in the developed ones. The empirical results provide a complementary to Zhang et al. [21] by analyzing the different dynamic correlations between financial markets and sentiment in developing and developed countries, respectively. In addition, compared with Da et al. [11, 12], we are concerned about the cross-correlation rather than linear relationship between online sentiment and stock market performance.


## 4.2. MF-DCCA

In theQccm test of cross-correlation, South Korea, UK, and France cannot reject the null hypothesis; that is, there is insufficient evidence to prove that there is a significant cross-correlation between financial market return and the online sentiment measured by DHS index. The other seven countries reject the null hypothesis, confirming a significant cross-correlation between financial market return and online sentiment. The cross-correlation test based on the statistics Qccm gives a clue for the presence of cross-correlation qualitatively. In this part, we try to test the cross-correlations quantitatively by estimating the cross-correlation exponent using MF-DCCA method.In this paper, the range of the slitting lengths is set to 10<s<N/4 (N is the length of the financial market return sequence in each group), and the fluctuation function order q is set to be ranging from −10 to 10. The corresponding online sentiment sequence belongs to the small-band sequence when q<0; otherwise, it belongs to the large-band sequence. Figure 4 shows the log–log plots of logFqs versus logs as q=−10,−9,…,9,10 for the fluctuation function of financial markets and investor sentiment in both developed countries(left side) and developing ones (right side). It can be seen that all curves belonging to 8 financial markets overall present an obvious linear trend despite the fluctuation with the changes of different interval length s. The empirical results demonstrate that there is a significant power-law cross-correlation between financial markets and online sentiment.Figure 4
Log-log plots oflogFqs versus logs for the developed (developing) financial markets return and online sentiment: (a) US: SP500, (b) US: Nasdaq, (c) Brazil: BVSP, (d) Indonesia: JKSE, (e) Japan: Nikkei, (f) Germany: DAX, (g) Mexico: MXX, and (h) India: BSE.
(a)(b)(c)(d)(e)(f)(g)(h)In Figure4, the fluctuation function of financial market returns and online sentiment in various countries shows a relatively stable trend before logs∗, and after that, the trend changed significantly. s∗ is the “crossover” defined by Podobnik et al. [32]. We use the crossover to divide the cross-correlation between two sequences into short-term relationships (when s<s∗) and long-term relationships (when s>s∗). Specifically, in the developed countries, the “crossover” of the cross-correlation relationship between the market return of S & P500 (USA), NASDAQ (USA), Nikkei225 (Japan), and DAX (German) and online sentiment occurs at about 245 days, 255 days, 95 days, and 102 days, respectively. Among the developing countries, the “crossover” of the cross-correlation between the return of the BVSP (Brazil), JKSE (Indonesia), MXX (Mexico), BSE (India), and online sentiment is at about 79 days, 96 days, 61 days, and 161 days, respectively.We further construct the scaling exponentHxyq of the fluctuation function between the return of each financial market and online sentiment under different time length s and different order q, so as to explore the heterogeneity of markets in different countries. Table 2 shows the average value of scaling cross-correlation exponents Hxyq in the developed countries and developing countries under different order q for long term S>S∗ and short term S<S∗. As is shown, when q=2, Hxy2 are all greater than 0.5 in different countries, proving a strong positive cross-correlation between financial market return and online sentiment. In other words, financial market returns tend to change in the same direction as online sentiment measured by DHS does. However, it is also noteworthy that, in our sample, the fluctuation scaling exponent Hxyq in the developed countries is smaller than that in the developing countries. In addition, in the developed countries, Hxyq is close to 0.5 Hxy2=0.5564 in the short term (when s<s∗), which means that the degree of synergy between the financial markets and online sentiment is low.Table 2
Average value of scaling cross-correlation exponentsHxyq for the stock market returns and online sentiment in developed and developing countries.
QDeveloped countriesDeveloping countriesS<S∗S>S∗S<S∗S>S∗−100.66300.85550.80451.0520−90.65620.85200.79761.0478−80.64870.84820.78991.0432−70.64050.84410.78141.0383−60.63170.83960.77231.0329−50.62220.83460.76261.0270−40.61210.82890.75261.0202−30.60140.82180.74241.0119−20.59000.81250.73201.0012−10.57820.79970.72200.986400.56680.78160.71410.965610.55830.75690.71300.935620.55640.72490.72700.893230.56280.68730.75880.838440.57380.64850.79620.778850.58380.61240.82610.723560.59010.58140.84530.676770.59310.55570.85640.638880.59370.53490.86220.608390.59280.51790.86480.5839100.59120.50400.86570.5640ΔH (q < 0)0.08480.05590.08250.0656ΔH (q > 0)0.03540.25280.15260.3716ΔH (all)0.10660.35150.15260.4880To further study the multifractal nature of the cross-correlation coefficient between financial market and online sentiment, we calculate the degree of multifractalΔHq under different wavebands:(9)ΔHq=maxHq−minHq.The greater theΔHq is, the greater the degree of multifractal is. The last three rows of Table 2 show the crossover between the two under different order q. Overall, the fractal degree of the cross-correlation between financial market and online sentiment in the developing countries is significantly greater than that in the developed countries. The empirical results show that the relationship between financial market return and online sentiment is more stable in the developed countries, whereas they have weaker cross-correlation relationship compared with the developing countries. It is easy to conclude that although the cross-correlation between the return of financial markets and online sentiment in developing countries is stronger, the volatility is also greater, and the relationship is more unstable.Considering different wavebands (q < 0 or q > 0), the degree of fractal in the small waveband (q < 0) of financial markets and online sentiment in developing countries is significantly smaller than that in the large waveband (q > 0). This supplement shows that, in the developing countries, the cross-correlation between financial markets and online sentiment is more stable in small wave band.This finding is consistent with most studies except Zhang et al. [40], whose work proves that, in the long run, the relationship between internet activity and Chinese market volatility is more accurate. This may partially be due to the difference between China and our sample countries in financial market composition as well as internet development level.


## 4.3. Rolling Windows Discussion

Grech and Mazur [39] argued that the exponent at a given time depends on the time-window length. To rule out the impact of time-window length, we redo the empirical test using MF-DCCA based on rolling windows. MF-DCCA based on rolling window is practical in capturing the dynamic evolution characteristics of the cross-correlation relationship between the financial market of various countries and the online sentiment measured by DHS. Following Wang et al. (2010), we set one year (about 250 trading days) as the time interval and 1 trading day as the step size of the rolling window. Figures 5 and 6 are the results of cross-correlation relationship between financial market return and online sentiment through rolling window test.Figure 5
The dynamic evolution of the cross-correlation between financial market return and online sentiment in developed countries (q = 2): (a) US: SP500, (b) US: Nasdaq, (c) Japan: Nikkei, and (d) Germany: DAX.
(a)(b)(c)(d)Figure 6
The dynamic evolution of the cross-correlation between financial market return and online sentiment in developing countries (q = 2): (a) Brazil: BRL, (b) Indonesia: Jakarta, (c) Mexico: MXX, (d) India: BSE.
(a)(b)(c)(d)It can be seen from the figures that the cross-correlation relationship between financial market returns and online sentiment shows strong consistency over time, and this finding applies to all countries. Moreover, the cross-correlation relationship has declined rapidly with the short sharp drop of the global financial market at the end of 2015. The scaling exponentHxy2 of some countries even fell below the critical value, which indicates that the cross-correlation relationship between financial market return and online sentiment can be affected by macroeconomic environment and even changed from positive to negative.Table3 shows the statistical characteristics of the dynamic cross-correlation between financial market returns and online sentiment in various countries. Overall, the averages of scaling exponent index Hxy2 are all greater than 0.5 regardless of the nationality, giving a clue that the financial markets and online sentiment generally show a positive cross-correlation worldwide. Besides, the standard deviation of the Hxy2 of the developing markets is generally larger than that of the developed country markets; this implies that financial markets in the developing countries tend to fluctuate more and more easily be affected by online sentiment, and this situation has improved in the developed countries. Zhang et al. [20] focus on testing whether there exists the linear or nonlinear Granger causality between sentiment and major financial markets returns, and they find out a strong relationship in the USA, but in the Middle East and North Africa, there only exists one direction Granger causality pattern from DHS to market returns. Different from theirs, we find evidence that the developing countries tend to be fluctuated more intensely by online sentiment; this may be because we focus on dynamic correlations, while Zhang et al. [23] were concerned with causality relationship between sentiment and financial market performance.Table 3
Statistical characteristics of dynamic cross-correlation between financial markets return and online sentiment.
MeanStdMinMaxS & P5000.66840.08480.45950.8569NASDAQ0.67050.07460.46480.8347Nikkei0.68780.06380.50270.8514DAX0.67390.06270.48690.8128BVSP0.67980.08340.42910.8728JKSE0.64480.08130.41970.8478MXX0.64500.07630.40230.8317BSE0.66850.06500.50110.8104


## 5. Conclusion

In this paper, we investigate the cross-correlation between financial market return and online sentiment based on MF-DCCA method. We choose representative financial markets covering developed and developing countries in different regions and calculate the market index returns, and Daily Happiness Index (DHS) is applied as a proxy variable for online sentiment.We firstly find that there is no generic cross-correlation between financial market returns and online sentiment in the developed countries; specifically, we do not find a cross-correlation relationship between financial market return and online sentiment in South Korea and UK. Yet, our research shows that there exists a power-law cross-correlation relationship between financial market and online sentiment in some developed countries and all developing countries represented by Brazil and India in our sample, and the cross-correlation relationship is stronger than that in the developed ones.We further set the different time interval lengths and retest the cross-correlation relationship and find that whether in the long-term or short term, there is a significant positive cross-correlation between the financial market returns and online sentiment; that is, the financial market returns tend to change in the same direction as online sentiment does measured by the Daily Happiness Index (DHS). It is worth noting that the cross-correlation between financial market return in the developed countries and online sentiment is weak in the short term. Moreover, we study the cross-correlation under different fractal degrees ranging from −10 to 10. The empirical results show that cross-correlation between financial markets and online sentiment in the developed countries is more stable.Finally, we perform rolling window analysis to capture the dynamic evolution characteristics of cross-correlation relationship. We find that the cross-correlation relationship between financial market and online sentiment has a strong consistency over time, but the cross-correlation relationship between financial markets and online sentiment in the developing countries fluctuates more drastically.Our findings confirm the dependency between online sentiment and global financial markets, and we also suggest the heterogeneous relationship between sentiment and market performance in different economies. As is shown, the emerging financial markets in the developing countries fluctuate drastically and show a certain degree of instability compared with the developed ones. The underlying mechanism on explaining this may be attributed to the degree of market maturity, regulatory effectiveness, and financial literacy of market participants. This needs an interdisciplinary analysis from a more holistic perspective. We leave these questions for future research.



---

*Source: 6674379-2021-01-27.xml*