Skip to content

Enhancing Sentiment Signals with Twitter Network Analysis

Introduction

On Twitter, companies are often mentioned together in discussions about current events, financial implications, or predicting price movements. At Context Analytics, we have extensively researched how sentiment regarding individual securities can predict price movements. In this research, we aim to determine if the network of securities tagged together can enhance our predictive signals.

 

Visualizing Twitter Relationships

To begin, we visualized the Twitter company relationships among various securities. This visualization reveals different clusters that show which securities are mentioned together on Twitter. The width of each line correlates with the number of joint mentions. For example, Tesla exhibits significant connectivity, being linked to dozens of other securities. One of the smaller clusters in the top right displays $HUMA, $ORIC, $NUVB, and $LBPH neatly connected. We aim to determine, for example, if the sentiment surrounding $ORIC, $LBPH, and $NUVB can enhance our sentiment signal for $HUMA. The logic is that extreme positive or negative conversations about related tickers may provide more information about the focal security than just the sentiment for that security alone. For a more dynamic viewing of this visualization, visit our home website page.

Visualizing Twitter Relationships

 

Methodology

To achieve this, we created a weighted sentiment score for all securities mentioned alongside the focal ticker for the previous 24 hours. For instance, assume we have company 'J' and, on that day, it has been mentioned alongside 'n' other companies on Twitter. For this research, the metrics are calculated 20 minutes before market open (9:10 AM EST).

1. For all companies mentioned alongside company 'J,' we calculate the percentage of total mentions each one has.

Joint Twitter Mentions

2. We take the S-Score at the premarket open timestamp.

Screen Shot 2024-07-10 at 11.41.58 AM

3. We created a new weighted score for each security and summed these scores for all the companies mentioned. Note that this does not include the score for Company J.

Screen Shot 2024-07-10 at 10.03.41 AM

For example, on January 3rd, 2022, Apple ($AAPL) was mentioned alongside 161 other tickers on Twitter. Many of these tickers had low mention volume, so their S-Score was given little weight. However, if they had significant mentions, their score was given much

Screen Shot 2024-07-10 at 10.03.53 AM

greater weight. By summing these weighted scores (as described above), we obtained a Weighted Relationship Score of 0.254 for that day.

The resulting Weighted Relationship Score provides a roughly standard normally distributed metric, exhibiting behavior like our normal S-Score.

Screen Shot 2024-07-10 at 10.04.02 AM

Testing

With this Weighted Relationship Score, we now want to test its efficacy compared to the normal S-Score for the focal ticker. For instance, the 0.254 score mentioned above will be compared to the S-Score for AAPL on that day. Additionally, we introduced a third metric that combines these two options: an average score between the S-Score and the Weighted Relationship Score. This third metric incorporates information from both the focal ticker and all related tickers.

We compared simple regression models using each metric to evaluate their effectiveness. Each model tested the metrics on the subsequent open-to-close market-adjusted returns. We then transformed the coefficient estimates into basis points. The coefficients are displayed below:

Screen Shot 2024-07-10 at 10.04.16 AM

The results showed that the Weighted Relationship Score by itself wasn't as strong as the S-Score of the security. However, the combined metric improved the expected basis points added per unit increase in score by nearly 20%. This suggests that incorporating the Weighted Relationship Score can enhance our signal. From here we focused our comparison to just the S-Score and combined S-Score and Weighted Relationship Score.

 

Backtesting and Results

Next, we backtested this data over historical periods, grouping it into daily quintiles based on the S-Score and the S-Score Weighted Relationship. This involved daily re-bucketing and accumulating daily open-to-close returns.

Screen Shot 2024-07-10 at 10.04.45 AM

Screen Shot 2024-07-10 at 10.04.57 AM

Screen Shot 2024-07-10 at 10.05.14 AM

Screen Shot 2024-07-10 at 10.05.22 AM

We observed an improvement in our signal based on quintile performance, particularly on the short side. Our lowest quintile group experienced a drop of over 5% in cumulative returns, while our highest quintile showed slight improvement. The long-short strategy, which involves going long on Quintile 5 and short on Quintile 1, increased by over 20% cumulatively and 5% annually, while also improving Sharpe and Sortino risk ratios. Although moderate, these improvements suggest that considering the other securities mentioned on Twitter enhances the social sentiment signal of the focal security. Specifically, on the short side, when there is negative conversation surrounding both the focal security and its related securities, the likelihood of a subsequent negative return increases.

 

Conclusion

This research suggests that incorporating information from security relationships on Twitter can enhance the sentiment signal. By considering the sentiment of other securities mentioned alongside a ticker, we can achieve a more comprehensive understanding of market sentiment and potentially improve our models. For more information on the this Relationship data feed or Context Analytics in general,  visit www.contextanalytics-ai.com or click the button below.

Contact Us