Brazilian stock market performance and investor sentiment on Twitter

Purpose – This study identified how investor sentiment on Twitter is associated with Brazilian stock market return and trading volume. Design/methodology/approach – Thestudyanalyzes314,864tweetsbetweenJanuary1,2017,toDecember 31, 2018, collected with the Tweepylibrary. The companies ’ financial data were obtained from Refinitiv Eikon. Using the netnographic method, a Twitter Investor Sentiment Index (ISI) was constructed based on terms associated with the stocks. This Twitter sentiment was attributed through machine learning using the Google Cloud Natural Language API. The associations between Twitter sentiment and market performance were performed using quantile regressions and vector auto-regression (VAR) models, because the variables of interest are heterogeneous and non-normal, even as relationships can be dynamic. Findings – In the contemporary period, the ISI is positively correlated with stock market returns, but negatively correlated with trading volume. The autoregressive analysis did not confirm the expectation of a dynamic relationship between sentiment and market variables. The quantile analysis showed that the ISI explainsthestockmarketreturn,however,onlyattimesoflowerreturns.Itispossibletostatethatthiseffectisduetotheinformationalcontentofthetweets(sentiment),andnottothevolumeoftweets. Originality/value – The study presents unprecedented evidence for the Brazilian market that investor sentimentcanbeidentifiedonTwitter,andthatthissentimentcanbeusefulfortheformationofaninvestment strategy,especiallyintimesoflowerreturns.Thesefindingsareoriginalandrelevanttomarketagents,suchasinvestors,managersandregulators,astheycanbeusedtoobtainabnormalreturns.


