A nonlinear impact: evidences of causal effects of social media on market prices
Abstract
Online social networks offer a new way to investigate financial markets’ dynamics by enabling the largescale analysis of investors’ collective behavior. We provide empirical evidence that suggests social media and stock markets have a nonlinear causal relationship. We take advantage of an extensive data set composed of social media messages related to DJIA index components. By using informationtheoretic measures to cope for possible nonlinear causal coupling between social media and stock markets systems, we point out stunning differences in the results with respect to linear coupling. Two main conclusions are drawn: First, social media significant causality on stocks’ returns are purely nonlinear in most cases; Second, social media dominates the directional coupling with stock market, an effect not observable within linear modeling. Results also serve as empirical guidance on model adequacy in the investigation of sociotechnical and financial systems.
Keywords:
financial markets, complex systems, social media, nonlinear causality, information theory1 Introduction
Investors’ decisions are modulated not only by companies’ fundamentals but also by personal beliefs, peers influence and information generated from news and the Internet. Rational and irrational investor’s behavior and their relation with the market efficiency hypothesis [1] have been largely debated in the economics and financial literature [2]. However, it was only recently that the availability of vast amounts of data from online systems paved the way for the largescale investigation of investor’s collective behavior in financial markets.
Testing for nonlinear dependence is of great importance in financial econometrics due to its implications in model adequacy, market efficiency, and predictability [3]. Taking social media as a proxy for investor’s collective attention over the stock market, we provide empirical evidence that characterize social media impact on market prices as nonlinear.
Previous studies have investigated the predictive power of online expressed opinions and measures of collective attention on market movements . News are perhaps the most explored source of information, especially after the availability of electronically transmitted services and machine readable news [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]. The use of search engines [16, 17, 18, 19, 20, 9, 21] and Wikipedia [22] are examples of the extension of this investigation to broader types of online systems. In addition to that, social media and microblogging platforms play an increasingly significant role as proxies of collective intelligence and sentiment of the real world. Not only do they mimic realworld peertopeer relationships but they also provide a finegrained realtime information channel that include stories, facts and shifts in collective opinion. Nonetheless, to what extent this information flood reflects financial dynamics is a relatively novel topic under great debate [23, 19, 15, 24, 25, 26, 27, 28, 29, 30, 9, 31, 32, 33, 34].
Recent developments have shown the importance of Twitter as an information channel about financial markets. An example is the U.S. Securities and Exchange Commission allowance of official company’s disclosure via Twitter in compliance with Regulation Fair Disclosure [35]. Several research evidences also indicate that Twitter may describe and predict financial dynamics. Among the first and most influential works is Bollen et al. (2011) [23], where the authors used emotion analytics to forecast movements in the DJIA index. Later on, in a report for the European Central Bank, the same authors [19] showed that Twitter collective opinion not only has predictive power over stocks’ returns but it actually precedes changes in search volume (Google Trends), a known predictor of economic indicators. Further, Zheludev et al. (2014) [24] showed that Twitter can contain statisticallysignificant leadtime information about securities’ returns, most remarkably over future prices of the S&P500 index. Sprenger et al. (2014) [25] proposed a methodology that quantified the impact of Twitter messages in the market as well as identified different types of company specific events. Subsequent research by Ranco et al. (2015) [26] reinforced these results while analyzing links among Twitter peaks, excess of stocks’ returns and the identification of earnings announcements.
These recent works provide evidence that exogenous information gathered from sociotechnical systems may be useful to describe financial dynamics. However, the current body of the literature presents mixed results on the stocks’ returns predictability. On the one hand, some researches indicate predictability of price movements using News and social media [4, 5, 23, 19]. On the other hand, other studies report weak results [26, 24] suggesting that social media analytics have low power when used alone. Moreover, the use of ad hoc functional forms and assumptions in different studies makes it difficult to draw general conclusions about the nature of the relationship between sociotechnical systems and stock markets.
We take advantage of an informationtheoretic framework to study the causality between social media and stock returns in a nonparametric way. We detect directional and dynamical coupling while not assuming any particular type of interaction between the systems. To our knowledge, our results provide the first empirical evidence that suggests social media and stock markets not only have significant leadtime coupling but also are dominated by nonlinear interactions.
2 Data Analyzed
Our analysis is conducted on the 30 components of the Dow Jones Industrial Average (DJIA) index, which we monitored during the twoyear period from March 31, 2012 to March 31, 2014. The choice of these stocks was due to their representativeness of the stock market (see Supporting Information SI.A.1 for the complete list of companies). We consider two streams of time series data: (i) market data, which are given at the daily stock price, and (ii) social media data analytics based on 1,767,997 Twitter messages. Let be the closing price of an asset at day , as financial variable we consider the stocks’ daily logreturns: .
We consider Twitter data analytics as a proxy for the collective opinion over a stock. As opinion mining [36] per se is out of scope of this study, we build our analysis on top of Twitter data analytics supplied by PsychSignal.com [37]. PsychSignal’s natural language processing (NLP) uses a sophisticated linguistic based approach to sentiment mining that is able to extract and score the nuanced financial language used by traders in online conversations.
We take the daily total number of bullish tweets related to a company as the social media time series . Fig. 1 shows the volume of bearish and bullish messages for the selected companies. A company is defined to be related to a given message if its tickerid is mentioned as a cashtag, i.e., with its name preceded by a dollar symbol, e.g., $CSCO for the company CISCO SYSTEMS INC. In Twitter, a cashtag is a standard way to refer to a listed security. See Supporting Information SI.A.2 for further details on the Twitter data analytics.
3 Social Media and Stocks’ Returns: Linear and Nonlinear Causality
We investigate the characterization of causal inference between social media and stocks’ returns under the notion of Granger (Gcausality) [38, 39]. We test the null hypothesis of social media not causing stocks’ returns. Firstly, we verify this hypothesis with a standard Gcausality test under a linear vectorautoregressive framework. This linear model is tested against misspecification via a BDS test [40] which is a nonparametric method that is powerful to detect nonlinearity [41]. Secondly, we detect significant causalities in possible nonlinear dynamical interactions. This is done without assuming any a priori type of interaction. We consider Transfer Entropy (TE) as the measure for nonparametric causality. Since its introduction by Schreiber (2000) [42], TE has been recognized as an important tool in the analysis of causal relationships in nonlinear systems [43]. It naturally detects directional and dynamical information [44]. This measure can be interpreted as the information flow between social media and future outcomes of stocks’ returns at lag , controlled by current information on stocks’ returns.
Consistent with a nonparametric analysis, we estimate the TE significance via randomized permutation tests. If the null hypothesis is rejected, there is evidence of nonlinear causality, otherwise we consider that there is no significant causality. The hypothesis tests are performed for lags ranging from 1 to 10 trading days. We apply the Bonferroni correction to reduce the probability of a Type I (false positive) error due to multiple hypotheses testing.
Fig. 2 shows the significant causality links between social media and stocks’ returns considering both cases: nonlinear (TE) and linear Gcausality ^{2}^{2}2See Supporting Information SI.C for the complete set of pvalues obtained.. Linear analysis discovers only three stocks with significant causality: INTEL CORP., NIKE INC. and WALT DISNEY CO. Nonlinear analysis discovers that several other stocks have significant causality. In addition to the 3 stocks identified with significant linear causality, other 8 stocks present purely nonlinear causality.
In Fig. 3, we show the number of stocks with significant causality aggregated by lag of interaction. The causality between social media and nextday stocks’ returns presents a stunning difference between linear and nonlinear cases. From linear Gcausality one would say that there is significant causality between social media and nextday stocks’ movements for one stock only. Conversely, nonlinear measures indicated that 10 companies have significant causality in this direction. Higher delays show a drop on this number. These results suggest that linearconstraints are neglecting social media causality over stocks’ returns especially in the nextday period or in the shortterm.
The low level of causality obtained under linear constraints is inline with results from similar studies in the literature, where it was found that stocks’ returns show weak causality links [6, 29] and social media sentiment analytics, at least when taken alone, have very small or no predictive power [26] and do not have significant leadtime information about stock’s movements for the majority of the stocks [24]. Contrariwise, results from the nonlinear analyses unveiled a much higher level of causality indicating that linear constraints may be neglecting the relationship between social media and stock markets.
Ticker  GARCH(1,1)  ARIMA(1,1,1)  

