A tale of two sentiment scales: Disentangling short-run and long-run components in multivariate sentiment dynamics
aa r X i v : . [ q -f i n . GN ] S e p A tale of two sentiment scales: Disentanglingshort-run and long-run components inmultivariate sentiment dynamics
Danilo Vassallo ∗ Giacomo Bormetti † Fabrizio Lillo ‡ Abstract
We propose a novel approach to sentiment data filtering for a portfolio of assets. Inour framework, a dynamic factor model drives the evolution of the observed sentimentand allows to identify two distinct components: a long-term component, modeled as arandom walk, and a short-term component driven by a stationary VAR(1) process. Ourmodel encompasses alternative approaches available in literature and can be readilyestimated by means of Kalman filtering and expectation maximization. This featuremakes it convenient when the cross-sectional dimension of the portfolio increases. Byapplying the model to a portfolio of Dow Jones stocks, we find that the long termcomponent co-integrates with the market principal factor, while the short term onecaptures transient swings of the market associated with the idiosyncratic componentsand the correlation structure of returns. Using quantile regressions, we assess the sig-nificance of the contemporaneous and lagged explanatory power of sentiment on returnsfinding strong statistical evidence when extreme returns, especially negative ones, areconsidered. Finally, the lagged relation is exploited in a portfolio allocation exercise. ∗ Scuola Normale Superiore, Italy. E-mail: [email protected] † University of Bologna, Italy E-mail: [email protected] ‡ University of Bologna and Scuola Normale Superiore, Italy E-mail: [email protected] eywords : Sentiment analysis; dynamic factor models; Kalman filter; expectationmaximization; quantile regression Nowadays, as Ignacio Ramonet wrote in The Tyranny of Communication, “a single copy ofthe Sunday edition of the New York Times contains more information than an educated per-son in the eighteenth century would consume in a lifetime”. This huge amount of informationcannot be read by a single person. Recent developments in machine learning algorithms forsentiment analysis help us to categorise and extract signals from text data and pave the wayfor a new area of research. The use of these new sources of textual data has become popularto analyse the relationship between sentiment and other economic variables using economet-ric techniques. (Algaba et al., 2020) refer to this new strand of literature as
Sentometrics .For instance, (Groß-Klußman and Hautsch, 2011) study the impact of unexpected news onthe displayed quotes in a limit order book, (Sun et al., 2016) show that intraday S&P 500 in-dex returns are predictable using lagged half-hour investor sentiment, (Antweiler and Frank,2004; Borovkova and Mahakena, 2015; Allen et al., 2015; Smales, 2015) study the impact ofsentiment on volatility, (Peterson, 2016) investigates the trading strategies based on senti-ment, (Tetlock, 2007; Garcia, 2013) consider the Dow Jones Industrial Average (DJIA) indexpredictability using sentiment, (Calomiris and Mamaysky, 2019) show how the predictabil-ity can be exploited in different markets around the world, (Ranco et al., 2015) analyse theimpact of social media attention on market dynamics, (Borovkova, 2015) develops risk mea-sures based on sentiment index, and (Lillo et al., 2015) show that different types of investorsreact differently to news sentiment.The approaches to sentiment analysis can be broadly classified into three categories. Thefirst class is based on (mostly supervised) Machine Learning techniques. Three steps aretypically considered. The first one is to collect textual data forming the training dataset.The second one is to select the text features for classification and to pre-process the data2ccording to the selection. The final step is to apply a classification algorithm to the textualdata. As an example, (Pang et al., 2002) compare the performance of Naive Bayes, supportvector machines, and maximum entropy algorithm to classify positive or negative moviereviews. The second category is the lexicon-based approach. It also typically consists of threesteps. The first step is the selection of a dictionary of N words which could be relevant for aspecific topic (e.g. the word great is considered as a positive word to review a movie). Thesecond one consists in tokenizing the textual data and, for each word in the dictionary, counthow many times it appears in the text. This process can be visualized with a vector of length N where the i -th element represents the number of times the i -th word of the dictionary ismentioned in the text. Finally, a measure takes the vector of length N as an input and givesa quantitative score as an output. One can refer to (Loughran and McDonald, 2011) for arelevant example in the financial literature. The third and last approach is a combination ofmethodologies coming from the first and second approach. For an overview of textual datatreatments and computational techniques, we refer to the review paper (Vohra and Teraiya,2013) and the book (Liu, 2015).However, as observed by Zygmunt Bauman in Consuming Life, as the number of infor-mation increases also the number of useless information increases, and the noise becomespredominant. Two different non-exclusive methods have been explored in the literature toremove or, at least, mitigate the impact of useless information. In the first case, a general-to-specific approach is used directly on the textual data. The amount of information can bereduced selecting only verified news (i.e. eliminating fake news), considering only the wordswhich are closely related to the topic of interest, considering the importance of any news (e.g.Da et al. 2011), selecting only news which appear for the first time (e.g. Thomson ReutersNews Analytics engine uses the novelty variable, see Borovkova et al. 2017 ), or weightinga news by means of a measure of attention (e.g. with the number of clicks it receives whenpublished in a news portal Ranco et al. 2016). Obviously, the selection of the relevant datais application-specific. For instance, fake news may be irrelevant to forecast the GDP of a3ountry but may be crucial to forecast the results of an election (e.g. Allcott and Gentzkow2017).In the second case, sentiment time series are directly considered, rather than the text sourcethey are built from. The observed sentiment is noisy and various approaches have beenproposed to filter it and to recover the latent signal. (Thorsrud, 2018) applies a 60-day mov-ing average, (Peterson, 2016) uses the Moving Average Convergence-Divergence methodol-ogy proposed in (Appel, 2003) and (Borovkova and Mahakena, 2015; Audrino and Tetereva,2019; Borovkova et al., 2017) introduce the Local News Sentiment Level model (LNSL), aunivariate method which takes inspiration from the Local Level model of (Durbin and Koopman,2012). In spite of its convenience from a practical perspective, the moving average approachis not statistically sound and the window length is usually chosen following rules of thumb,which have been tested empirically but lack a clear theoretical motivation. The methodsbased on the Kalman-Filter techniques present a natural and computationally simple choiceto extract informative signal. Unfortunately, when multiple assets are considered in theanalysis, the LNSL model does not exploit the multivariate nature of the data. One goalof this paper is to show that the covariance structure is very informative in sentiment timeseries analysis.The first contribution of this paper is to extend the existing time series methods in thelatter stream of literature. We propose to model noisy sentiment disentangling two differ-ent sentiment signals. In our approach, the observed sentiment follows a linear Gaussianstate-space model with three relevant components. The first component, named long-termsentiment is modeled as a random walk, the second component is termed short-term senti-ment and follows a VAR(1) process, and the last component is an i.i.d Gaussian observationnoise process. We name the novel sentiment state-space model Multivariate Long ShortSentiment (MLSS). We empirically show that the decomposition provides a better insighton the nature of sentiment time series, linking the long-term sentiment to the long-termevolution of the market – proxied by the market factor – while the short-term sentiments4eflect transient swing of the market mood and is more related to the market idiosyncraticcomponents. Specifically, we find that i) the long-term sentiment cointegrates with the firstmarket factor extracted via PCA; ii) the correlation structure of the short-term sentimentexplains a significant and sizable fraction of correlation of return residuals of a CAPM model.Finally, we show that the multivariate local level model provides the best description of thedata with respect to alternative models, such as the LNSL.The second contribution of the paper is to unravel the relation between news and marketreturns conditionally on quantile levels. We perform various quantile regressions showingthat sentiment has good explanatory power of returns. When contemporaneous effects areconsidered, the result is expected and holds for all models at intermediate quantile levels.However, when the analysis is focused on abnormal days – i.e. days for which returns belongto the 1% and 99% quantiles – neither the noisy sentiment nor the filtered sentiment froman LNSL model explain the observed market returns. The only model achieving statisticalsignificance is the MLSS. This result shows that it is essential to filter the noisy sentimentaccording to the MLSS, which exploits both the multivariate structure of the data anddisentangles the long- and short-term components. Moreover, a test performed on the singlecomponents confirms the intuition that the short-term sentiment is the one responsible for thecontemporaneous explanatory power. The empirical evidence in favor of the MLSS becomeseven more compelling when lagged relations are tested. When a single day lag is considered,i.e. one tests whether yesterday sentiment explains today returns, the significance of allmodels, but MLSS, drops to zero. This result holds across all quantile levels. Instead, forquantiles smaller than 10% and larger than 90%, the returns predictability for the MLSSmodel is highly significant. As before, the decomposition in two time scales is essentialand the short-term component is the one responsible of the effect. The analysis extendedincluding lagged sentiment – up to five days – confirms previous findings by (Garcia, 2013)that past sentiment contributes in predicting present returns. Interestingly, this is true forquantiles between 5% and 10%, both negative and positive, but neither in the median region5or for extreme days. In light of this findings, we finally investigated whether media andsocial news immediately digest market returns and whether this relation depends on thesign of returns. Our results provide a clear picture showing that i) the impact of marketreturns on sentiment is significant up to five days in the future when negative extremereturns – i.e. belonging to quantiles from 1% to 10% – are considered, ii) when positivereturns are considered the impact rapidly fades out and is significant only for quantilessmaller than 5%, iii) previous findings become not significant if the MLSS sentiment isreplaced by the observed noisy sentiment. Consistently with the intuition provided by theseresults, we test whether the returns predictability of the MLSS model can be exploited in aportfolio allocation exercise. We show that the portfolios generated with the MLSS sentimentseries have higher Sharpe ratio and lower risk than similar portfolios constructed with rawsentiment or sentiment filtered with the univariate LNSL model. Our model outperformsalso the benchmark constituted by the buy-and-hold equally weighted portfolio. This resultremains true when transaction costs are included.The rest of the paper is organized as follows. In section 2, we develop the multivariatemodel for the sentiment and discuss the estimation technique. In section 3, we introducethe TRMI sentiment index and describe the data used in the analysis. In section 4, wereport the empirical findings and discuss the advantages of the multivariate approach. Insection 5, we compare the various techniques and report the performances of the long-short sentiment decomposition in explaining daily returns. Section 6 describes the portfolioallocation strategies using different filtering techniques and assesses the superiority of theMLSS filter among the others. Section 7 draws the relevant conclusions and sketch possiblefuture research directions. Consider K assets and the corresponding K observed daily sentiment series S it where i =1 , . . . , K . The observed daily sentiment S it quantifies the opinions of investors and consumers6bout company i . In most cases, the observed sentiment is a continuous number in a compactset.The Local News Sentiment Level model (LNSL), presented in (Borovkova and Mahakena,2015) and subsequently used in (Audrino and Tetereva, 2019), reads as follows S it = F it + ǫ t , ǫ t d ∼ N (cid:0) , σ iǫ (cid:1) ,F it = F it − + v t , v t d ∼ N (cid:0) , σ iv (cid:1) . (2.1)for every i = 1 , . . . , K . This model is a univariate specification of the Local Level modelof (Durbin and Koopman, 2012). The latent sentiment series F it are considered as slowlychanging components, modeled as independent random walks and the parameters σ iǫ and σ iv are estimated via maximum likelihood (MLE).Since the LNSL model does not consider the correlations of the innovations among the K assets, we can easily derive its multivariate version as S t = F t + ǫ t , ǫ t d ∼ N (0 , R ) ,F t = F t − + v t , v t d ∼ N (0 , Q ) . (2.2)where S t = (cid:2) S t , . . . , S Kt (cid:3) ′ and F t = (cid:2) F t , . . . , F Kt (cid:3) ′ are K dimensional vectors, Q is a K × K symmetric matrix and R is a K × K diagonal matrix. We refer to the multidimensional LNSLmodel as MLNSL. The synchronous correlation among the innovations of the latent sentimentare described by the covariance matrix Q , while the correlations among the observation noisesare assumed to be 0. Clearly, the LNSL model is a special case of the MLNSL model whenthe matrix Q is diagonal. Since the number of parameters for this model scales as K ,the MLE of the MLNSL model is computationally demanding. For this reason, we use theKalman-EM approach described in (Corsi et al., 2015).The idea of the LNSL and MLNSL models is that the latent sentiment is a slowly changingcomponent with a Gaussian disturbance. In their empirical studies, (Audrino and Tetereva,2019) observe that the signal to noise ratio σ v σ ǫ , obtained using the LNSL filter, is very7mall. This finding indicates that the majority of the daily changes in the sentiment seriescan be considered as noise. One possible explanation of this result is that the Local Levelspecification of these models is not sufficiently rich to capture all the signals from the observedsentiment. Indeed, in newspapers and social media there is a consistent amount of articlesand opinions which represent fast trends or rapidly changing consumer preferences. Followingthe recent strand of literature on persuasion (Gerber et al., 2011; Hill et al., 2013), these fasttrends have strong but short-lived effects on consumer preferences. Since the (M)LNSL modelinterprets the latent sentiment as an integrated series, these signals are considered as noise.The main contribution of this paper is to define a new model which disentangles theslowly changing sentiment from a rapidly changing sentiment, that we name short-termsentiment, and the observation noise. In addition, it is reasonable to think that the slowlychanging components of a set of firms with common characteristics, for instance belongingto the same sector, market, or country, should be affected by the same trends and shocks.For this reason, in our model we consider a number q K of common factors driving theslow component of the sentiment dynamics. We name these common factors as long-termsentiment. We do not fix the number q a priori , but we select it by means of an informationcriterion.To provide a more quantitative intuition behind our modeling specification, let us considerthe true, but unobserved, daily investor’s mood M it of asset i . We hypothesize that the todaydaily mood can be written asMood it = Long-term Mood it + Short-term Mood it . (2.3)The Long-term Mood is composed by the yesterday Long-term Mood plus a shock s i, long t ,which is usually small but permanent, i.e.Long-term Mood it = Long-term Mood it − + s i, long t . On the contrary, the Short-term Mood is short-lived, but with a strong and highly influentialimpact. In particular, the Short-term Mood is composed by a residual part of the yesterday8hort-term Mood plus a shock s i, short , i.e.Short-term Mood it = φ i Short-term Mood it − + s i, short t . In this framework, the long-term shocks permanently change the investor’s mood while theshort-term shocks has an exponentially decaying persistence in the investor’s mood. Equation(2.3) can be rewritten asMood it = Long-term Mood it − + s i, long t + φ i Short-term Mood it − + s i, short t . (2.4)Considering the whole story and the dynamic of the two sentiments shocks, we can rewriteequation (2.4) as Mood it = t X k = −∞ ( φ i ) t − k s i, short k | {z } Short-term Mood it + t +1 X k = −∞ s i, long k | {z } Long-term Mood it , where we assumed Mood i −∞ to be negligible and equal to zero. In full generality, the multi-variate version of model (2.3) can be formulated as followsMood t = A Long-term Mood t + B Short-term Mood t , with A and B being K × K matrices. However, in light of the considerations in the previousparagraph, we restrict the matrix B to be the identity matrix. In this way, the Short-termMood is purely company-specific. We replace A Long-term Mood t with the product betweena factor loading matrix and a limited number of long-term and common factors, that is werewrite the previous equation asMood t = Λ Long-term Factor Mood t + Short-term Mood t , (2.5)where Λ belongs to R K × q with q ≤ K . It is important to notice that the significance ofΛ can be statistically tested and the selection of the number q of common factors can beperformed by means of AIC and BIC criteria. Following Audrino and Tetereva (2019), weassume that the observed sentiment S t is a noisy observation of the investors Mood t , and weformulate a state-space model for S t consistent with the intuition provided by model (2.5).9he Multivariate Long Short Sentiment model (MLSS) for the observed sentiment model,assuming a Gaussian specification for the short-term sentiment shock, long-term sentimentshock and the observation noise, reads S t = Λ F t + Ψ t + ǫ t , ǫ t d ∼ N (0 , R ) , Ψ t = ΦΨ t − + u t , u t d ∼ N (0 , Q short ) ,F t = F t − + v t , v t d ∼ N (0 , Q long ) , (2.6)where R ∈ R K × K is the diagonal covariance matrix of the observation noise ǫ t , Φ ∈ R K × K isthe matrix of autoregressive coefficients, Q short ∈ R K × K is the covariance matrix of the short-term sentiment innovations, and Q long ∈ R q × q is the covariance matrix of the random walkinnovations. In equation (2.6), F t and Ψ t are the latent processes which proxy the Long-termFactor Mood and Short-term Mood in (2.5), respectively. Please notice that the essentialdifference between equation (2.5) and equation (2.6) is that the observed sentiment, and itscomponents, are noisy versions of the investors’ mood and its long and short components.Finally, in this paper, we force a diagonal structure on the matrix Φ, thus neglecting thepossible lead-lag effects among sentiments. This restriction is introduced to limit the curseof dimensionality of the model.The estimation of the unknown parameters is based on a combination of the Kalman filterwith Expectation Maximization (Kalman, 1960; Shumway and Stoffer, 1982; Wu et al., 1996;Harvey, 1990; Banbura and Modugno, 2014; Jungbacker and Koopman, 2008). Given thatmodel (2.2) is a special case of model (2.6), in Appendix A of the supplementary materialwe only consider the estimation procedure of model (2.6). The TRMI sentiment index is constructed using over 700 primary sources, divided in newsand social media, and collects more than two millions articles per day. For any article, a“bag-of-words” technique is used to create a sentiment score, which lies between − , and one or more asset codes, which in our case refer to companies. Thetime resolution of the sentiment data is one minute.For any asset a , minute s , and day t we denote as S at,s the sentiment score and as Buzz at,s the buzz variable. Since the following empirical analysis are performed using daily data, weneed to aggregate the TRMI series on a daily basis. TRMI user guide suggests to use thefollowing equation S at = P sh t s =sh t − Buzz at,s S at,s P sh t s =sh t − Buzz at,s ∈ [ − , , (3.1)where S at refers to the daily sentiment at day t , evaluated on a 24-hour window betweenthe selected hour of day t − t − ) and the selected hour of day t (sh t ). Note that theTRMI server provides a daily frequency sentiment, where they use equation (3.1) with sh =3:30 PM. However, since we want to relate the sentiment series with close to close returns,we construct the daily sentiment series aggregating the high-frequency sentiment accordingto the trading closing hour of the NYSE (sh = 4:00 PM). For more details, please refer to(Peterson, 2016).For the empirical analysis, we consider the TRMI sentiment index of 27 out of 30 stocksof the Dow Jones Industrial Average (DJIA) over the period 03/01/2006 – 29/12/2017. Sincethe TRMI index divides the news sentiment from the social sentiment, we have a total of 54time series. A description of tickers and sectors is available in Appendix D of the supple-mentary material. Finally, the MLSS model, in its current specification, does not managemissing values in data, while some of the sentiment time series present missing observations.The EM algorithm is naturally designed to handle missing observations. However, since the “The buzz field represents a sum of entity-specific words and phrases used in TRMI computations. It canbe non-integer when any of the words/phrases are described with a minimizer, which reduces the intensityof the primary word or phrase. For example, in the phrase less concerned the score of the word concernedis minimized by “less”. Additionally, common words such as “new” may have a minor but significantcontribution to the Innovation TRMI. As a result, the scores of common words/phrases with minor TRMIcontributions can be minimized.” See TRMI user guide. We only consider 27 assets because one is missing in the Thomson Reuters dataset and two have an highratio of missing values at the beginning of the sample. , we fill them using the rolling mean over the last 5 days. In this section, we present the results of the estimation of the MLSS model for the investigatedstocks, providing an economic interpretation for the long- and short-term component of thesentiment. In the analyses, we consider separately the case of news and social sentimentindicator.The first quantity to fix is the number q of long-term sentiment factors. Using theBayesian information criteria (BIC) we select q news = 2 and q social = 2.Table 1 reports the values of Φ and Λ with the estimation errors . Bold values indicateparameters which are significantly different from 0 with a p-value smaller than 0 .
05. Wenotice that most of the estimated parameters are statistically significant.
Figure 1:
Goldman Sachs sentiment series. In blue the observed sentiment, in orange the filteredsentiment including both long-term and short-term component.
As an illustrative example, Figure 1 shows how the filter works for the Goldman Sachsnews sentiment series. We observe that a high fraction of the sentiment daily variation iscaptured by the filter. In Appendix E of the supplementary material we quantify more indetail the signal-to-noise ratio of the proposed filter. We find that the MLSS model has
47 out of 54 sentiment series have less than 1% of missing observations. All the series have a percentageof missing which is smaller than 7 . Note that the Λ matrices, as discussed in the supplementary material, have the upper triangular sub-matrix equal to zero.
12 signal-to-noise ratio approximately twenty times larger than the MLNSL. Moreover, thenoise in social media is generally higher than the noise in newspapers.The MLSS approach considers two new quantities extracted from the observed sentiment.The first novelty is the long-term sentiment which, by construction, represents the series ofcommon trends in a particular basket of sentiment time series. The second novelty is themultivariate structure of sentiment, extracted using the symmetric matrix Q short . In thenext sections, we separately analyse the relation between these two quantities and the stockmarket prices. To this end, we extract the market factors from the stock prices of theseassets. Denote as r t ∈ R the vector of demeaned close-to-close log-returns and evaluatethe unconditional covariance matrix Q ret and the unconditional correlation matrix C ret . Weextract the factor loading matrix Λ mrk ∈ R q mrk × using the PCA on the matrix C ret and definethe return factors R t = Λ mrk r t ∈ R q mrk . We also define the market factors as M mrk t = Λ mrk p t ,where p t ∈ R is the vector of log-prices. In the following analysis, we consider q mrk = 1and name the first market factor Dow 27. We first investigate the economic meaning of the long-term sentiment. Using the Engle-Granger test (Engle and Granger, 1987), we observe that one of the factors of the long-term sentiment is cointegrated with the Dow 27. Figure 2 shows the cointegration relation,pointing out that the main driver of the prices and the driver of the sentiment time seriesreflect the same common information. This result per se is not surprising. However, Figure3 shows the standardized weights of the cointegrated factors. The weights of the marketfactor are very homogeneous across assets, as shown in the top panel, while the weightsof the cointegrated factor of the long-term sentiment are very heterogeneous, as shown inthe bottom panel. The values of the elements of the factor loading matrix Λ news reportedin Table 1 are either positive or negative . Then, some firm’s sentiment positively affectsthe common sentiment factors, while some other firm’s sentiment negatively affects them. The elements of the factor loading matrix Λ social are available upon request. ickers Φ news Λ news Signal to noiseMLSS MLNSLAXP .
464 1 . .
623 0 . (0 . . JPM . − .
169 0 . .
326 0 . (0 . . . VZ .
682 0 . − .
080 0 .
431 0 . (0 . . . CVX .
545 0 .
103 0 . .
610 0 . (0 . . . GS . − .
239 0 . .
336 0 . (0 . . . JNJ .
407 0 .
851 0 . .
788 0 . (0 . . . MRK .
336 0 .
811 0 . .
832 0 . (0 . . . PFE .
299 0 .
530 1 . .
185 0 . (0 . . . UNH .
374 1 .
177 0 . .
574 0 . (0 . . . BA .
585 0 .
376 0 . .
896 0 . (0 . . . CAT .
633 0 . .
045 0 .
423 0 . (0 . . . GE .
581 1 . − . .
587 0 . (0 . . . MMM .
295 0 . .
072 0 .
788 0 . (0 . . . UTX .
331 0 . − . .
690 0 . (0 . . . XOM . − . . .
725 0 . (0 . . . KO .
486 0 .
476 0 . .
620 0 . (0 . . . PG .
337 0 . − . .
929 0 . (0 . . . AAPL .
593 0 .
221 0 . .
736 0 . (0 . . . CSCO .
714 1 . − . .
441 0 . (0 . . . IBM .
603 0 . − . .
853 0 . (0 . . . INTC .
641 0 . − . .
865 0 . (0 . . . MSFT .
651 0 . − .
007 0 .
668 0 . (0 . . . DIS .
439 0 . − . .
074 0 . (0 . . . HD .
611 1 .
137 0 . .
473 0 . (0 . . . MCD . − . .
020 1 .
401 0 . (0 . . . NKE .
368 0 . − . .
783 0 . (0 . . . WMT .
516 0 .
147 0 . .
854 0 . (0 . . . Table 1:
Static parameters of model (2.6) for news sentiment. Values and standard errors ofestimated Λ are multiplied by 10 . In parenthesis we show the standard error of the estimatedparameter. The last two columns show the signal to noise ratio for two competing models.
14e checked whether the heterogeneity of weights were related with the number of news ofa given asset, or with the buzz index, but we found no significant evidence. Unravellingthe origin of the detected heterogeneity is an interesting research question, that could beprobably answered by looking at the contents of the articles from which the sentiment wascomputed. Unfortunately, we do not have access to this kind of information.
Figure 2:
Co-integration between Dow 27, in blue, and the second factor of the news long-termsentiment, in orange. Time series are scaled.
AAPLAXP BA CATCSCOCVX DIS GE GS HD IBM INTC JNJ JPM KO MCDMMMMRKMSFTNKE PFE PG UNH UTX VZ WMTXOM00.10.20.30.40.5 AAPLAXP BA CATCSCOCVX DIS GE GS HD IBM INTC JNJ JPM KO MCDMMMMRKMSFTNKE PFE PG UNH UTX VZ WMTXOM-0.5-0.3-0.10.10.30.5
Figure 3:
Values of the standardized factor loadings of the cointegrated series. Top panel: loadingsof the Dow 27 index. Bottom panel: loadings of the second factor of the news long-term sentiment.
The second novelty of the MLSS model is the multivariate structure of the short-term sen-timent series. The question we want to address in this section is whether the correlationstructure of the short-term sentiment is (linearly) related with the correlation structure15f the daily returns. In the previous section, we observed that one of the factors of thelong-term sentiment is cointegrated with the first market factor. We therefore expect theshort-term sentiment to capture asset-specific features, i.e. we expect a close relation withthe idiosyncratic dynamic of the returns . To test this intuition for the correlation structure,we compare the results of the MLSS model with the results of the MLNSL model which,by construction, does not disentangle the factors from the sentiment series. If the intuitionis correct, the correlation matrix of the sentiment extracted using the MLSS model shouldbe linearly related with the return correlations and with the idiosyncratic return correla-tions. On the contrary, the correlation matrix of the sentiment extracted using the MLNSLmodel, which only captures the slowly changing dynamics of the sentiment series, and thusof the first market factor, should be linearly related with the returns correlation but mildlycorrelated with the idiosyncratic returns correlations. Finally, to test whether the filteringprocedure is a crucial step in our approach, the correlation matrix of the observed sentimentis also considered.We define C short as the correlation matrix associated with the covariance matrix Q short , C MLNSL the correlation matrix associated with the covariance matrix Q of equation (2.2), C Obs = Corr (∆ S t ) the unconditional correlation of the first difference of the observed senti-ment, and C ret the unconditional correlations matrix of the stock returns. We search for alinear element-wise relation between C ret and C model , where model is one of short, MLNSL,or Obs. The results are reported for the news case only, but the conclusions are similar forthe social sentiment.We perform a standard ordinary least squares estimation on the model vechl ( C ret ) = α + β model vechl ( C model ) , (4.1)where vechl ( X ) is the operator which collects the upper diagonal elements of matrix X in acolumn vector. We compare the results obtained using the MLSS model ( C model = C short ), We define idiosyncratic returns as the market returns where the first market factor is removed using thefactor model (4.2) C model = C MLNSL ) and using the Observedsentiment ( C model = C Obs ). In addition, since the unconditional correlation between twoassets is higher when they belong to the same sector, we separately consider two cases. Inthe first case, we estimate model (4.1) considering all the pairs of assets. In the second case,we estimate model (4.1) considering only the pairs of assets belonging to the same economicsector according to Table 8.The top left panel of Table 2 shows the results with all the correlation pairs. In the firstcolumn we report the R of the regression, in the second column we report the F-statisticand the relative p-value is reported in the third column. The regressions with C short and C MLNSL have high and significant p-values, while the regression with C obs is not statisticallydifferent from the model with the intercept only. This finding has two implications. Thefirst one is that the sentiment innovations have a similar correlation structure of the returnsinnovations. In particular, if the returns of two assets are relatively highly correlated, thenalso the increment of the filtered sentiment of the news about these assets are relativelyhighly correlated. The second implication is that, if a filtering procedure is not applied onthe observed sentiment data, the noise is too large to find significant results. In the topright panel of Table 2 we report the results of the model (4.1) applied to the pairs of assetsbelonging to the same sector. We observe that the R increases for all models. This resultis expected since it is well known that the return correlation is higher and more significantbetween two assets of the same sector. However, even if the R increases, the number ofpairs decreases. For this reason, the increment in the R does not lead to an increment inthe F -statistic, which fails to reject the null hypothesis for the C obs . This result confirmsthat the C obs matrix is not a significant regressor for C ret .Comparing the top panels of Table 2, we note that the increment in the R is higher for theMLSS model rather than the MLNSL model. This evidence is consistent with the intuitionthat the short-term sentiment series, extracted using the MLSS model, are more related withthe idiosyncratic returns. Indeed the correlation induced by the market factor is predominant17 odels All assets Same sector R F -statistic p -value R F -statistic p -valueMLSS 13.77 % 55.713 0.0000 37.89 % 23.182 0.0000MLNSL 15.63 % 64.669 0.0000 28.78 % 15.359 0.0004Obs 0.95 % 3.330 0.0689 4.19 % 1.662 0.2052MLSS 11.34 % 44.659 0.0000 30.91 % 17.001 0.0002MLNSL 4.31 % 15.700 0.0001 7.50 % 3.081 0.0873Obs 1.01 % 3.554 0.0602 4.88 % 1.950 0.1707 Table 2:
Top rows: Results from the linear regression (4.1). Bottom rows: Results from thelinear regression (4.3). Left columns: OLS estimates when all the assets are considered; rightcolumns: OLS estimates when only the correlations between stocks belonging to the same sectorare considered. Obs rows: estimation based on the observed sentiment. in the first case, reported in the top left panel, where all the assets are considered, ratherthan the second case, reported in the top right panel, where the co-movements are not onlydriven by the first market factor, but they are also driven by sector-specific factors.Now we extract the Dow 27 return from the asset returns using a one-factor model. Werepeat the analysis comparing the matrices C short , C MLNSL and C Obs with the unconditionalcorrelation of the idiosyncratic returns. We extract the market factor R t from the returnsusing the factor model r it = α i + β i R t + z it , ∀ i = 1 , . . . ,
27 (4.2)where z it ∼ N (0 , ˜ Q ret ). We then compute the cross-correlation matrix ˜ C ret from the covari-ance matrix ˜ Q ret and estimate the following model vechl ( ˜ C ret ) = α + β model vechl ( C model ) . (4.3)The bottom panels of Table 2 report the results. In the bottom left panel we show theresults for the model (4.3) where all the correlation pairs are considered. The first evidenceis that the MLNSL R dramatically decreases, while the MLSS R remains almost the same.This finding suggests that almost all the return correlations explained by the C MLNSL matrixare associated with the market factor R t , while the matrix C short , which represents the fasttrends on the sentiment data, also captures different dynamics.In the bottom right panel, we show the results for the model (4.3) where we consider only18he correlation pairs for assets belonging to the same sector. In this case the differencesbetween the MLSS and MLNSL are more severe. Indeed, the MLSS model still has a highand highly significant R , while the F -statistic for the MLNSL model fails to reject the nullthat β MLNSL , defined in equation (4.3), is equal to 0. Again, the model with the observedsentiment has not significant p-values.As a last observation, we see the different behavior of the sectors in this regressionexercise. Figure 4 reports the scatter plot of the elements of C short versus the correspondingvalues of C ret when the two stocks belong to the same economic sector, characterized by aspecific marker. We also superimpose the regression line obtained from equation (4.1). Notethat the behavior is different among sectors. The financial sector, marked with blue dots, isthe one with highest linear relation and the three assets belonging to this sector have all highreturns and sentiment correlations. On the contrary, the consumer cyclical sector, markedwith garnet-red triangles, has a high dispersion among the correlations of the 5 assets. -0.05 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.450.40.450.50.550.60.650.70.750.8 Figure 4:
Scatter plot of the news short-term sentiment correlations and the return correlationsfor pairs of assets in the same sector. The line corresponds to the regression (4.1).
In summary, Sections 4.1 and 4.2 support the intuition behind the MLSS model. Indeed,the slowly changing components of the sentiment are effectively captured by the long-termsentiment. We successfully confirmed this hypothesis in Section 4.1. At the same time, theshort-term sentiment effectively describes the firm-specific behavior of the returns. Section4.2 shows that the MLSS model can capture different features of the returns, while the19LNSL mainly captures the sentiment component associated with the market.
The goal of this section is to assess the explanatory power of the sentiment with respect tothe market returns using the different filters presented in the previous sections. In particular,we show that both the extraction of long-term and short-term sentiment components andthe multivariate specification of the model are crucial ingredients to capture the synchronousand lagged effects.We consider the asset prices P it of the 27 stocks of the Dow 30 and construct the equallyweighted portfolio M t = 127 X i =1 P it (5.1)as a representative portfolio and denote with r mt its log-returns. We consider a representativeportfolio for two reasons. Firstly, (Beckers, 2018) shows that the returns predictability usingsentiment indicators is higher when using market indexes rather than single stocks. Secondly,using a representative portfolio we can compare different filtering techniques which do or donot consider the multivariate structure.We define ¯ S news t = P i =1 S i,newst and ¯ S social t = P i =1 S i,socialt as the sentiment associated tothe representative portfolio. We consider five different filtering techniques defined as follow:1. S MLSSt is the filtered signal obtained using the MLSS model in equation (2.6). Theresulting filtered quantities are 4 long-term sentiment factors F MLSSt , 2 for the newsand 2 for the social sentiment, and 54 short-term sentiment series Ψ
MLSSt , 27 for thenews and 27 for the social sentiment. We compute the cross-sectional average for thenews short-term sentiment ¯Ψ
MLSS,newst and social short-term sentiment ¯Ψ
MLSS,socialt .As a final result, we define S MLSSt = h ∆ F MLSS,newst , ∆ F MLSS,socialt , ¯Ψ MLSS,newst , ¯Ψ MLSS,socialt i ′ ∈ R . S LSSt is the filtered signal obtained applying the MLSS model directly to the univariateseries ¯ S news t and ¯ S social t . For identifiability reasons, the number of common factors isone. The motivation behind this model is to test whether a simple cross-sectionalaverage of sentiment time series can be an effective proxy of the sentiment of therepresentative asset. This approach intentionally neglects the multivariate structure ofthe sentiment and treats it as a non relevant feature. A similar reasoning has been usedin (Borovkova et al., 2017). The resulting filtered quantities are 2 long-term sentimentfactors F LSSt , one for the news and one for the social sentiment, and 2 short-termsentiment series ¯Ψ
LSSt , one for the news and one for the social sentiment. The finalmodel reads S LSSt = h ∆ F LSS,newst , ∆ F LSS,socialt , ¯Ψ LSS,newst , ¯Ψ LSS,socialt i ′ ∈ R . S MLNSLt is the filtered signal obtained using the MLNSL model in equation (2.2) fromthe 54 observed sentiment time series. The resulting filtered quantities are 54 filteredsentiment series F MLNSLt , 27 for the news and 27 for the social sentiment. We computethe cross-sectional average for the news sentiment ¯ F MLNSL,newst and social sentiment¯ F MLNSL,socialt . As a final result, we define S MLNSLt = h ∆ ¯ F MLNSL,newst , ∆ ¯ F MLNSL,socialt i ′ ∈ R . S LNSLt is the filtered signal obtained applying the LNSL model, introduced by (Borovkova and Mahakena,2015) and presented in equation (2.1), to ¯ S news t and ¯ S social t . As for the LSS model, themotivation behind this choice is to test whether the multivariate structure of sentimentis a relevant feature or not. We obtain two filtered sentiment series ¯ F LNSLt , one for thenews and one for the social sentiment. We then define S LNSLt = h ∆ ¯ F LNSL,newst , ∆ ¯ F LNSL,socialt i ′ ∈ R . S obst only considers the observed sentiment ¯ S news t and ¯ S social t Obst = (cid:2) ∆ ¯ S news t , ∆ ¯ S social t (cid:3) ′ ∈ R . In summary, the five models allow us to separate the effect of the different components. TheMLSS model exploits all the possible information from the multivariate time series and allthe relevant common factors are considered. The average across assets is computed at alater stage on the short-term sentiment. For this reason, it does not affect the long-termcomponents. The LSS model computes the cross-sectional average as a first step and doesnot exploit the multivariate structure. Then, both the short-term and long-term componentsare different from the one of the MLSS model. The MLNSL and LNSL models differ onlyon the step of the aggregation. The first model applies the filter on the multivariate timeseries, while the second model applies the filter on the aggregated time series. Finally, theObs model works as a benchmark.
In this section, we investigate the lagged relation between sentiment and market returns.The recent literature for the DJIA (Garcia, 2013) and for the gold futures (Smales, 2014)found that the reaction to news is more pronounced during recessions. For this reason, we usethe quantile regression in place of a simple linear regression to obtain a more comprehensiveanalysis of the relationship between variables. In Appendix F of the supplementary materialwe report the investigation on the contemporaneous relation between sentiment and returns.
We consider the following quantile regression r m ( τ ) = α ( τ ) + β model ( τ ) S model t − h , where model denotes one of the five filtering models presented above. According to (Koenker and Machado,1999), we can compare the explanatory power of a selected model according to the R mea-22 quantiles R ( τ ) measure MLSS LSS MLNSL LNSL Obs0 .
01 12 . ∗∗∗ .
5% 0 .
3% 0 .
2% 0 . .
05 3 . ∗∗∗ . ∗∗ .
1% 0 .
0% 0 . .
10 1 . ∗∗∗ . ∗∗∗ .
0% 0 .
0% 0 . .
33 0 .
2% 0 .
1% 0 .
0% 0 .
0% 0 . .
50 0 . ∗ .
1% 0 .
1% 0 .
1% 0 . .
66 0 . ∗∗ .
2% 0 .
1% 0 .
1% 0 . .
90 2 . ∗∗∗ . ∗∗∗ .
2% 0 .
1% 0 . .
95 5 . ∗∗∗ . ∗∗∗ .
3% 0 .
1% 0 . .
99 11 . ∗∗∗ .
4% 0 .
0% 0 .
5% 1 . Table 3:
The R measure across the value τ for the one-lag quantile regression. We denote with ∗∗∗ the significance at 1%, ∗∗ the significance at 5% and ∗ the significance at 10% sure. In particular, if we consider the functional expression for the quantile regressionˆ V ( τ ) = min ( α,β ) T X t =1 ρ τ ( r mt − α − βS t − h ) , (5.2)where ρ τ ( u ) = u ( τ − I u< ), we can define the quantile R measure as R ( τ ) = 1 − ˆ V ( τ )˜ V ( τ ) , where ˜ V ( τ ) is evaluated restricting equation (5.2) with the intercept parameter only. Incontrast with the R measure of the linear models, R ( τ ) is a local measure of goodness offit and only applies to a particular quantile. In addition, (Koenker and Machado, 1999) showthat using ˆ V we can test the significance of the β model parameters. Considering β model = 0as the null hypothesis and F as the probability distribution of the i.i.d. residuals { u i } , thestatistic L T ( τ ) = 2( ˜ V ( τ ) − ˆ V ( τ )) τ (1 − τ ) s ( τ ) → χ q (5.3)where q is the dimension of β model and s ( τ ) = 1 /f ( F − ( τ )).As a first step, we consider h = 1. We evaluate the R ( τ ) statistic and test the significanceusing the χ -test. Table 3 reports the values and significance of the R measure. A findingis common among all models: the values of R are higher in the tails and lower close to themedian. In addition, what we observe is extremely promising for the Long-Short modeling23pproach. The significance of the noisy sentiment is zero for all quantile levels. Filteringthe time series is essential to recover predictability. However, filtering alone is not sufficient.Indeed, neither the predictability of the LSNL model nor of the multivariate extension ML-SNL is statistically significant. Significance is recovered only when the filtered sentiment isdecomposed into the short-run and long-run components. This is true for extreme returns,both positive and negative. The result is stronger when the LSS model is replaced by theMLSS, meaning that the cross-sectional dependence is an important ingredient to enhancepredictability.A further advantage of the long-short decomposition is that we can properly asses the rel-ative contribution of the two components. In particular, we use equation (5.3) to test the sig-nificance of the parameters in the MLSS model. Considering the S MLSS = (cid:2) ∆ F MLSSt , ¯Ψ MLSSt (cid:3) ,the significance of the parameter β LT ∈ R and β ST ∈ R can be tested using˜ V LT ( τ ) = min ( α,β LT ) T X t =1 ρ τ (cid:0) r mt − α − β LT ∆ F MLSSt − h (cid:1) and ˜ V ST ( τ ) = min ( α,β ST ) T X t =1 ρ τ (cid:0) r mt − α − β ST ¯Ψ MLSSt − h (cid:1) , which lead to the statistics L LT ( τ ) = 2( ˜ V ST ( τ ) − ˆ V ( τ )) τ (1 − τ ) s ( τ ) → χ (5.4)and L ST ( τ ) = 2( ˜ V LT ( τ ) − ˆ V ( τ )) τ (1 − τ ) s ( τ ) → χ . (5.5)We report the p-values of the test statistics (5.4) and (5.5) in Table 4. The contributiongiven by the short-term sentiment is strongly significant, in particular for extreme quantiles.On the contrary, the long-term sentiment is not significant in 6 out of 9 quantiles. Theresults support the intuition that, if today a very high or very low return appears, it can bepartially explained by the yesterday’s rapidly changing mood, while the permanent trend inthe sentiment series have almost no impact. 24 quantiles p -values L STt − L LTt − .
01 0 . . .
05 0 . . .
10 0 . . .
33 5 . . .
50 16 . . .
66 7 . . .
90 0 . . .
95 0 . . .
99 0 . . Table 4: p-values for the statistics L STt − ∼ χ and L LTt − ∼ χ defined in a similar fashion toequations (5.5) and (5.4). The experiments performed in the contemporaneous (see Appendix F in the supplemen-tary material) and one-lag cases show that the MLSS model is the best model to capturethe return variations. For this reason, for the multi-period analysis we will only consider theMLSS model.Considering a general h , we wonder if extra lags can add explanatory power to the regressionexercise. Using the functional formˆ V h, MLSS ( τ ) = min( α ,α β ∈ R ,β ∈ R h − ) T X t = h +1 ρ τ (cid:0) r mt − α − α r mt − − β S MLSS t − − β L h − ( S MLSS t − ) (cid:1) , we separate the contributions given by the first and higher order lags. Under the nullhypothesis that β = 0, the statistic L h, MLSS t − h ( τ ) = 2( ˆ V , MLSS ( τ ) − ˆ V h, MLSS ( τ )) τ (1 − τ ) s ( τ ) → χ h − . (5.6)Following (Tetlock, 2007; Garcia, 2013), we fix a maximum number of h = 5 and Table 5reports the p-values for the different values of h . The h -lagged sentiment series are unin-formative in the median region, where the one lag sentiment have less explanatory powertoo. However, in agreement with (Garcia, 2013), the lagged sentiment remains informativefor few days and, in our case, this is true for the 5%, 10%, 90%, and 95% quantile levels. Itis worth noticing that the 1% and 99% quantiles are unaffected by higher-order lags. Thisshows that, in case of very good or very bad days, the returns are strongly driven by very25 h = 2 h = 3 h = 4 h = 50 .
01 18 . . . . . . % . % . % . %0 . . % . % . % . %0 .
33 65 . . . . .
50 62 . . . . .
66 43 . . . . . . % . % . % . %0 .
95 12 . . % . % . %0 .
99 38 . . . . Table 5: p-values for the statistics defined in equation (5.6) for different values of h . Bold valuescorrespond to β significantly different from zero. fresh news ( h = 1) while the older news have no informative power. This section details an economic application of the MLSS model in portfolio selection andbenckmarks the results against a buy-and-hold strategy. We consider the equally weightedportfolio in equation (5.1) and the five filtered signals S MLSSt , S LSSt , S MLNSLt , S LNSLt and S Obst introduced in the previous section. It is worth noticing that (Beckers, 2018) and (Garcia,2013) showed that the predictability power of the sentiment series declined after 2007. Forthis reason, we want to challenge the filtering techniques to predict the future daily returnsin the time window 2007-2019.In the first part of this section, we use the sentiment signals as exogenous variables tobuild a simple classifier and we introduce five trading strategies based on the five sentimenttime series. Then, we test these strategies on the February 2007 - June 2017 window. Thisperiod offers a large series with different economic conditions. The sentiment models areestimated in the same time window. The estimation of multivariate models (MLSS andMLNLS) employs a backward looking technique based on smoothing recursions. Then, onemay argue that for the multivariate case the estimation technique may introduce some sortof forward looking bias. We claim that this bias, if any, is negligible and we perform arobustness check where we use the parameter values from February 2007 - June 2017 period26o filter the TRMI sentiment series from July 2017 to December 2019. In this way, thetrading signals cannot be affected by any forward looking bias. The results in the out-of-sample period confirm those from February 2007 - June 2017, showing that the tradingstrategies built on the MLSS model are the best performers. The details of the robustnesscheck can be found in Appendix H of the supplementary material.
In the financial literature, several papers support the strong out-of-sample performance ofthe equally weighted portfolio (e.g. DeMiguel et al. 2009). The 1 /n portfolio is used as abaseline for our trading strategies and the long passive position in this portfolio is called buy-and-hold strategy. Given that the buy-and-hold portfolio offers a good out-of-sampleperformance, we assume an investor who only deviates from the baseline strategy if a strongsignal which predicts a negative return arrives from the sentiment series. For this reason,the criterion variable needs to capture the behavior of the left tail of returns distribution.We define the criterion binary variable as Y t = , for ˜ r mt < z / , otherwisewhere z / is the 1 / r mt = r mt / √ RV t are the standardized marketreturns with the realized variance, RV t , evaluated by means of 5-minute intraday returns.The standardization of the returns is crucial to eliminate possible effects due to the persis-tence of volatility. The choice of the 33% quantile is consistent with the findings of Section5.1.1. Moreover, it is a balance between a more conservative choice – a smaller quantile onlysensitive to more extreme and predictive events – and a larger quantile, which provides alarger number of selling signals but less predictive power.Since the goal of this paper is to show that the choice of the filtering procedure is essential,a simple classification technique is used. As a classifier, we consider the following conditional27ogit model P ( Y t +1 = 1 | X t ) = logit (cid:0) X mod t θ (cid:1) , (6.1)where logit( X t θ ) = e Xtθ e Xtθ and X mod t = (cid:2) , ˜ r mt , S mod t (cid:3) . We recall that S mod t is a vector whosedimension depends on the filtering model. For further details see the first part of Section 5.The predicted binary value is defined asˆ Y mod t +1 = , for logit( X mod t θ ) > . , otherwise . (6.2)The main advantages of the conditional logit model are twofold. On one hand, the condi-tional logit model can be easily estimated using MLE. On the other hand, we can easilyassess the fitness of the model on the data using the Mc Fadden’s R measure defined in(McFadden et al., 1973) as R = 1 − log( L m )log( L ) ∈ [0 , .L m represents the maximum likelihood of the complete model (6.1) and L is the maximumlikelihood of the bare model based only on the intercept. The models are estimated usingoverlapping rolling windows of 6 months (126 observations). We verified that this choice issufficient to capture the time-varying nature of the explanatory power of the sentiment series.Figure 5 shows the value of R over the February 2007 - June 2017 period. The MLSS modelhas the highest R w.r.t the other models, which typically translates in a higher predictivepower. In addition, the MLSS R has a high variability, suggesting that the predictive powerchanges through time. This latter finding suggests that the sentiment signal can be a goodreturns predictor in certain periods and a poor predictor in others. This intuition will beexploited later to generate trading strategies based on the R . The estimated ¯ Y mod t definedin (6.2) translates in the trading signal s mod t +1 = , if ˆ Y mod t +1 = 0 − , if ˆ Y mod t +1 = 1 (6.3)28igure 5: McFadden’s R for the different filtering methods using negative abnormal returns. where s mod t +1 = 1 ( s mod t +1 = −
1) represents a buy (sell) signal in the equally weighted portfolio(5.1). At any day t , at the closing time of the trading day, the investor uses the sentimentsignal S mod t and the standardized realized daily returns ˜ r mt to forecast the binary variableˆ Y mod t +1 and the relative trading signal. Naming c the number of shares bought or sold in anytransaction, there are three possible scenarios1. s mod t = s mod t +1 : In this case the prediction on the future realization does not change andthe investor does not re-balance the portfolio.2. s mod t = +1 and s mod t +1 = − t but the prediction changed. She sells the current position and shortsells c shares of the same portfolio.3. s mod t = − s mod t +1 = +1 : The investor had a short position in the equally weightedportfolio at time t but the prediction changed. She buys 2 c shares of the portfolio.Please notice that the only exception is for s mod1 because we initialized s mod0 = 0. In this case,the equally weighted portfolio is bought when s mod1 = 1 and it is short sold when s mod1 = − P mod t +1 = s mod t +1 c M t +1 + cash t +1 , cash t +1 = cash t − ( s mod t +1 − s mod t ) c M t +1 − | s mod t +1 − s mod t | c M t +1 cost2 , (6.4)29here cost is the percentage trading cost and M t is defined in (5.1). The first equation in(6.4) shows that the value of the portfolio is composed by the value of the invested amount s mod t +1 c M t +1 plus the cash position. The latter increases when s mod t +1 < s mod t , meaning that theinvestor sells the portfolio and receives cash, and decreases when s mod t +1 > s mod t , meaning thatthe investor buys and erodes the cash position. The second equation includes the impact ofthe transaction costs. Specifically, every time that a transaction happens, i.e. s mod t +1 = s mod t ,the investor pays an extra cost proportional to the current value of the equally weightedportfolio M t +1 .We fix the starting point s mod0 = 0, cash = 100 , c = 100 , /M .In the paper we only report the results for the case with trading costs, while the resultswith zero trading costs are reported in Appendix G of the supplementary material. Fromnow on, we refer to without trading costs when the portfolio in equation (6.4) is evaluatedwith cost = 0 and to with trading costs when costs = 0 .
1% as in (Gilli and Schumann,2009) and (Avellaneda and Lee, 2010). In the following sections, the number of transac-tions is evaluated as
T r mod = P T − i =0 | s mod i +1 − s mod i | and the transaction costs are evaluated as T c mod = P T − i =0 | s mod i +1 − s mod i | c M i +1 cost2 . It is worth noticing that the change of signal effec-tively produces two transactions. For instance, if the signal moves from s t = 1 to s t +1 = − s t = 1, s t +1 = − s t +2 = 1 producing a total of four transactions.The transaction costs can strongly depress the overall performance of the portfolio. Topartially mitigate this drawback, we can decrease the number of transactions using theMcFadden’s R as a measure of the reliability of the signal ˆ Y mod t . We compute the empiricalquantile z ,tα ( R ) of the McFadden R over the time window (1 , · · · , t ). The quantile z ,tα ( R )is F t -measurable and does not introduce a forward looking bias. We can reduce the numberof trades conditioning the selling signal at time t on the level of the McFadden’s R evaluated30n the previous 6 months. The R adjusted trading signal is then defined as follows¯ s mod t = − , if ˆ Y mod t +1 = 1 and R , mod t > z ,tα (cid:0) R , mod (cid:1) , otherwise . (6.5)The value α determines the reduction in the number of trades. The higher α is, the smalleris the number of transactions. The five strategies, together with the buy-and-hold strategyitself, are evaluated according to six measures, the annual return , the annual volatility , the annual negative volatility , the Sharpe ratio , the
Sortino ratio , and the maximum drawdown (MDD). In the next section, in a first step, the portfolios with the trading signals (6.3) withand without trading cost are analysed. Then, we assess the impact and the performance ofthe trade reduction strategy based on (6.5).
The 2007-2009 crisis and the 2009-2017 bull market are good backtesting periods for thesentiment portfolios because we can test the return predictability during different marketconditions.Table 6 reports the performances of the five sentiment strategies together with the buy-and-hold portfolio with trading costs. The sentiment-based strategies have, excluding theLNSL and the Obs, a smaller volatility and MDD than the buy-and-hold portfolio. Inaddition, the MLSS portfolio produces returns similar to the buy-and-hold strategy, lowernegative volatility, and consequently higher Sharpe and Sortino ratios than all the otherstrategies. The lower performance for the annual returns is due to the higher transactioncosts. Indeed in Appendix G of the supplementary material we show that, when the tradingcosts are not considered, the MLSS strategy produces higher annual returns than all theother strategies. In addition, when we compare without trading costs experiment with the with trading costs experiment, the excessive number of transactions for the MLSS strategyreduces the Sharpe ratio gain with respect to the buy-and-hold portfolio from 40% to 10%and the Sortino ratio gain from 48% to 16%. In Appendix I of the supplementary material31 easures BH MLSS LSS MLNSL LNSL ObsA. return (%) .
891 6 .
977 8 .
882 8 .
143 6 . . .
136 17 .
952 19 .
431 19 . . .
339 14 .
474 15 .
374 16 . . .
385 0 .
495 0 .
419 0 . . .
487 0 .
614 0 .
53 0 . Table 6:
Performances of the six strategies with transaction cost for the period February 2007 -June 2017. In bold, the best performance per row. BH is the buy-and-hold portfolio, while MLSS,LSS, MLNSL, LSNSL, and Obs correspond to portfolios built from the corresponding model forthe sentiment time series. we show that the selling signal generated by the MLSS sentiment series corresponds tostatistically significant returns predictability. The transaction costs incurred by the MLSSportfolio throughout the nine years amount in total to 38% of the starting capital. For thisreason, we employ the trading signal ¯ s MLSS defined in equation (6.5), which penalizes signalswith moderate McFadden’s R . Table 7 reports the performances of the strategies based onthe penalized signal for different values of α . As expected, the higher the value of α and thelower the number of transactions is. In addition, the R -based signal produces higher qualitysignal and effectively increases the performance of the portfolios. The number of transactionsdecreases almost linearly but the Sharpe and Sortino ratios strongly increase. They reacha maximum value when α = 0 .
65. These findings further corroborate the intuition that theMLSS sentiment strongly anticipates future returns during the financial crisis, given that the R values in figure 5 are higher than the unconditional average during the 2007 − easures BH α = 0% α = 20% α = 35% α = 50% α = 65% α = 80%A. return (%) 8 .
975 7 .
891 8 .
225 9 .
575 9 . . .
132 15 .
209 15 .
679 14 .
083 13 . . .
601 10 .
888 11 .
196 9 .
901 9 . . .
469 0 .
519 0 .
525 0 .
680 0 . . .
660 0 .
725 0 .
735 0 .
967 1 . . Table 7:
Performances of the MLSS based strategies built from equation (6.5) for different valuesof α × In this paper, we presented a novel way to filter multivariate sentiment time series. Theapproach is very general and encompasses previous models discussed in the literature. Us-ing a dynamic factor model, we were able to identify two different sentiment components.The first one, named long-term sentiment and modeled as a random walk, captures thecommon trends which drive the long-term dynamics. The second component, dubbed short-term sentiment and modeled as a VAR(1) process, captures short-term swings of marketmood. An extensive empirical section investigates the different features of the two sentimentcomponents. In a first analysis, we pointed out that one of the long-term sentiment fac-tors co-integrates with the first principal component of the market. Quite surprisingly, thestructure of the sentiment factor loadings does not mimic the typical uniform profile of themarket factor. Some assets are over-expressed and contribute to the factor with a positiveor negative sign, while others are under-expressed. Concerning the short-term sentiment,its multivariate dependence structure explains a sizable fraction of the residual covariancein a single factor market model. This result suggests that the short-term component cap-tures transient and rapidly changing trends associated with the idiosyncratic components ofthe market. In a second analysis, based on quantile regression, we showed that the Multi-variate Long-Short Sentiment model provides the highest explanatory power of lagged andcontemporaneous returns. Essential to achieve statistical significance are the multivariate33ature of the approach and the separation of the sentiment signal in a long and a shortcomponent. In particular, disentangling the short-term sentiment is crucial to capture thebehavior of extreme returns. In a further analysis, we observed that newspapers and socialmedia differently react to negative and positive returns. Specifically, they can effectivelyexplain abnormal returns from one to five days in advance, but they almost immediatelydigest the positive market realizations while they echo negative realizations for several daysto come.It is worth noting that (Tetlock, 2007) and (Garcia, 2013) reported results similar to ours forthe unfiltered sentiment focusing on period before 2007. Using the TRMI dataset, (Beckers,2018) showed that the forecasting power on returns of the sentiment dropped dramaticallyafter 2007. Our results suggest that the filtering procedures are more important nowdaysthan in the past. Consistently, in a final investigation, we performed an asset allocationexercise where the selling signal are based on the sentiment series. In line with results fromthe quantile regression, the portfolio based on the MLSS filter significantly outperformsthe benchmark buy-and-hold strategy and the other strategies based on different filteringtechniques.
Supplementary materials
The supplementary materials include the details of the estimation procedure in Appendix A as wellas the details of Kalman filter and smoother in Appendix B and the equations of the ExpectationMaximization algorithm in Appendix C. Appendix D provides an overview of the stocks used in theempirical analysis. Appendix E compares the different signal-to-noise ratios filtered by the MLSSand MLNSL model. Appendix F investigates the contemporaneous relation between the sentimentand return series. Appendices G, H, and I report the without trading costs analysis, the robustnesscheck, and the statistical significance of the portfolio allocation exercise, respectively. cknowledgments The authors thank Thomson Reuters for kindly providing Thomson Reuters MarketPsych Indicestime series. We benefited from discussion with Giuseppe Buccheri, Fulvio Corsi, Luca Trapin, aswell as with conference participants to the Quantitative Finance Workshop 2019 at ETH in Zurichand the AMASES XLIII Conference in Perugia.
References
Algaba, A., Ardia, D., Bluteau, K., Borms, S., Boudt, K., 2020. Econometrics meets sentiment:An overview of methodology and applications. Journal of Economic Surveys .Allcott, H., Gentzkow, M., 2017. Social media and fake news in the 2016 election. Journal ofEconomic Perspectives 31, 211–36.Allen, D., McAleer, M., Singh, A., 2015. Machine news and volatility: The Dow Jones IndustrialAverage and the TRNA real-time high-frequency sentiment series. Handbook of High FrequencyTrading , 327–344.Antweiler, W., Frank, M.Z., 2004. Is all that talk just noise? The information content of internetstock message boards. The Journal of Finance 59, 1259–1294.Appel, G., 2003. Become your own technical analyst: How to identify significant market turningpoints using the moving average convergence-divergence indicator or macd. The Journal ofWealth Management 6, 27–36.Audrino, F., Tetereva, A., 2019. Sentiment spillover effects for US and European companies. Journalof Banking & Finance 106, 542 – 567.Avellaneda, M., Lee, J.H., 2010. Statistical arbitrage in the US equities market. QuantitativeFinance 10, 761–782.Banbura, M., Modugno, M., 2014. Maximum likelihood estimation of factor models on datasetswith arbitrary pattern of missing data. Journal of Applied Econometrics 29, 133–160.Beckers, S., 2018. Do social media trump news? The relative importance of social media and newsbased sentiment for market timing. The Journal of Portfolio Management 45, 58–67.Bork, L., 2009. Estimating US monetary policy shocks using a factor-augmented vector autore-gression: an EM algorithm approach. Available at SSRN 1358876 . orovkova, S., 2015. The role of news in commodity markets. Available at SSRN 2587285 .Borovkova, S., Garmaev, E., Lammers, P., Rustige, J., 2017. SenSR: A sentiment-based systemicrisk indicator. Technical Report 553. De Nederlandsche Bank. .Borovkova, S., Mahakena, D., 2015. News, volatility and jumps: the case of natural gas futures.Quantitative Finance 15, 1217–1242.Calomiris, C.W., Mamaysky, H., 2019. How news and its context drive risk and returns around theworld. Journal of Financial Economics 133, 299–336.Corsi, F., Peluso, S., Audrino, F., 2015. Missing in asynchronicity: A Kalman-EM approach formultivariate realized covariance estimation. Journal of Applied Econometrics 30, 377–397.Da, Z., Engelberg, J., Gao, P., 2011. In search of attention. The Journal of Finance 66, 1461–1499.DeMiguel, V., Garlappi, L., Uppal, R., 2009. Optimal versus naive diversification: How inefficientis the 1/N portfolio strategy? The Review of Financial Studies 22, 1915–1953.Dempster, A.P., Laird, N.M., Rubin, D.B., 1977. Maximum likelihood from incomplete data viathe EM algorithm. Journal of the Royal Statistical Society. Series B (Methodological) , 1–38.Durbin, J., Koopman, S.J., 2012. Time series analysis by state space methods. Oxford UniversityPress.Engle, R.F., Granger, C.W.J., 1987. Co-integration and error correction: Representation, estima-tion, and testing. Econometrica 55, 251–276.Garcia, D., 2013. Sentiment during recessions. The Journal of Finance 68, 1267–1300.Gerber, A.S., Gimpel, J.G., Green, D.P., Shaw, D.R., 2011. How large and long-lasting are the per-suasive effects of televised campaign ads? Results from a randomized field experiment. AmericanPolitical Science Review 105, 135–150.Gilli, M., Schumann, E., 2009. An empirical analysis of alternative portfolio selection criteria. SwissFinance Institute, Swiss Finance Institute Research Paper Series .Groß-Klußman, A., Hautsch, N., 2011. When machines read the news: Using automated textanalytics to quantify high frequency news-implied market reactions. Journal of Empirical Finance18, 321–340.Harvey, A.C., 1990. Estimation, prediction and smoothing for univariate structural time seriesmodels. Cambridge University Press. pp. 168 – 233. ill, S.J., Lo, J., Vavreck, L., Zaller, J., 2013. How quickly we forget: The duration of persuasioneffects from mass communication. Political Communication 30, 521–547.Jungbacker, B., Koopman, S.J., 2008. Likelihood-based analysis for dynamic factor models. Tin-bergen Institute, Tinbergen Institute Discussion Papers .Kalman, R.E., 1960. A new approach to linear filtering and prediction problems. Transactions ofthe ASME–Journal of Basic Engineering 82, 35–45.Koenker, R., Machado, J.A.F., 1999. Goodness of fit and related inference processes for quantileregression. Journal of the American Statistical Association 94, 1296–1310.Lillo, F., Miccich´e, S., Tumminello, M., Piilo, J., Mantegna, R.N., 2015. How news affect thetrading behavior of different categories of investors in a financial market. Quantitative Finance15, 213–229.Liu, B., 2015. Sentiment analysis: Mining opinions, sentiments, and emotions. Cambridge Univer-sity Press.Loughran, T., McDonald, B., 2011. When is a liability not a liability? Textual analysis, dictionaries,and 10-ks. The Journal of Finance 66, 35–65.McFadden, D., et al., 1973. Conditional logit analysis of qualitative choice behavior .Pang, B., Lee, L., Vaithyanathan, S., 2002. Thumbs up? Sentiment classification using machinelearning techniques, in: Proceedings of the ACL-02 conference on Empirical methods in naturallanguage processing, pp. 79–86.Peterson, R., 2016. Trading on Sentiment: The Power of Minds Over Markets. John Wiley & Sons,Ltd.Ranco, G., Aleksovski, D., Caldarelli, G., Grcar, M., Mozetic, I., 2015. The effects of Twittersentiment on stock price returns. PLOS ONE 10, e0138441.Ranco, G., Bordino, I., Bormetti, G., Caldarelli, G., Lillo, F., Treccani, M., 2016. Coupling newssentiment with web browsing data improves prediction of intra-day price dynamics. PLOS ONE11, e0146576.Shumway, R.H., Stoffer, D.S., 1982. An approach to time series smoothing and forecasting usingthe EM algorithm. Journal of Time Series Analysis 3, 253–264.Smales, L.A., 2014. News sentiment in the gold futures market. Journal of Banking & Finance 49,275 – 286. males, L.A., 2015. Asymmetric volatility response to news sentiment in gold futures. Journal ofInternational Financial Markets, Institutions and Money 34, 161–172.Sun, L., Najand, M., Shen, J., 2016. Stock return predictability and investor sentiment: A high-frequency perspective. Journal of Banking & Finance 73, 147 – 164.Tetlock, P.C., 2007. Giving content to investor sentiment: The role of media in the stock market.The Journal of Finance 62, 1139–1168.Thorsrud, L.A., 2018. Words are the new numbers: A newsy coincident index of the business cycle.Journal of Business & Economic Statistics , 1–17.Vohra, S., Teraiya, J., 2013. A comparative study of sentiment analysis techniques. Journal JIKRCE2, 313–317.Wu, L.S.Y., Pai, J.S., Hosking, J., 1996. An algorithm for estimating parameters of state-spacemodels. Statistics & Probability Letters 28, 99–106. upplementary Material A Estimation procedure
The estimation of model (2.6) is performed using the Kalman filter (Kalman, 1960) and theExpectation Maximization (EM) method in (Dempster et al., 1977) and (Shumway and Stoffer,1982) which was proposed to deal with incomplete or latent data and intractable likelihood.The EM algorithm is a two-step estimator. In the first step, we write the likelihood consider-ing the latent process as observed. In the second step, we re-estimate the static parametersmaximizing the expectation obtained in the first step. This routine is repeated until someconvergence criterion is satisfied.To cast (2.6) in a standard state-space representation, we use the same procedure of(Banbura and Modugno, 2014) and define the augmented states ˜Λ, ˜ F , ˜Φ and ˜ Q s.t. S t = ˜Λ ˜ F t + ǫ t , ǫ t ∼ N (0 , R ) , ˜ F t = ˜Φ ˜ F t − + v t , v t ∼ N (cid:16) , ˜ Q (cid:17) , (A.1)where ˜Λ = (cid:20) Λ I K (cid:21) ∈ R K × ( q + K ) (A.2)˜ F t = F t Ψ t ∈ R ( q + K ) × (A.3)˜Φ = I q
00 Φ ∈ R ( q + K ) × ( q + K ) (A.4)˜ Q = Q long Q short ∈ R ( q + K ) × ( q + K ) (A.5)39he EM renders the approach feasible in high dimension. Indeed, while a direct numericalmaximization of the likelihood is computationally demanding, the EM algorithm, thanksto the Kalman filtering and smoothing recursions, can be formulated in closed-form. SeeAppendix B and C. In particular, it allows to disentangle the long-term sentiment F t and theshort-term sentiment Ψ t . To derive the EM steps we consider the log-likelihood l (cid:16) S t , ˜ F t , θ (cid:17) where θ denotes the set of static parameters ˜Λ, ˜Φ, ˜ Q and R . The EM proceeds in a sequenceof steps:1. E-step: it evaluates the expectation of the log-likelihood using the estimated parame-ters from the previous iteration θ ( j ): G (cid:16) ˜Λ ( j ) , ˜Φ ( j ) , ˜ Q ( j ) , R ( j ) (cid:17) = E h l (cid:16) S t , ˜ F t , θ ( j ) (cid:17) | S , . . . , S T i . The E-step strongly relies on the Kalman smoother. The details are explained inAppendix B.2. M-step: the parameters are estimated again maximizing the expected log-likelihoodwith respect to θ : θ ( j + 1) = arg max θ G (cid:16) ˜Λ ( j ) , ˜Φ ( j ) , ˜ Q ( j ) , R ( j ) (cid:17) . The M-step is performed updating the static parameters. Further information on theequations can be found in Appendix C.We initialize the parameters θ (0) and repeat steps 1 and 2 until we reach the convergencecriterion | l (cid:16) S t , ˜ F t , θ ( j ) (cid:17) − l (cid:16) S t , ˜ F t , θ ( j − (cid:17) || l (cid:16) S t , ˜ F t , θ ( j ) (cid:17) + l (cid:16) S t , ˜ F t , θ ( j − (cid:17) | < ǫ . (A.6)We set ǫ = 10 − .As observed in (Harvey, 1990), the dynamic factor model (A.1) is not identifiable. Indeed,40f we consider a non singular invertible matrix M , then the parameters θ = { Λ , R, Q } and θ = { Λ M − , R, M QM ′ } are observationally equivalent, then starting from S t we cannotdistinguish θ from θ . We solve this identification problem using the approach proposed by(Harvey, 1990), imposing the following restrictions˜ Q = I q Q short Λ = λ . . . λ λ . . . λ K λ K λ K . . . λ Kq (A.7)where Λ is the K × q sub-matrix in (A.2).The specifications of ˜Λ, ˜Φ, ˜ Q and R in (A.2), (A.4) and (A.5), together with the identi-fication restrictions defined in (A.7), impose several constraints to the estimations. The EMprocedure allows us to impose restrictions on the parameters in a closed-form. According to(Wu et al., 1996) and (Bork, 2009), we get the constrained ˜Φ, ˜Λ, ˜ Q and R as: vec ( ˜Φ r ) = vec ( ˜Φ) + (cid:16) A − ⊗ ˜ Q (cid:17) M ( M ( A − ⊗ ˜ Q ) M ′ ) − ( k Φ − M vec (Φ)) (A.8)where A is defined in equation C.2, M is the f × K ( r + K ) matrix, f is the number ofconstraints, k Φ is the f vector containing the constraints values such that M vec ( ˜Φ) = k Φ . Equivalently, for the restricted Λ r : vec (Λ r ) = vec (Λ) + (cid:0) E − ⊗ R (cid:1) G ( G ( E − ⊗ R ) G ′ ) − ( k λ − G vec (Λ)) (A.9)41here E is defined in C.2, G is the s × Kr matrix, s is the number of constraints, k λ is the s vector containing the constraints values such that G vec (Λ) = k λ . The details for the eval-uation of ˜ Q and R are reported in equation (C.5) and (C.6) and the restrictions, accordingto (Wu et al., 1996), can be imposed elementwise.The final estimation scheme reads as follows:1. Initialize ˜Λ (0), ˜Φ (0), ˜ Q (0) and R (0)2. Perform the E-step using the estimations ˜Λ ( j ), ˜Φ ( j ), ˜ Q ( j ), R ( j ) and the Kalmansmoother.3. Perform the M-step and evaluate the new estimators ˜Λ ( j + 1), ˜Φ ( j + 1), ˜ Q ( j + 1) and R ( j + 1).4. Use the unrestricted estimations and (A.8) and (A.9) to obtain the restricted ones.5. Repeat 2, 3 and 4 above until the estimates and the log-likelihood reach convergence.Finally, since the number of long-term sentiment q is considered as known, we select theoptimal q using the AIC and BIC indicators.42 Filter and Smoother recursions
In this section, we report Kalman Filter and Smoother recursions ancillary to the EM algo-rithm. The derivation of the formulas which follow can be found in (Shumway and Stoffer,1982).Starting from system (A.1), we calculate recursively the Kalman Filter as:˜ F t | t − = E h ˜ F t | S , . . . , S t − i = ˜Φ ˜ F t − | t − P t | t − = E (cid:20)(cid:16) ˜ F t − ˜ F t | t − (cid:17) (cid:16) ˜ F t − ˜ F t | t − (cid:17) ′ | S , . . . , S t − (cid:21) = ˜Φ P t − | t − ˜Φ ′ + QK t = P t | t − ˜Λ ′ (cid:16) ˜Λ P t | t − ˜Λ ′ + R (cid:17) − ˜ F t | t = ˜ F t | t − + K t (cid:16) S t − ˜Λ ˜ F t | t − (cid:17) P t | t = P t | t − − K t ˜Λ P t | t − (B.1)where we take ˜ F | = µ and P | = Σ. Now, using backward recursions t = T, . . . , J t − = P t − | t − ˜Φ ′ (cid:0) P t | t − (cid:1) − ˜ F t − | T = ˜ F t − | t − + J t − (cid:16) ˜ F t | T − ˜Φ ˜ F t − | t − (cid:17) P t − | T = P t − | t − + J t − (cid:0) P t | T − P t | t − (cid:1) J ′ t − P t − ,t − | T = P t − | t − J ′ t − + J t − (cid:16) P t,t − | T − ˜Φ P t − | t − (cid:17) J ′ t − (B.2)where P T,T − | T = (cid:16) I − K T ˜Λ (cid:17) ˜Φ P T − | T − . 43 Expectation Maximization
The log-likelihood of the model (A.1) is l (cid:16) S t , ˜ F t , θ ( j ) (cid:17) = log f ( ˜ F ) + T X t =1 log f ( ˜ F t | S t − ) + T X t =1 log f ( S t | ˜ F t )= −
12 log | Σ | − (cid:16) ˜ F − a (cid:17) Σ − (cid:16) ˜ F − a (cid:17) ′ − T | ˜ Q | − T X t =1 (cid:16) ˜ F t − ˜Φ ˜ F t − (cid:17) ˜ Q − (cid:16) ˜ F t − ˜Φ ˜ F t − (cid:17) ′ − T | R | − T X t =1 (cid:16) S t − ˜Λ ˜ F t (cid:17) R − (cid:16) S t − ˜Λ ˜ F t (cid:17) ′ where a and Σ are the parameters s.t. ˜ F ∼ N ( a, Σ).
E-step
The objective function to maximize is, from (Shumway and Stoffer, 1982), G (cid:16) a, Σ , R, ˜ Q, ˜Λ , ˜Φ (cid:17) = E m [log f | S , . . . , S T ] , where E m denotes the conditional expectation relative to a density containing the m th iteratevalues a ( m ) , Σ( m ) , R ( m ) , ˜ Q ( m ) , ˜Λ( m ) and ˜Φ( m ).Using now the Kalman smoother (B.2) we can derive E (cid:20)(cid:16) S t − ˜Λ ˜ F t (cid:17) (cid:16) S t − ˜Λ ˜ F t (cid:17) ′ | S , . . . S T (cid:21) = (cid:16) S t − ˜Λ ˜ F t | T (cid:17) (cid:16) S t − ˜Λ ˜ F t | T (cid:17) ′ + ˜Λ P t | T ˜Λ ′ E (cid:20)(cid:16) ˜ F t − ˜Φ ˜ F t − (cid:17) (cid:16) ˜ F t − ˜Φ ˜ F t − (cid:17) ′ | S , . . . , S T (cid:21) = P t | T + ˜ F t | T ˜ F ′ t | T + ˜Φ P t − | T ˜Φ ′ + ˜Φ ˜ F t − | T ˜ F ′ t − | T ˜Φ ′ − P t,t − | T ˜Φ ′ − ˜ F t | T ˜ F ′ t − | T ˜Φ ′ − ˜Φ P t,t − | T − ˜Φ ˜ F t − | T ˜ F ′ t | T , G (cid:16) a, Σ , R, ˜ Q, ˜Λ , ˜Φ (cid:17) = −
12 log | Σ | − tr { Σ − (cid:20) P | T + (cid:16) ˜ F − a (cid:17) (cid:16) ˜ F − a (cid:17) ′ (cid:21) }− T | ˜ Q | − tr { ˜ Q − (cid:16) C − B ˜Φ ′ − ˜Φ B ′ + ˜Φ A ˜Φ ′ (cid:17) }− T | R | − tr { R − (cid:16) E − ˜Λ E ′ − E ˜Λ ′ + ˜Λ E ˜Λ ′ (cid:17) } , (C.1)where A = T X t =1 (cid:16) ˜ F t − | T ˜ F ′ t − | T + P t − | T (cid:17) ,B = T X t =1 (cid:16) ˜ F t | T ˜ F ′ t − | T + P t,t − | T (cid:17) ,C = T X t =1 (cid:16) ˜ F t | T ˜ F ′ t | T + P t | T (cid:17) ,E = T X t =1 P t | T + ˜ F t | T ˜ F ′ t | T ,E = T X t =1 S t ˜ F ′ t | T ,E = T X t =1 S t S ′ t . (C.2) M-step
The resulting update equations are Λ( m + 1) = E E − (C.3)˜Φ( m + 1) = BA − (C.4)˜ Q ( m + 1) = 1 T (cid:16) C − B ˜Φ ( m + 1) ′ − ˜Φ ( m + 1) B ′ + ˜Φ ( m + 1) A ˜Φ ( m + 1) ′ (cid:17) (C.5) R ( m + 1) = 1 T (cid:16) E − ˜Λ( m + 1) E ′ − E ˜Λ( m + 1) ′ + ˜Λ( m + 1) E ˜Λ( m + 1) ′ (cid:17) (C.6) a ( m + 1) = ˜ F | T (C.7)45( m + 1) = P | T . (C.8)For simplicity, in our estimations we impose ˜ F = 0.46 List of stocks
Table 8 reports names and sectors of the 27 stocks considered in the empirical analysis.
Tickers Name Sector ticker Sector nameVZ Verizon COM Communication ServicesCVX Chevron ENE EnergyAXP American Express Company FIN FinancialGS Goldman Sachs FIN FinancialJPM JPMorgan Chase FIN FinancialJNJ Johnson & Johnson HLC Health CareMRK Merck HLC Health CarePFE Pfizer HLC Health CareUNH UnitedHealth HLC Health CareBA Boeing IND IndustrialsCAT Caterpillar IND IndustrialsGE General Electric IND IndustrialsMMM 3M Co IND IndustrialsUTX United Technologies IND IndustrialsXOM XOMA Corp MAT Basic MaterialsKO Coca-Cola NCY Consumer GoodsPG Procter & Gamble NCY Consumer GoodsAAPL Apple TEC TechnologyCSCO Cisco TEC TechnologyIBM IBM TEC TechnologyINTC Intel TEC TechnologyMSFT Microsoft TEC TechnologyDIS Disney YCY Consumer CyclicalHD Home Depot YCY Consumer CyclicalMCD McDonalds YCY Consumer CyclicalNKE Nike YCY Consumer CyclicalWMT Wal-Mart YCY Consumer Cyclical
Table 8: List of investigated stocks, their ticker, and the economic sector according to theclassification of Yahoo Finance. 47
Signal-to-noise ratio and comparison with MLNSL
We compare how well the MLSS model fits the data with respect to the MLNSL model usingthe likelihood ratio test. Since the MLNSL model is nested into the MLSS model, we usethe χ distribution to test the null hypothesis (the MLSS model does not fit the data betterthan the MLNSL) against the alternative hypothesis (the MLSS model fits the data betterthan the MLNSL). The null hypothesis is rejected with a p-value smaller than 0 .
01 for bothnews and social sentiment.In the last columns of Table 1 in the paper we report the signal-to-noise ratio for eachasset obtained using the MLSS model and the signal-to-noise ratio obtained using the MLNSLmodel. The signal-to-noise ratio for the MLSS model, using the same notation of equation(2.6), is evaluated as stn ( i ) MLSS = Var (Λ( i, · ) v t ) + Var ( u it ) Var ( ǫ it ) = P qj =1 (Λ( i, j )) + Q short ( i, i ) R ( i, i ) (E.1)while the signal to noise ratio for the MLNSL model, using the notation of equation (2.2),is evaluated as stn ( i ) MLNSL = Var ( v it ) Var ( ǫ it ) = Q ( i, i ) R ( i, i ) (E.2)When the MLSS model is estimated, the signal to noise ratio is on average around 0 . . Quantile regression: Contemporaneous effects
In this appendix we perform the same tests of Section 5.1.1 in the paper with contempo-raneous return and sentiment. In particular, we compute the quantile regression (5.2) with h = 0, Table 9 shows the values of the R ( τ ) measure for different values of τ . It is worth τ quantiles R ( τ ) measure MLSS LSS MLNSL LNSL Obs0 .
01 16 . ∗∗∗ . ∗∗ .
4% 1 .
6% 0 . .
05 9 . ∗∗∗ . ∗∗∗ . ∗∗∗ . ∗∗∗ . ∗∗∗ .
10 7 . ∗∗∗ . ∗∗∗ . ∗∗∗ . ∗∗∗ . ∗∗∗ .
33 2 . ∗∗∗ . ∗∗∗ . ∗∗∗ . ∗∗∗ . ∗∗∗ .
50 1 . ∗∗∗ . ∗∗∗ . ∗∗∗ . ∗∗∗ . ∗∗∗ .
66 0 . ∗∗∗ . ∗∗∗ . ∗∗∗ . ∗∗∗ . ∗∗∗ .
90 1 . ∗∗∗ . ∗∗∗ . ∗∗∗ . ∗∗∗ . ∗∗∗ .
95 2 . ∗∗∗ . ∗∗∗ . ∗∗∗ . ∗∗∗ . ∗∗∗ .
99 10 . ∗∗∗ . ∗∗ .
9% 0 .
6% 1 . Table 9:
The R measure across the value τ . We denote with ∗∗∗ the significance at 1%, ∗∗ thesignificance at 5% and ∗ the significance at 10% to notice that the quantile regressions are highly significant for every model, except for the0 .
01 and 0 .
99 quantiles, where they are only significant for the MLSS and LSS models.There are three important findings. The first one is that, as in the lagged relation, for anymodel, the values of R are higher in the tails and lower close to the median. The resultsare not symmetric around the median. The lower quantiles, which correspond to negativereturns, have higher R than the corresponding R in the higher quantiles. This suggeststhat the sentiment series are powerful explanatory variables in bad times. This conclusionis in accordance with the results in (Garcia, 2013), which shows that investors’ sensitivityto news is most pronounced going through hard times. The second result is that the modelswhich exploit the multivariate structure (MLSS and MLNSL) produce higher R measuresthan the corresponding models which apply the cross-sectional averaging procedure on thesentiment series (LSS and LNSL models, respectively). This result confirms that the cross-sectional dependence structure is helpful in extracting a sensible signal. The last result isthat the MLSS and LSS models, excluding few values around the median, have higher R ( τ )49 quantiles p -values L STt L LTt .
01 0 . . .
05 0 . . .
10 0 . . .
33 0 . . .
50 0 . . .
66 1 . . .
90 0 . . .
95 0 . . .
99 0 . . Table 10: p-values for the statistics in equation (5.5) and equation (5.4). values than other models. This suggests that disentangling the long-term and short-termsentiment components is the most important step to capture the contemporaneous relationwith market returns. In particular, the MLSS model, which exploits both the separation intwo components and the multivariate structure, strongly outperforms the benchmark model,which solely uses the observed noisy sentiment.If we look at the contribution of the short and long-term sentiment separately usingequation (5.3), we again observe similar results with the one observed in Section 5.1.1 ofthe paper. Table 10 reports the p-values of the statistics (5.5) and (5.4) and shows that theshort-term sentiment is highly significant at any level of τ , while the long-term sentimenthas lower p-values. In particular, the short-term sentiment, which captures rapidly changingtrends, is significant for extreme returns ( τ = 0 .
01 or τ = 0 .
99) while the long-term sentimentis not. This result suggests that extreme market swings can be explained by unexpected andshort-lasting news. Moreover, it further supports the importance of disentangling sentimentcomponents which are sensitive to different time scales.These findings show very strong contemporaneous relation between sentiment and marketreturns. We look at these results as a sanity check of our approach. Indeed, since we arenot claiming that sentiment causes returns or viceversa, then it is reasonable to expect asignificant contemporaneous relation at daily time scale. The sentiment explains returns andthis could be due to the fact that the news, from which sentiment is computed, report and50omment about the market performance. What is more promising is that the R measureincreases with the complexity of the model, and this is especially true for extreme marketevents – where the observed sentiment is not significant. Then, we conclude that an essentialingredient of the analysis is the combination of a multivariate model with the separation ofsentiment in two components, the stochastic long-run trend (long-term sentiment) commonto all assets and a fast changing and asset-specific trend (short-term sentiment).51 Portfolio allocation on February 2007-June 2017 with-out trading costs
Table 11 reports the performances of the five sentiment strategies together with the buy-and-hold portfolio without trading costs. We notice that the qualitative results do not change.Given that the MLSS portfolio produces the higher number of trades, the performance gapwith respect to the other strategies increase in size in terms of returns, Sharpe and Sortinoratios. Figure 6 shows the evolution of the sentiment-based portfolios without trading costs.The MLSS portfolio, contrary to all the other portfolios, performs very well during thefinancial crisis and strongly outperforms the other sentiment-based portfolios and the 1 /n portfolio. However, the gain reduces during the 2009 − Measures BH MLSS LSS MLNSL LNSL ObsA. return (%) 8 . .
650 9 .
091 8 .
308 7 . . .
996 17 .
797 19 .
113 19 . . .
294 14 .
368 15 .
125 15 . . .
425 0 .
511 0 .
435 0 . . .
535 0 .
633 0 .
549 0 . Table 11:
Performances of the six strategies without trading cost for the period February 2007 -June 2017. In bold, the best performance per row. BH is the buy-and-hold portfolio, while MLSS,LSS, MLNSL, LSNSL, and Obs correspond to portfolios built from the corresponding model forthe sentiment time series.
Portfolio evolution of the sentiment based strategies built using equation (6.4) togetherwith the buy-and-hold equally weighted portfolio in blue.
H Robustness check: Portfolio allocation on July 2017- December 2019
In this appendix, we use the parameter values estimated from the TRMI sentiment timeseries over the February 2007 - June 2017 to filter the sentiment signal in the July 2017 -December 2019 period. This procedure ensures that the filtered signals do not suffer fromany forward-looking bias.Table 12 shows that the qualitative results do not change from the Section 6.2. TheMLSS model outperforms the buy-and-hold portfolio with a relative gain of 14% in bothSharpe and Sortino ratio. Two main differences are visible from the February 2007 - June2017 period. The LSS model slightly outperforms the buy-and-hold portfolio and it is thesecond best performing model, while in the previous case the second best performing modelwas the MLNSL. The Obs portfolio produces the same performance of the buy-and-holdportfolio and the reason is that the selling signal from s Obs is always negative. Then, thenumber of transaction is equal to 1. In table 13, we see that the transaction costs do notchange the qualitative results and again, the MLSS strategy is the one which produces thehigher number of trades and, as a consequence, the higher transaction costs. As done in themain text, the performance of the MLSS strategy from table 13 can be further improved by53easures BH MLSS LSS MLNSL LNSL ObsA. return (%) 13 . .
316 12 .
584 9 .
72 13 . . .
257 14 .
672 15 .
053 14 . .
673 10 . .
841 11 .
521 10 . . .
004 0 .
858 0 .
646 0 . . .
365 1 .
161 0 .
844 1 . . .
907 12 .
518 9 .
492 13 . .
483 14 . . .
122 14 . .
678 10 . .
865 11 .
589 10 . . .
971 0 .
852 0 .
628 0 . . .
317 1 .
152 0 .
819 1 . R .54 Statistical significance of the sentiment portfolios
Here, we assess the significance of the trades produced by the strategy (6.3) for the differentsentiment filters. We design a Monte Carlo experiment where a trader follow a randomselling signal. The selling signal is given by s shuffled, mod t , which is nothing more than a shuffledrealization of s mod t . The number of random selling signals corresponds by construction to thenumber of selling signals produced by s mod , which is reported in table 6 of the paper. Werepeat the experiment 10 ,
000 times. The corresponding portfolios are then sorted accordingto their Sharpe and Sortino ratios and the p-value of each strategy is computed by comparisonwith the quantiles from the Monte Carlo experiment. Table 14 shows the results over theperiod February 2007 - June 2017. The MLSS strategy significantly outperforms the randomstrategy with a p-value smaller than 5%. All the other strategies are not statistically differentfrom a random strategy.The p-values of the MLSS trading strategy are even lower when the R -penalized tradingstrategy (6.5) is implemented. Table 15 shows the p-values. When the number (100%) isreported, all the 10 ,
000 random strategies perform worse than the MLSS α strategy. Thenumber of selling signals for the MLSS with α = 0 .
80 is too small and the result may be notreliable. 55trategies Annual Sharpe ratio Annual Sortino ratioMLSS 0 . . . . .
485 0 . .
431 0 . .
349 0 . .
26 0 . . . . . .
529 0 . .
502 0 . .
457 0 . .
409 0 . . . . . .
523 0 . .
504 0 . .
474 0 . .
443 0 . . . . . .
524 0 . .
505 0 . .
475 0 . .
446 0 . . . . . .
485 0 . .
431 0 . .
349 0 . .
26 0 . . . . . .
502 0 . .
457 0 . .
383 0 . .
306 0 . . . . . .
512 0 . .
473 0 . .
409 0 . .
339 0 . . . . . .
531 0 . .
495 0 . .
436 0 . .
373 0 . . . . . .
534 0 . .
504 0 . .
459 0 . .
415 0 . . . . . .
519 0 . .
501 0 . .
477 0 . .
45 0 . R adjusted MLSS strategies for different values of α comparedwith the 95%, 90%, 75% and 50% quantiles from the random strategy for the period February2007 - June 2017. The sentiment strategies are referred to as MLSS( α ××