Introduction
The efficient market hypothesis (EMH) supports that variations of stock prices for a long time were associated to a combination of historical prices with information environment (Fama, 1970(Fama, , 1991. However, over the years, researchers began to question whether the investors' behavioral and rational elements would also be responsible for such variations (Menkhoff, 1998). Generally, these elements are called "investor sentiment" or "investor mood." The finance literature reports a strong link between measures of investor sentiment (or mood) and stock market return (Lee, Jiang, & Indro, 2002;Brown & Cliff, 2005;Baker & Wurgler, 2006. For example, Kearney and Liu (2014) summarize important and influential findings of the association between investor sentiment and individual, firm and Twitter sentiment and market performance market behaviors and performances, with different empirical models and forms of analysis, especially concerning textual sentiment. But the growing interaction among investors on the Internet has offered the opportunity to expand this literature, especially in emerging countries.
Exploring new ways of capturing investor sentiment or mood is important because most studies use only two sources to measure sentiment: opinion polls (Brown & Cliff, 2005) and market variables (Baker & Wurgler, 2006). In this sense, in the last few years, a series of researchers have turned their attention to capture the investor sentiment through online activities, since this type of approach instantly captures the sentiment, and this addresses criticism like that of Klibanoff, Lamont, and Wizman (1998), that a large part of the studies that examine investor behavior are retrospective and analyze only its determinants.
One of the fastest and most efficient ways to capture investors' sentiment or mood in online activities is through social network. The preceding literature has evidence that points to the power of social networks such as Twitter to identify sentiment, in addition to being useful for predicting stock market movements (Bollen, Mao, & Zeng, 2011;Mao, Wei, Wang, & Liu, 2012;Fan & Gordon, 2014;Wei, Mao, & Wang, 2016). However, Agarwal, Kumar and Goel (2019) highlight that most of this evidence is restricted to developed markets, with a scarcity of studies exploring emerging markets.
This gap is even greater in the Brazilian emerging market, the largest stock market in Latin America, which has seen the number of individual investors on the stock exchange increase from around 580,000 to four million in the last ten years (B3, 2021). Parallel to this growth, there was also the popularization of Twitter among investors, giving rise to the so-called "FinTwit," an acronym originated from finance and Twitter, which came to attract the attention of Brazilian financial media, due to its importance in representing the financial market mood, as in this community there is great interaction among investors, managers, analysts and other market participants (Tauhata, 2021).
Twitter is one of the key ways to obtain information about the market. This happens because, according to Wei et al. (2016), in this social network there are many investors, financial analysts, entities and news profiles, which usually post messages about what happens in the market. In this context, Mao, Counts and Bollen (2011) observed that the investor sentiment extracted from Twitter, as well as the number of tweets, can be used to forecast the daily return of the stock market. Despite the existence of some previous studies, little is known about these associations in emerging markets, especially in Brazil, which has experienced growth in the number of investors and their use of Twitter. This is the motivation of this study. Agarwal et al. (2019) point that most studies on investor sentiment through online sources focus just on developed markets. For them, there is a research gap in the international literature when the subject involves investors' activities on the Internet and their impact on stock prices in emerging markets. And notably, emerging markets have more fragile information environments and bigger problems with information asymmetry, which leads to lower levels of market efficiency (Martins & Barros, 2021).
The objective of this study is to identify the investor sentiment on Twitter and its association with Brazilian stock market return and trading volume. Our findings demonstrate that investor sentiment is positively associated with the stock market movements, looking at stock market return and trading volume. This association is especially important in the contemporary period of these variables, and it varies over time. The positive association between volume of tweets and trading volume is especially important when the investor sentiment is negative.
Our findings also indicate that, although there is no dynamic relationship between Twitter sentiment and market performance, there is evidence of a significant association between this sentiment and stock market returns, especially in periods of lower returns. This association is not limited to the volume of tweets published on the social network, but to the informational content of the messages, which reveals investor sentiment.
These findings are useful for market participants to define investment strategies and to monitor possible market manipulations. This is a relevant contribution because it suggests that the growth of investor interactions on the Internet can reduce information asymmetry and increase the market efficiency level, converging with Renault (2017) on the so-called more realistic model of market efficiency. This is especially important in emerging markets such as Brazil, which generally have lower information efficiency and legal protection for investors (Martins & Barros, 2021).

Development of hypotheses
The belief that markets predictability through online activities would be far from the efficient market hypothesis (EMH) has changed with the growth in the volume and importance of information sharing on the Internet and social networks (Baker & Wurgler, 2007;Bollen et al., 2011;Agarwal et al., 2019;Chen & Lo, 2019). For example, for Renault (2017), this would just be a more realistic model of market efficiency, like an EMH model in its semi-strong form.
The desire to understand the process of forming the asset pricing culminated in what is currently considered the EMH. This hypothesis brought with it the idea that prices are explained by information, so that the informational efficiency of a market is what will define the price of an asset, converging with Fama's (1970Fama's ( , 1991 view that predictability is possible in times of more online activity, even at low level, and ratified by Chen and Lo (2019). In this way, we consider that abnormal returns obtained in the market are rewards for the time and money spent by investors in monitoring a wide variety of information sources.
Over the years, market efficiency has been extensively tested (Malkiel, 2003). At the same time, studies that relate EMH to investor rationality have gained space, especially those that deal with behavioral finance and the investment decision process. Kahneman and Tversky (1979) show that human beings are endowed with limited rationality so that behavioral and psychological aspects influence the decision-making process. Thus, decisions made by market participants are not entirely based on reasonthere is also emotion, and the social network is a meeting place for investors' emotions.
Since there are indications that the market is not entirely rational and that individual reactions may affect it, Brown and Cliff (2005) and Wurgler (2006, 2007) investigated how sentiment relates to stock returns, bringing evidence that they are indeed strongly associated, and that a high level of optimism in contemporary times causes current prices to be high, leading to low future returns. In this sense, Kim, Ruy and Seo (2014) demonstrate that investors should sell stocks that are under the focus of analysts, who "promise" high rates of earnings per share growth in the long run. For these authors, this strategy yields better returns than the buy-and-hold strategy.
We can suspect that investor sentiment is sensitive to stock market performance, as part of its decision-making process is guided by emotions, which can create a dynamic relationship between market performance and investor sentiment. In addition, little is known about this relationship in emerging markets such as Brazil, especially given the growth in the numbers of investors and the interactions of these investors on Twitter. Thus, our first hypothesis is: H1. There is a positive and dynamic association between stock market performance and investor sentiment on Twitter in Brazil.
Investor sentiment is seen by literature as a determining factor in market movements. Faced with this and given criticisms such as that of Baker and Wurgler (2007), more traditional ways of capturing sentiments like opinion polls and market variables (Brown & Cliff, 2005; Twitter sentiment and market performance Baker & Wurgler, 2006) have given way to capturing sentiment in online environments, especially through social networks, to get to know the market and capture investor sentiment directly and instantly (Fan & Gordon, 2014). A series of surveys have emerged intending to capture investor sentiment from the Internet, in which sentiment indices have been developed through websites, online newspapers, research tools and social networks.
Concerning the search for sentiment through websites,  investigated messages from Yahoo! Finance. Results show that sentiment does not predict future returns, volatility or volume, although present returns influence future sentiment. On the other hand, Silva (2017) and Galdi and Gonçalves (2018) found, through Valor Econômico newspaper website, a strong association between contemporary investor sentiment and contemporary return, with a trend of reversal over the days. These studies also found that Brazilian market rates negative and uncertain words with higher weight, which creates a stronger (negative) association between investor sentiment and market returns. Mao et al. (2012) analyzed Twitter and identified that investor sentiment correlates significantly with various financial indicators of stocks, such as trading volume and performance indicators, and that tweets can be used to predict stock prices. In this line, Wei et al. (2016) found a strong association between volume of posted messages and stock return, in addition to attesting that using a strategy based on the perception of a market bullish helps to obtain greater returns. Nisar and Yeung (2018) point out that investor sentiment on Twitter and stock prices are related. However, the volume of tweets does not appear to be associated with prices or turnover. Similarly, Oliveira, Cortez, and Areal (2017) found that the sentiment index extracted from Twitter was able to predict returns on S&P500 index, although it had low explanatory power in forecasting turnover and volatility. Thus, although for Nisar and Yeung (2018) the volume of tweets is not related to variables other than returns, for Mao et al. Regarding the analysis of sentiment by tweets, different studies used tweets from the social network StockTwits, demonstrating that forming portfolios based on a sentiment index is useful in gauging abnormal returns (Renault, 2017;Al-Nasseri & Ali, 2018). In this sense, Renault (2017) reveals that the exchange-traded fund (ETF) can be used to mirror S&P500 index and that the first half-hour in investor sentiment is useful to predict the return of the last half-hour of S&P500 ETF. Still, Al-Nasseri and Ali (2018) note that the higher the value of the sentiment index, the greater the trading volume.
A new way of capturing sentiment is through Google's search tool (Chen & Lo, 2019; Kim, Lu civjansk a, Moln ar, & Villa, 2019). Studies found no relationship between the volume of search on Google and the stock return; however, strong relationships were found with the volatility of the return, the trading volume and the turnover rate of the shares. So, in addition to the expectation of positive association between market performance and investor sentiment (Brown & Cliff, 2005;Baker & Wurgler, 2006, literature reports that the return on assets is affected by factors such as market risk, size, value, momentum and liquidity (Fama & French, 1993;Carhart, 1997;Keene & Peterson, 2007;Machado & Medeiros, 2011). Lee et al. (2002) reveal that sentiment is a risk factor, having a linear relationship with market return. Some studies have found factors that could explain the average returns provided by market betas. These factors are company size, market value, leverage, book-tomarket and earning/price ratios. Fama and French (1993) test these factors and find that the beta is not the only way to explain returns, as size and book-to-market also play a role, being a way to improve the explanatory power of the CAPM (capital asset pricing model). Carhart (1997) added to Fama and French's (1993) three factors a further factor that captures the anomaly of the momentum effect. Also, Keene and Peterson (2007) added one more factor to the Fama-French model, liquidity, thus creating a five-factor model, which constitutes the model that best explains the stock return in the Brazilian context (Machado & Medeiros, 2011). In this sense, we believe that although sentiment is associated with returns, it is necessary to consider factors related to the market.

Method
To identify investor sentiment on Twitter, we used the model of Bollen et al. (2011) as the basis, using machine learning to classify the polarity of words through the "Google Cloud Natural Language API," where parameters vary from À1 to 1, with 1 being the extremely optimistic sentiment, À1 the extremely pessimistic sentiment and 0 neutral. We draw on Bollen et al. (2011) because they already have a sentiment index on Twitter that is robustly validated, in addition to being related to market movements in the US. Therefore, it is not our interest to analyze the efficiency of measuring sentiment, but rather to analyze the association between Twitter sentiment, market return and trading volume.
The investor sentiment on Twitter is calculated according to Equation (1), where, Sent p;d is the investor sentiment on Twitter for asset p on day d; P WPW d is the weight of positive words on day d; P WNW d is the weight of negative words on day d; P WPNW d is the sum of the weights of positive and negative words.
The tweets were collected through Tweepy library with the following parameters: (1) are in Portuguese and (2) contain terms referring to stocks or market indices. These terms were raised using the netnographic method, in which, for two months, there was participant observation aimed at identifying the behavior of individuals on Twitter, detecting patterns and how they usually refer to the market and the stocks that are part of Ibovespa. The period of the study was January 1, 2017, to December 31, 2018. Based on this, the terms that represent each company were raised to capture the Twitter sentiment about the firms, for example, for Magazine Luiza S/A: MGLU3, $MGLU, #MGLU and #MGLU3. We also looked for terms that refer to the Brazilian market as a whole, such as #BVMF3, $BVMF, BVMF3, BVMF, B3SA3, BM&Fbovespa, B3, IBOV, IBOVESPA, Bolsa Brasileira, Brasil Bolsa Balcão and Bolsa de São Paulo. This search returned 1,195,575 tweets that were treated to remove links, tweets that mentioned YouTube (when they were liked to videos) and repeated tweets (they were not retweets or posted on different dates), reaching a final sample of 314,864 tweets.
These tweets were classified as positive (þ0.5) and negative (À0.5) based on algorithm attribution, and then the daily Twitter Investor Sentiment Index (ISI p;d ) was constructed by accumulating the sentiments from up-to-date tweets. On days when there was no trading on the Brazilian stock exchange, tweets were added to the following trading day. So, the daily index is the average of the sentiment from the tweets for each trading day d, according to Equation (2).
Following the rationale of Renault (2017) in another market, we use the Ibovespa ETF (BOVA11), an asset that represents the main market index of the Brazilian stock exchange Twitter sentiment and market performance and that has the largest trading volume in this market, to represent the Brazilian market movements. The BOVA11 return was calculated like in Equation (3), where Ret p;d is the observed return of portfolio p on day d, and P p;d and P p;d−1 are the prices of BOVA11 on days d and dÀ1. The trading volume (Vol p;d ) is the total trades with BOVA11 on day d, as shown by Equation (4).
Trades (4) All financial data were collected from Refinitiv Eikon.

Estimation models
To analyze the association between market performance and investor sentiment on Twitter, vector autoregression (VAR) models were used. The preceding literature provides evidence that the relationship between these phenomena is dynamic, especially when related to stock returns (Zhang, Deng, & Yang, 2010). Also, following Baker and Wurgler's (2006) rationale that macroeconomic factors affect investor sentiment, Equation (5) includes a set of macroeconomic variables.
where r d is a vector of k endogenous variables, f 0 is a vector of constants, Φ j is k 3 k matrices to be estimated for d 5 1, . . ., n, Ψ d is a vector of macroeconomic variables, and a d is white noise formed by a sequence of independent and identically distributed random vectors. Before these estimations, we conducted tests for the existence of a unit root in the variables, and the augmented Dickey-Fuller (ADF) test revealed its absence in all variables. The Jarque-Bera normality test revealed a non-normal distribution of residuals; however, the standard errors of the impulse response functions (IRF) are calculated via bootstrap. Complementarily, to analyze the association of Twitter sentiment with the performance of the Brazilian stock market, we used quantile regression models. This type of model is adequate due to the absence of normality in the distribution of the series. So, we estimate quantile regressions in five different quantiles (0.10, 0.25, 0.50, 0.75 and 0.90) to explore this association in more depth, whether on days of high or low returns, especially considering that initial descriptive statistics point to an association that changes with the changing mood of the market.
Based on EMH semi-strong form (Fama, 1970(Fama, , 1991, we analyzed the association of market performance with the Twitter sentiment using a 5-factor model, starting from the 4-factor model of Carhart (1997), plus the liquidity factor (IMLilliquid-minus-liquid) of Keene and Pedersen (2007). Since tweets are seen as a type of information, through Equation (6), we tested whether investor sentiment on Twitter has informational content to explain part of the Brazilian stock market performance.
where Ret p;d is the observed return of BOVA11 on day d, ISI p;d is the daily ISI related to BOVA11 on day d, MKT p;d is the market factor, SMB p;d is the size factor, HML p;d is the value factor, WML p;d is the momentum factor and IML p;d is the liquidity factor. For Mao et al. (2012) and Oliveira et al. (2017), the volume of daily tweets is related to the market return. Therefore, we perform a robustness test in which we modified Equation (6) and changed the ISI p;d to the simple volume of tweets, which does not distinguish the sentiment or mood of the messages, as per Equation (7).
where TVT p;d is the total volume of tweets of portfolio p on day d. Table 1 presents the descriptive statistics. Concerning trading volume (Vol), we note that the daily average was 3,672,363, with a strong heterogeneity among days. This trading volume is still low when compared to the daily average of trades (658,021,632) in a developed country like the United Kingdom (Nisar & Yeung, 2018), for example. Another relevant difference is the standard deviation of these volumes (average of 8% in the United Kingdom and 31% in Brazil).

Findings
The daily volumes of positive (VPT) and negative (VNT) tweets have similar behaviors since the average of positive messages was 243 (min. 5 86 and max. 5 1,136) and the average of negative tweets was 117 (min. 5 32 and max. 5 2,688). In total, we observed an average of 640 tweets per day, with a range from a minimum of 213 to a maximum of 5,281. In addition, the highest average of positive tweets reinforces our proxy's divergences from Silva (2017) and Galdi and Gonçalves (2018).
We note that the investor sentiment on Twitter (0.0339) and the daily return of BOVA11 (on average 0.0855%) are positive, which is associated with the positive performance of the Brazilian market during the analyzed period. When the sentiment is bigger, investors become more optimistic about investing in the market.
This finding is different from Silva (2017) and Galdi and Gonçalves (2018) when investigating the Brazilian market. This difference is explained by the distinction between the proxies used to capture the sentiment, and by the period of analysis, since the studies cited Vol is the trading volume, VPT is the volume of positive tweets, VNT is the volume of negative tweets, VTT is the total volume of tweets, ISI is the Twitter Investor Sentiment Index, Ret is the market return, MKT is the market factor, SMB is the size factor, HML is the value factor, WML is the momentum factor, IML is the liquidity factor Table 1. Descriptive statistics of the analyzed variables Twitter sentiment and market performance only analyzed the market until June 2017, with previous years in which the Brazilian market had the worst performance, whereas this study encompasses a period known as the bull market after the impeachment of former President Dilma Rousseff.
The positive trend of the Brazilian market in this period can also be observed through the statistics of the traditional 4-factors of Carhart (1997) and the liquidity factor of Keene and Pedersen (2007). The averages and medians of portfolio returns for each of these five factors are positive. The market factor (MKT) had an average daily return of 0.0470%, the size factor (SMB) had an average daily return of 0.0446%, the value factor (HML) had an average of 0.0787%, the momentum factor had an average of 0.0563% and the liquidity factor had an average of 0.0561%. These findings converge with Machado and Medeiros (2011), which point out their importance to explain the pricing of assets in the Brazilian stock market. Table 2 presents the correlation matrix between the variables of interest. The main finding points to a positive and significant correlation (0.1064, p < 0.05) between Twitter sentiment (ISI) and stock market return (Ret). This evidence converges with Bollen et al. (2011) and Nisar and Yeung (2018). However, unlike those studies, it reveals statistical significance.
The ISI also showed a positive and significant association (0.1057, p < 0.05) with the volume of positive tweets (VPT). On good days on the stock market, investors are happier on the social network. However, the association with the daily trading volume on the stock exchange was negative and significant (À0.2255, p < 0.01), which reveals that the sentiment was more positive on days of less trade.

Dynamic relationship between market performance and investor sentiment
Going beyond the initial evidence of a positive correlation between investor sentiment and the Brazilian market performance, we assume that this relationship is dynamic (Zhang et al., 2010) and analyze the relationships between ISI, return and market trade volume through VAR models with up to 2 lags, based on Akaike and Schwarz criteria. Table 3 shows the VAR models to test the dynamic relationship. Preceding literature documents that in major markets investor sentiment on Twitter can be a useful tool for forecasting market movements (Nisar & Yeung, 2018). However, in Brazil we realize that this evidence is observable only in the contemporary period, given that the correlation on day d was positive (according to Table 2), but the coefficient was low.
Furthermore, in plan A in Table 3, we can see that past ISI (with 1 or 2 lags) does not explain the current performance of the stock market (p > 0.10) through BOVA11. Likewise, in plan B, it was not possible to identify an association of past return (with 1 and 2 lags) with the current Twitter sentiment (p > 0.10). None of these associations were statistically significant. Thus, observing the findings of Nisar and Yeung (2018) that this association exists for a short window, we can derive these findings onto Brazil, adding that here we were able to identify statistical significance, but only for the association on the same day d.
Still, in plan B, we note that there is a relationship of persistence in Twitter sentiment since the Twitter SI lagged in 1 and 2 days was significant to explain the contemporary ISI (p < 0.10). Plan C in Table 3 presents the relationships between trading volume (Vol), ISI and return. We noticed that the return of the previous 2 days has a negative association with the current Vol (p < 0.05), as well as the past Vol (with 1 and 2 lags) has a positive association with the current Vol (p < 0.01).
Additionally, we could verify that inflation affected all variables of interest, being negatively related to Twitter sentiment (p < 0.05) and positively related to Vol (p < 0.10). GDP negatively affected investor sentiment (p < 0.01) and positively impacted Vol (p < 0.05). Exchange rate positively affected Vol (p < 0.01), and interest rate did not show significant relationship with the interest variables. Note(s): *** is significant at 1%, ** at 5% and * at 10% Table 2. Correlation matrix Twitter sentiment and market performance To verify the relationship more accurately between the variables of interest, we analyzed the impulse-response using the impulse response function (IRF) and the forecast error variance decomposition (FEVD). Due to extent constraints, instead of presenting the graphical analysis we chose to present the accumulated impulse-response over 10 days. In each case, an impulse is defined as an 1% increase in ISI. Table 4 shows that an 1% increase in current ISI has a positive response on future ISI, with bigger response on day dþ1 (þ0.0061%) and a decreasing effect over time. À9.9878 Note(s): ISI is the Twitter Investor Sentiment Index, Ret is the market return, Vol is the trading volume, GDP is the gross domestic product, p < 0.01 is significant at 1%, p < 0.05 is significant at 5% and p < 0.10 is significant at 10% Table 3. VAR models for the variables of interest REGE response is negative (À0.0012%) on dþ1, remaining close to zero from dþ2 onward. The volatility response is also negative (À0.0132%) on dþ1, reaching À0.0136% on dþ2, however, with a tendency to zero over the following days. The FEVD shows the percentages of the forecast error variance for each variable, based on the VAR models presented in Table 3.
We also investigate whether there is Granger-causality between the main variables of our models, according to Table 5. A variable X Granger causes another variable Y if (given the past values of Y) past values of X are useful for predicting Y. For that, we regress Y on its own lagged values and lagged values of X. The null hypothesis of Granger-causality is equivalent to saying that the estimated coefficients on the lagged values of X are jointly zero. Table 5 presents the chi-square statistics for our sample, showing that there is no causal relationship between ISI and return or trading volume. However, we can see that lagged values of trading volume cause the return of asset p on day d (p < 0.05). In the third plane of Table 5, we can also see that lagged values of return cause the trading volume of asset p on day d (p < 0.05). Therefore, we can verify that there is a bi-causal relationship between return and trading volume, as the null hypothesis of Granger's non-causality can be rejected at 5%.
Regarding the positive and dynamic relationship we assume between market performance and Twitter sentiment, our Hypothesis 1 was not confirmed. Despite the positive correlation identified, it was low (0.1064). In addition, we did not identify an association between these lagged variables, or even causality between them. 1240 Note(s): p < 0.01 is significant at 1%, p < 0.05 is significant at 5% and p < 0.10 is significant at 10% Table 4. Impulse-response effect of the ISI on the variables of interest Table 5. Granger-causality between variables Twitter sentiment and market performance

Association between market return and investor sentiment
To analyze the association between stock market return and investor sentiment on Twitter, we estimated quantile regressions at five different quantiles. We know that market factors such as risk, size, value, momentum and liquidity explain stock returns in markets (Fama & French, 1993;Carhart, 1997;Keene & Peterson, 2007;Machado & Medeiros, 2011). Furthermore, Lee et al. (2002) state that investor sentiment is a risk factor that can explain abnormal returns. We then started from this evidence to test and present the association of investor sentiment on Twitter to market return, in different quantiles of returns over the analyzed period, in Table 6. Table 6 presents the results for the 5-factor model estimated, with the addition of the Twitter ISI. The model estimated for the median (q.50) shows that ISI is not significant to explain stock market return (measured by the BOVA11 return). This finding diverges from our expectations. However, we can identify a positive and significant association between stock returns and Twitter sentiment (ISI) in periods of lower returns, particularly at the 10% and 25% quantiles (q.10 and q.25).
We can say that we have evidence that investor sentiment on Twitter is useful to explain stock returns in periods of lower returns in Brazil, which converges with previous literature (Mao et al., 2012;Wei et al., 2016;Oliveira et al., 2017;Nisar & Yeung, 2018). These findings reinforce the assumptions of Brown and Cliff (2005) and Wurgler (2006, 2007), showing that there is a relationship between sentiment and return, which is also observed even in an emerging market, such as Brazilian. Based on this, we can say that Hypothesis 2 of this study, which suggests that the ISI explains part of stock returns, is confirmed only at times of lower returns (in the quantile of lower returns in our sample).
In those moments, the more positive the investor sentiment on Twitter, the greater the stock return (or, in periods of negative returns, they become less negative). In this sense, investors can use tweets in their investment strategies when the market operates with low returns, seeking to obtain above-average returns. This finding for the Brazilian emerging market converges with evidence also observed in the US market Wei et al., 2016;Renault, 2017).
The findings in Table 6 also explain in a complementary way the positive and significant correlation that we identified in Table 2 8448 Note(s): *** is significant at 1%, ** at 5% and * at 10% Table 6. Association between market return and Twitter sentiment (0.1064, p < 0.05). When we calculated this correlation in the first and last quantiles of the distribution of returns, we noticed that the correlation in the quantile of lower returns is stronger (0.4054, p < 0.01), while in the quantile of higher returns it becomes negative and nonsignificant (À0.0592, p > 0.10).
Concerning market factors, during the period analyzed, the most relevant factors for the Brazilian market were market and value factors, which had positive and significant effects in all analyzed quantiles (p < 0.05). This implies that companies with higher risk and higher book-to-market have higher returns, especially as these factors are associated with greater growth opportunities (Fama & French, 1993).
The liquidity factor had negative and significant effects in quantiles q.25, q.50 and q.75. The exceptions were the extremes (q.10 and q.90). This finding agrees with Machado and Medeiros (2011). Thus, the less liquid the stock, the greater the return. The size factor only showed negative and significant relationship at 10% in q.75, and the moment factor only had a positive and significant association in q.50 (p < 0.05).
Alternatively, we check whether the relevance of tweets in explaining stock market return lies in the informational content of the messages, which reflect investor sentiment, or in the total volume of tweets (TVT) that is published daily. Table 7 presents the estimated quantile regression models for different return quantiles. We can verify that in none of the estimated models the TVT was relevant to explain the market returns (p > 0.10). These findings are similar to those of Nisar and Yeung (2018), who found that the volume of tweets is not related to variables such as price, return and turnover.
In this sense, we can verify that the relevance of investor sentiment on Twitter lies in the informational content of the messages. The stock market return was not sensitive to the volume of tweets (TVT), either at times of higher or lower returns. Additionally, about market factors, the findings of this robustness analysis maintain the same direction as the previous one.

Conclusion
Our analyses suggest a positive and significant relationship between Brazilian market performance and investor sentiment on Twitter, especially at times of lower returns. 8448 Note(s): *** is significant at 1%, ** at 5% and * at 10% Table 7. Association between market return and tweet volume Twitter sentiment and market performance However, during the analyzed period it was not possible to identify a dynamic relationship between these two phenomena. We observed that the interaction among investors on Twitter increases especially in the worst moments of returns in this market: when trading volume increases, Twitter sentiment becomes more negative, and the association of this sentiment with market performance becomes stronger.
In stock markets, investors can have their investment decisions affected by emotional factors, because their rationality is limited. An example of this is the so-called herd effect. Thus, in pessimistic moments in the market, when there are lower returns, sharing information and sentiment on social networks like Twitter can help reducing information asymmetry, therefore making investment decisions more efficient. This can lead investors to think more rationally and analyze the expected future cash flow of the company, which determines its intrinsic value.
The daily total volume of tweets was also positively associated with the trading volume in the market when messages are endowed with negative sentiment. This finding is especially strong when we note that the first and second biggest spikes in volume took place during the Carne Fraca Operation and during the "Joesley Day," as they were accompanied by a series of negative news around scandals involving large companies and Brazil president. This confirms evidence from previous studies that Brazilian market places more emphasis on negative news, which converges with the heuristic of loss aversion. Based on Kahneman and Tversky (1979), perception related to loss is 2.25 times greater than that related to gain.
The findings of this study have relevant contributions to demonstrate that it is possible to use the monitoring of investor sentiment on Twitter as an aid in predicting Brazilian market fluctuations, or at least to understand their reasons. Thus, sentiment and volume of tweets have the potential to be used as auxiliary variables to investment strategies, as in the Brazilian market it seems that investors negotiate in the market while watching Twitter. Thus, we can follow the market's mood through this social network.
Our findings contribute to financial literature, converging on previous evidence, bringing results like those found in other markets and expanding them. The study demonstrated how the online activities of investors have effects in the Brazilian market, filling part of the gap in this literature. Additionally, we show in our evidence that despite the association between Twitter sentiment and market performance, we did not find a dynamic relationship or a clear cause-effect relationship between these phenomena.
This study is useful to demonstrate to market participants that investors can obtain abnormal returns with this kind of information, especially when the market performance is in its low side. There are practical implications for analysts and investors, as findings indicate that in some instances these agents may use Twitter in a complementary way to their analyses. Above all, it is necessary to be cautious when the sentiment is optimistic, or when the market is experiencing high returns. In these cases, we did not identify clear evidence of a positive association. The usefulness of these findings to regulatory and supervisory bodies of the Brazilian stock market is also noteworthy, since the monitoring of Twitter appears as a potential tool to identify possible market manipulations, especially with less liquid assets (more easily driven prices).