CSCO 








MSFT 







AXP 








JPM 








IBM 






V 


JNJ  
AAPL  

For the companies identified with nonlinear causality, we tested whether common functional forms and transformations used in the literature can explain the nonlinearities. We checked model adequacy and causality significance for various functional forms listed in Table 1, where the results are also reported. The original linear functional form is adequate for 5 companies but can not explain the nonlinear causality. Secondorder differencing makes a linear functional adequate for the company VISA, but turns Microsoft as misspecified. GARCH and ARIMA filtering were applied in a tentative to separate signal from noise and to linearize the original time series. Nonetheless, significant causality was not observed. Other functional forms performed no better than the original linear specification a part from the absolute value transformation. It is indeed known that social media and news analytics predict absolute changes in market prices [24, 6] better than stock’s returns. This functional form is a proxy for stock returns volatility and therefore it has higher predictability than stock returns. Yet, half of the companies still had an unexplained nonlinear causality.
It is clear from the results obtained that the nonlinearities found can not be fully explained by returns’ volatility neither by naive transformations often employed in related studies. This indicates that the nonlinear causality is nontrivial and that there is forecastable structure that can not be explained by commonlyused functional forms. Therefore, the impact of social media on market prices may be higher than currently reported in related studies, because commonlyused functional forms are hiding significant causality, that are here reveled instead with a nonparametric analysis.
4 Quantifying the Direction of Information Flow
Transferentropy is an asymmetric measure, i.e., , and thus allows the quantification of directional coupling between systems. The Net Information Flow is defined as . One can interpret this quantity as a measure of dominant direction of information flow, i.e., a positive result indicates a dominant information flow from to compared to the other direction or, similarly, it indicates which system provides more predictive information about the other system [45].
TE has an intuitive interpretation under the notion of Gcausality in the sense that social media may cause (future) stocks’ returns only when it provides more information to stocks’ returns than past stocks’ returns themselves. In fact, Barnett et al. (2009) [46] showed that linear Gcausality and Transfer Entropy are equivalent for Gaussian variables. This result provides a direct mapping between the informationtheoretic framework and the linear VAR approach of Gcausality. Hence, it is possible to estimate TE both in its general form and with its equivalent form for linear Gcausality. The former case is a nonparametric approach that is able to capture possible nonlinear coupling that are likely to be neglected in the latter case.
We can therefore quantify the Net Information Flow from social media to stocks’ returns using both nonlinear and linear frameworks. We investigated which direction of coupling is the strongest and to what extent the consideration of nonlinear dynamics affects the results compared to a linearconstrained analysis. Fig. 4 A) shows the results for the linear case. We observe an asymmetry of information, i.e., the systems are not coupled with the same amount of information flow in both directions. The stocks are clearly divided in two groups of approximately same sizes. One group shows stocks with positive net information flow, indicating that social media provides more predictive information about the stock market than the opposite. A second group of stocks indicates the opposite, i.e., information flows more from stocks’ returns to social media than in the other direction. In both cases, the absolute value of net information flow decreases with lag.
Surprisingly, the consideration of nonlinear dynamics unveils a much different scenario. Fig 4 B) shows the results of the same analysis without linear constraints. The net information flow becomes positive for all stocks analyzed. This result suggests that social media is the dominant information source indicating that the information provided by social media contributes more to the description of stock markets dynamics than the opposite.
5 Summary
The present study has revealed that social media has a significant nonlinear impact on stocks’ returns.
We analyzed an extensive data set of social media analytics related to stocks components of the DJIA index. Nonparametric tests for nonlinear specification and causality indicated three major empirical findings:

