150 — Social Network based Short-Term Stock Trading System
Read on 17 January 2018The stock market is, ostensibly, tied to public sentiment. And where else do we go to express our sentiments publicly if not Twitter? In this paper, the authors propose a high-frequency trading system that trades stocks based upon features scraped from Twitter.
First, it is important to write a robust scraper that can identify key words or phrases from a streaming Twitter datasource. The authors use a simple model that only looks for the brand name itself, registered trademark names of products the brand sells, or key names, such as that of the CEO, the president, etc. These are classified into positive, negative, and neutral classes.
Next, the algorithm looks at a sliding window of timesteps in the historical pricing of a given stock, and correlates this with the sentiment analysis from above. This can be used to determine the “financial-sentiment spread”, or the difference between the actual trading price of a stock and the price at which the model predicts it should be traded, based upon on the sentiment expressed on Twitter.
In practice, the sentiment analysis tool achieves around 60% agreement with humans over positive/negative sentiment classification, so it’s a little surprising to me that the trader bot performs so outrageously well when compared against the DJTATO (a benchmark for trading-bot results that models a trader that holds onto the DJTATO index for the full duration of trading).