How does twitter responds following Donald Trump’s tweets? Social network analysis (textual analysis of tweets) gives interesting insights on range, and sentiment. We take a closer look!
Donald Trump’s towering presence
In a previous post, we looked at how Donald Trump’s tweets affects the Bloomberg Sentiment measures. This week, we consider how Twitter reacts to his messages. Consider his June 26, 2018 message threatening Harley Davidson to tax them for moving plants and jobs outside the US. Between June 23 and July 3, we collected 1,266 tweets featuring the expression “Harley Davidson” using the “rtweet” library in R.
The pure count statistics in Figure 1 shows that the words trump, tariffs, potus, realdonaldtrump, etc. featured heavily in tweets. The result from the word network analysis in Figure 2 yields similar results. And as the heavy borders connecting the terms show, these expressions were used in the same tweets.
Next, we did a Latent Dirichlet allocation (LDA) analysis for the tweets featuring Harley Davidson using the “topicmodels” library in R. LDA is natural language processing mechanism which creates topics from documents – tweets in our case. Figure 3 shows that the density function for the firm name (and its variations) skyrocketed on June 26, 2018. Also, many topics contained words related to Trump or tariffs.
Donald Trump tweets, and sentiment dips…
Next using the “SentimentAnalysis” library in R we calculated various sentiment measures from the text of the tweets. We apply the Loughran-McDonald (LM), Henry (HE) and Harvard-IV (GE) dictionary, and compute sentiment based on simple word counts. Two of the three indicator (LM and GE) dipped on June 26, the day of the tweet, as Figure 4 shows.
So, the negativity in the Donald Trump’s tweet did spread in the social network.
Social network analysis: A powerful tool
We can clearly see that social network analysis (in our case, textual analysis of tweets) is a powerful tool. Not only does it gives us an idea what people are talking about. We can also use it to develop various sentiment measures, and thus predict the general mood – and, in turn, capital market effects.
You may also like