The consideration of nonlinear dynamics increased the number of stocks with relevant social media signal from 1/10, in the linear case, to more than 1/3 indicating that social media significant causality on stocks’ returns are purely nonlinear in most cases;

The nonlinearities found were nontrivial and could not be explained by common functional forms used in the literature. This indicates that the impact of social media on stocks’ returns may be higher than currently reported in related studies;

Nonparametric analysis indicated that social media dominates the directional coupling with stock market; an effect not observable within linear constraints.
We suggest that social media explanatory power on stock markets may be intensified if nonlinear dynamics are considered. In this respect, we provided strong evidence that supports the use of social media as a valuable source of information about the stock market.
From a methodological point of view, results indicate that a nonparametric approach is highly preferable for the investigation of causal relationships between sociotechnical and financial systems.
6 Methods
6.1 BDS Test for Linear Misspecification
When applied to the residuals of a linear model, the BDS test [40] is a powerful test to detect nonlinearity [41]. Let be the residuals of the linear fitted model and define its embedding as . The embedding correlation integral is given by
(1) 
and
(2) 
where is an indicator function with if and zero, otherwise. The null hypothesis of the BDS test assumes that is iid. In this case,
(3) 
The BDS statistic is a measure of the extent that this relation holds in the data. It is given by:
(4) 
where can be estimated as described in [40]. The null hypothesis of the BDS test indicates that the model tested is not misspecified and it is rejected at 5% significance level if .
is commonly set as a factor of the variance () of . We report results for and the embedding dimension . We also performed tests for and with no significant differences in the results.
6.2 Linear Gcausality
Consider the linear vectorautoregressive (VAR) equations:
(5)  
(6) 
we test whether Gcauses by comparing the errors in the prediction of in the restricted and unrestricted regression models in Eq. (5) and Eq. (12), respectively. Significance estimation is performed via analysis of variance. We indicated a significant causality if there is significant causality in at least one of the lags tested. We adjusted the pvalues with a Bonferroni correction to control for multiple hypotheses testing.
6.3 Functional Forms Tested
Functional forms referenced in Table 1 were used as following.
6.3.1 Differencing: .
The first differencing is taken in both social media and returns time series.
(7) 
The second differencing was tested in analogous way.
6.3.2 .
Represents a regression of returns on social media controlled by the stocks’ returns daily volatility.
(8) 
where we consider
(9) 
as an approximation of the daily returns volatility. and are the highest and lowest intraday price value, respectively.
6.3.3 Logtransformation: .
(10) 
6.3.4 Absolute value: .
(11) 
6.3.5 Garch(1,1).
A GARCH filtering was applied in the original returns time series as follows:
(12) 
with , and
(13) 
The resulting residuals were then used instead of the original returns time series .
6.3.6 Arima(1,1,1).
ARIMA filtering was applied in the original returns time series as follows:
(14) 
The resulting residuals were then used instead of the original returns time series .
6.4 Nonparametric GCausality: Transfer Entropy
Transfer Entropy (TE) was estimated as a sum of Shannon entropies:
(15) 
where is a forward timeshifted version of at lag relatively to the contemporaneous timeseries and . We reject the null hypothesis of causality if the Transfer Entropy from social media to stocks’ returns is significant. To remain in a nonparametric framework, the statistical significance of TE was performed using surrogate data. In that way, 400 replicates of were estimated, where is a random permutation of relatively to . We computed the randomized Transfer Entropy at each permutation for each timeshift () from 1 to 10 days. We then calculated the frequency at which the observed Transfer Entropy was equal or more extreme than the randomized Transfer Entropy of the surrogate data. Statistical significance was given at pvalue . pvalues were also Bonferroni corrected.
The estimation of the empirical probability density distribution, required for the entropy estimation, was performed using a Kernel Density Estimation (KDE) method, which has several advantages over the commonly used Histogram based methods (see SI.B.2).
6.5 Net Information Flow
The Net Information Flow from social media to the stock market is defined as: . For the nonlinear case, transfer entropy was computed as defined in the previous Section 6.4. Instead, to estimate a linear version of Net Information Flow, we compute Transfer Entropy for the linear case based on the work of [46]. This work provides a direct mapping between Transfer Entropy and the linear Gcausality implemented in the standard VAR framework. The authors showed that Transfer Entropy and linear Gcausality are equivalent for Gaussian variables.
Particularly, assuming the standard measure of linear Gcausality for the bivariate case as
(16) 
[46] shows that:
(17) 
if all processes ( and ) are jointly Gaussian.
Acknowledgments
This work was supported by PsychSignal.com, which provided the social media analytics. T.A. acknowledges support of the UK Economic and Social Research Council (ESRC) in funding the Systemic Risk Centre (ES/K002309/1). T.T.P.S. acknowledges financial support from CNPq  The Brazilian National Council for Scientific and Technological Development.
References
 [1] Fama, E.F.: Efficient capital markets: A review of theory and empirical work. The Journal of Finance 25(2) (1970) 383–417
 [2] Shleifer, A.: Inefficient Markets: An Introduction to Behavioral Finance. Clarendon Lectures in Economics. OUP Oxford (2000)
 [3] Brooks, C.: Testing for nonlinearity in daily sterling exchange rates. Applied Financial Economics 6(4) (1996) 307–317
 [4] Tetlock, P.C.: Giving content to investor sentiment: The role of media in the stock market. The Journal of Finance 62(3) (2007) 1139–1168
 [5] Tetlock, P.C., SaarTsechansky, M., Macskassy, S.: More than words: Quantifying language to measure firms’ fundamentals. The Journal of Finance 63(3) (2008) 1437–1467
 [6] Alanyali, M., Moat, H.S., Preis, T.: Quantifying the relationship between financial news and the stock market. Sci. Rep. 3 (2013)
 [7] Lillo, F., Miccichè, S., Tumminello, M., Piilo, J., Mantegna, R.N.: How news affects the trading behaviour of different categories of investors in a financial market. Quantitative Finance 15(2) (2015) 213–229
 [8] Luss, R., d’Aspremont, A.: Predicting abnormal returns from news using text classification. Quantitative Finance (March 2012)
 [9] Mao, H., Counts, S., Bollen, J.: Predicting financial markets: Comparing survey, news, twitter and search engine data. ArXiv eprints (2011)
 [10] Heston, S.L., Sinha, N.R.: News versus sentiment: Comparing textual processing approaches for predicting stock returns. Robert H. Smith School Research Paper (2014)
 [11] Ranco, G., Bordino, I., Bormetti, G., Caldarelli, G., Lillo, F., Treccani, M.: Coupling news sentiment with web browsing data predicts intraday stock prices. (2014)
 [12] GroßKlußmann, A., Hautsch, N.: When machines read the news: Using automated text analytics to quantify high frequency newsimplied market reactions. Journal of Empirical Finance 18(2) (2011) 321 – 340
 [13] Li, Q., Wang, T., Li, P., Liu, L., Gong, Q., Chen, Y.: The effect of news and public mood on stock movements. Information Sciences 278 (2014) 826 – 840
 [14] Chan, W.S.: Stock price reaction to news and nonews: drift and reversal after headlines. Journal of Financial Economics 70(2) (2003) 223 – 260
 [15] Zhang, W., Skiena, S.: Trading strategies to exploit blog and news sentiment. In: In Fourth Int. Conf. on Weblogs and Social Media (ICWSM), 2010. â 186. (2010)
 [16] Curme, C., Preis, T., Stanley, H.E., Moat, H.S.: Quantifying the semantics of search behavior before stock market moves. Proceedings of the National Academy of Sciences (2014)
 [17] Preis, T., Reith, D., Stanley, H.E.: Complex dynamics of our economic life on different scales: insights from search engine query data. Philosophical Transactions of the Royal Society of London A: Mathematical, Physical and Engineering Sciences 368(1933) (2010) 5707–5719
 [18] Preis, T., Moat, H.S., Stanley, H.E.: Quantifying Trading Behavior in Financial Markets Using Google Trends. Scientific Reports 3 (April 2013)
 [19] Mao, H., Counts, S., Bollen, J.: Quantifying the effects of online bullishness on international financial markets. European Central Bank Workshop on Using Big Data for Forecasting and Statistics, Frankfurt, Germany (2014)
 [20] Bordino, I., Battiston, S., Caldarelli, G., Cristelli, M., Ukkonen, A., Weber, I.: Web search queries can predict stock market volumes. PLoS ONE 7(7) (07 2012) e40014
 [21] Da, Z., Engelberg, J., Gao, P.: In search of attention. The Journal of Finance 66(5) (2011) 1461–1499
 [22] Moat, H.S., Curme, C., Avakian, A., Kenett, D.Y., Stanley, H.E., Preis, T.: Quantifying wikipedia usage patterns before stock market moves. Scientific Reports Volume 3 (May 2013) Article number 1801
 [23] Bollen, J., Mao, H., Zeng, X.: Twitter mood predicts the stock market. Journal of Computational Science 2(1) (2011) 1 – 8
 [24] Zheludev, I., Smith, R., Aste, T.: When Can Social Media Lead Financial Markets? Scientific Reports 4 (February 2014)
 [25] Sprenger, T.O., Sandner, P.G., Tumasjan, A., Welpe, I.M.: News or Noise? Using Twitter to Identify and Understand Companyspecific News Flow. Journal of Business Finance & Accounting 41(78) (09 2014) 791–830
 [26] Ranco, G., Aleksovski, D., Caldarelli, G., Grc̆ar, M., Mozetic̆, I.: The effects of twitter sentiment on stock price returns. PLoS ONE 10(9) (09 2015) e0138441
 [27] Yang, S.Y., Mo, S.Y.K., Zhu, X.: An empirical study of the financial community network on twitter. 2014 IEEE Conference on Computational Intelligence for Financial Engineering & Economics (2014)
 [28] Sehgal, V., Song, C.: Sops: Stock prediction using web sentiment. In: Proceedings of the Seventh IEEE International Conference on Data Mining Workshops. ICDMW ’07, Washington, DC, USA, IEEE Computer Society (2007) 21–26
 [29] Antweiler, W., Frank, M.Z.: Is all that talk just noise? The information content of internet stock message boards. Journal of Finance 59(3) (2004) 1259–1294
 [30] Sprenger, T.O., Sandner, P.G., Tumasjan, A., Welpe, I.M.: News or Noise? Using Twitter to Identify and Understand Companyspecific News Flow. Journal of Business Finance & Accounting 41(78) (09 2014) 791–830
 [31] Nasseri, A.A., Tucker, A., de Cesare, S.: Quantifying stocktwits semantic terms’ trading behavior in financial markets: An effective application of decision tree algorithms. Expert Syst. Appl. 42(23) (2015) 9192–9210
 [32] Al Nasseri, A., Tucker, A., de Cesare, S.: Big data analysis of stocktwits to predict sentiments in the stock market. In Dz̆eroski, S., Panov, P., Kocev, D., Todorovski, L., eds.: Discovery Science. Volume 8777 of Lecture Notes in Computer Science. Springer International Publishing (2014) 13–24
 [33] Liu, L., Wu, J., Li, P., Li, Q.: A socialmediabased approach to predicting stock comovement. Expert Syst. Appl. 42(8) (May 2015) 3893–3901
 [34] Souza, T.T.P., Kolchyna, O., Treleaven, P.C., Aste, T.: Twitter sentiment analysis applied to finance: A case study in the retail industry. arXiv preprint. http://arxiv.org/abs/1507.00784 (2015)
 [35] SEC: U.S. Securities and Exchange Commission. SEC says social media ok for company announcements if investors are alerted. http://1.usa.gov/1zFxUPa (April 2013) Last accessed on Jan 29, 2015.
 [36] Kolchyna, O., Souza, T.T.P., Treleaven, P., Aste, T.: Twitter sentiment analysis: Lexicon method, machine learning method and their combination. arXiv preprint. http://arxiv.org/abs/1507.00955 (2015)
 [37] PsychSignal: Website. https://www.psychsignal.com. Last accessed on Jan 18, 2016.
 [38] Wiener, N.: The theory of prediction. In Beckenbach, E.F., ed.: Modern mathematics for engineers. McGrawHill, New York (1956)
 [39] Granger, C.: Investigating causal relations by econometric models and crossspectral methods. Econometrica 37(3) (1969) 424–38
 [40] Brock, W.A., Scheinkman, J.A., Dechert, W.D., LeBaron, B.: A test for independence based on the correlation dimension. Econometric Reviews 15(3) (January 1996) 197–235
 [41] Barnett, W.A., Gallant, A.R., Hinich, M.J., Jungeilges, J.A., Kaplan, D.T., Jensen, M.J.: A singleblind controlled competition among tests for nonlinearity and chaos. Journal of Econometrics 82 (1997) 157–192
 [42] Schreiber, T.: Measuring information transfer. Phys. Rev. Lett. 85 (Jul 2000) 461–464
 [43] Hlavackovaschindler, K., Palus, M., Vejmelka, M., Bhattacharya, J.: Causality detection based on informationtheoretic approaches in time series analysis. Physics Reports 441(1) (March 2007) 1–46
 [44] Montalto, A., Faes, L., Marinazzo, D.: Mute: A matlab toolbox to compare established and novel estimators of the multivariate transfer entropy. PLoS ONE 9(10) (10 2014) e109462
 [45] Michalowicz, J.V., Nichols, J.M., Bucholtz, F.: Handbook of Differential Entropy. Chapman & Hall/CRC (2013)
 [46] Barnett, L., Barrett, A.B., Seth, A.K.: Granger causality and transfer entropy are equivalent for gaussian variables. Phys. Rev. Lett. 103 (Dec 2009) 238701
 [47] Silverman, B.W., Green, P.J.: Density Estimation for Statistics and Data Analysis. Chapman and Hall, London (1986)
 [48] Sheather, S.J., Jones, M.C.: A reliable databased bandwidth selection method for kernel density estimation. Journal of the Royal Statistical Society. Series B (Methodological) 53(3) (1991) pp. 683–690
 [49] Scott, D.: Multivariate Density Estimation: Theory, Practice, and Visualization. A Wileyinterscience publication. Wiley (1992)
Supporting Information
Appendix SI.A Material
si.a.1 List of Companies Analyzed
The name of the investigated stocks with respective Reuters Instrument Codes (RIC) follow: INTEL CORP. (INTC.O), VISA INC. (V.N), NIKE INC. (NKE.N), E.I. DUPONT DE NEMOURS & CO. (DD.N), JPMORGAN CHASE & CO. (JPM.N), BOEING CO. (BA.N), MERCK & CO. INC. (MRK.N), PFIZER INC. (PFE.N), MICROSOFT CORP. (MSFT.O), COCACOLA CO. (KO.N), GOLDMAN SACHS GROUP INC. (GS.N), MCDONALD’S CORP. (MCD.N), GENERAL ELECTRIC CO. (GE.N), 3M CO. (MMM.N), UNITED TECHNOLOGIES CORP. (UTX.N), VERIZON COMMUNICATIONS INC. (VZ.N), CISCO SYSTEMS INC. (CSCO.O), HOME DEPOT INC. (HD.N), INTERNATIONAL BUSINESS MACHINES CORP. (IBM.N), AMERICAN EXPRESS CO. (AXP.N), PROCTER & GAMBLE CO. (PG.N), APPLE INC. (AAPL.O), UNITEDHEALTH GROUP INC. (UNH.N), CATERPILLAR INC. (CAT.N), EXXON MOBIL CORP. (XOM.N), JOHNSON & JOHNSON (JNJ.N), WALMART STORES INC. (WMT.N), WALT DISNEY CO. (DIS.N), CHEVRON CORP. (CVX.N) and THE TRAVELERS COMPANIES INC. (TRV.N).
si.a.2 Twitter Data Analytics
Twitter data analytics were provided by PsychSignal.com [37]. The data are comprised of volume measures and sentiment analytics. Twitter messages are classified in two dimensions according to their likelihood of bullishness and bearishness towards a company. A company is defined to be related to a given message if its ticker is mentioned. The data set are based on English language content and it is agnostic to the country source of the Twitter message. The information is aggregated in a daily fashion and it is composed of the following variables:

symbol: the stock symbol (ticker) for which the sentiment data refer to;

timestamp_utc: date and time of the analyzed data in UTC format;

bull_scored_messages: this indicator is the total count of bullish sentiment messages;

bear_scored_messages: this indicator is the total count of bearish sentiment messages.
Some messages may be classified as “neutral” or at least not having relevant bullish or bearish tones. Those types of messages do not affect the bull_scored_messages and bear_scored_messages scores. It is also possible that no messages cite a company in a given day. In that case, the scores are zero.
Table SI.A shows an example of the Twitter sentiment analytics for the company APPLE INC. Table SI.B shows a summary description of the selected companies with the number of bearish/bullish Twitter messages identified in the period.
timestamp_utc  symbol  bull_scored_messages  bear_scored_messages 

20150619  AAPL.O  216  55 
20150620  AAPL.O  66  25 
20150621  AAPL.O  90  24 
20150622  AAPL.O  241  75 
20150623  AAPL.O  208  75 
20150624  AAPL.O  561  211 
20150625  AAPL.O  286  107 
20150626  AAPL.O  192  82 
20150627  AAPL.O  145  12 
20150628  AAPL.O  216  69 
Bullish messages  Bearish messages  

Ticker  Total  Daily mean  Total  Daily mean  Total Messages 
AAPL  151143  279.89  95819  177.443  800638 
MSFT  16730  30.98  7062  13.078  139343 
JPM  11259  20.85  6090  11.278  82265 
GS  13971  25.87  8023  14.857  75578 
IBM  7387  13.68  4284  7.933  53547 
INTC  6808  12.61  3199  5.924  47653 
GE  4888  9.05  1522  2.819  41271 
CSCO  5919  10.96  2535  4.694  39665 
WMT  4702  8.71  2438  4.515  39607 
XOM  4495  8.32  1780  3.296  33194 
CAT  5854  10.84  4035  7.472  31911 
VZ  4101  7.59  1651  3.057  30936 
BA  4432  8.21  1693  3.135  30421 
JNJ  3575  6.62  1345  2.491  28392 
MCD  3750  6.94  2157  3.994  28059 
KO  3786  7.01  1385  2.565  26331 
DIS  4170  7.72  1282  2.374  25863 
PFE  3131  5.80  1091  2.020  24817 
V  4436  8.21  1726  3.196  24118 
CVX  2696  4.99  986  1.826  21322 
NKE  3549  6.57  1461  2.706  20941 
MRK  2623  4.86  929  1.720  20708 
PG  2382  4.41  968  1.793  20226 
HD  3262  6.04  1221  2.261  17550 
MMM  1399  2.59  465  0.861  12382 
AXP  1740  3.22  674  1.248  12072 
UTX  1363  2.55  369  0.690  11255 
DD  1498  2.78  559  1.037  10746 
UNH  1348  2.50  532  0.987  9196 
TRV  798  1.53  316  0.604  7990 
TOTAL  287195    157597    1767997 
Appendix SI.B TransferEntropy Estimation
si.b.1 Definitions of information theoretic measures
Let be a random variable and its probability density function (pdf). The entropy is a measure of uncertainty of , and is defined in the discrete case, as:
(18) 
If the is taken to base two, then the unit of is the bit (binary digit). Here, we employ the natural logarithm which implies the unit in nat (natural unit of information).
Given a coupled system , where is the pdf of the random variable and the joint pdf between and , the joint entropy is given by:
(19) 
The conditional entropy is defined by:
(20) 
We can interpret as the uncertainty of given a realization of .
Transfer Entropy can be defined as a difference between conditional entropies:
(21) 
which can be rewritten as a sum of Shannon entropies:
(22) 
where is a forward timeshifted version of at lag relatively to the contemporaneous timeseries and .
si.b.2 Kernel Density Estimation
In the entropy computation, the empirical probability distribution must be estimated. Histogram based methods and kernel density estimations are the two main methods for that. Histogrambased is the simplest and most used nonparametric density estimator. Nonetheless, it yields density estimates that have discontinuities and vary significantly depending on the bin’s size choice.
Also known as ParzenRosenblatt window method, the kernel density estimation (KDE) approach approximates the density function at a point using neighboring observations. However, instead of building up the estimate according to bin edges as in histograms, the KDE method uses each point of estimation as the center of a bin of width and weight it according to a kernel function. Thereby, the kernel estimate of the probability density function is defined as
(23) 
A usual choice for the kernel , which we use here, is the (Gaussian) radial basis function:
(24) 
The problem of selecting the bandwidth in equation (23) is crucial in the density estimation. A large will oversmooth the estimated density and mask the structure of the data. On the other hand, a small bandwidth will reduce the bias of the density estimate at the expense of a larger variance in the estimates. If we assume that the true distribution is Gaussian and we use a Gaussian kernel, the optimal value of that minimizes the mean integrated squared error (MISE) is
where is the total number of points and can be estimated as the sample standard deviation. This bandwidth estimation is often called Gaussian approximation or Silverman’s rule of thumb for kernel density estimation [47]. This is the most common used method and it is here employed. Other common methods are given by Sheather and Jones [48] and Scott [49].
Appendix SI.C Results of the BDS and causality tests
Lags for:  
Ticker  1  2  3  4  5  6  7  8  9  10 
MMM.N  0.928  0.780  0.768  0.999  0.668  0.747  0.739  0.362  0.389  0.676 
AXP.N  0.906  0.987  0.503  0.795  0.734  0.432  0.737  0.336  0.197  0.132 
AAPL.O  0.015*  0.023*  0.028*  0.018*  0.018*  0.008**  0.007**  0.002**  0.003**  0.009** 
BA.N  0.834  0.700  0.591  0.239  0.187  0.363  0.287  0.345  0.187  0.213 
CAT.N  0.001**  0.002**  0.001**  0.000**  0.000**  0.000**  0.000**  0.001**  0.004**  0.002** 
CVX.N  0.113  0.073  0.202  0.330  0.150  0.151  0.389  0.268  0.275  0.439 
CSCO.O  0.404  0.443  0.500  0.463  0.436  0.814  0.883  0.639  0.597  0.590 
KO.N  0.544  0.905  0.712  0.864  0.451  0.734  0.653  0.702  0.471  0.793 
DD.N  0.523  0.373  0.170  0.295  0.759  0.254  0.311  0.199  0.204  0.169 
XOM.N  0.986  0.871  0.504  0.382  0.502  0.704  0.635  0.648  0.178  0.202 
GE.N  0.055  0.016*  0.017*  0.112  0.117  0.129  0.103  0.098  0.101  0.101 
GS.N  0.077  0.010**  0.041*  0.021*  0.028*  0.068  0.102  0.065  0.079  0.014* 
HD.N  0.171  0.092  0.348  0.211  0.079  0.231  0.188  0.034*  0.011*  0.037* 
INTC.O  0.888  0.931  0.808  0.880  0.828  0.858  0.735  0.968  0.756  0.825 
IBM.N  0.184  0.201  0.121  0.126  0.066  0.216  0.393  0.344  0.263  0.209 
JNJ.N  0.000**  0.000**  0.000**  0.000**  0.000**  0.000**  0.000**  0.000**  0.000**  0.000** 
JPM.N  0.171  0.133  0.146  0.305  0.401  0.322  0.270  0.304  0.246  0.798 
MCD.N  0.837  0.970  0.953  0.944  0.497  0.708  0.768  0.775  0.995  0.988 
MRK.N  0.031*  0.026*  0.015*  0.054  0.074  0.134  0.157  0.089  0.126  0.210 
MSFT.O  0.138  0.079  0.129  0.031*  0.009**  0.074  0.066  0.080  0.201  0.136 
NKE.N  0.220  0.126  0.124  0.158  0.055  0.146  0.033*  0.061  0.035*  0.023* 
PFE.N  0.606  0.601  0.599  0.573  0.346  0.405  0.526  0.777  0.651  0.838 
PG.N  0.005**  0.010*  0.012*  0.016*  0.054  0.052  0.015*  0.017*  0.022*  0.017* 
TRV.N  0.000**  0.000**  0.000**  0.000**  0.000**  0.002**  0.003**  0.000**  0.000**  0.000** 
UNH.N  0.007**  0.014*  0.036*  0.016*  0.019*  0.013*  0.006**  0.039*  0.016*  0.011* 
UTX.N  0.176  0.204  0.256  0.577  0.084  0.079  0.185  0.254  0.725  0.585 
VZ.N  0.001**  0.000**  0.000**  0.001**  0.002**  0.000**  0.001**  0.027*  0.000**  0.000** 
V.N  0.001**  0.000**  0.000**  0.000**  0.003**  0.022*  0.049*  0.017*  0.023*  0.023* 
WMT.N  0.200  0.364  0.525  0.937  0.839  0.646  0.719  0.976  0.946  0.753 
DIS.N  0.294  0.310  0.217  0.173  0.421  0.285  0.174  0.179  0.270  0.432 