Twitter and the Future of Data Science on Wall Street
By: Connor Uzzo
Tags: Wall Street, Machine Learning, Twitter

Image from [7]

In 1973, financial mathematicians Fischer Black and Myron Scholes published an academic paper titled “The Pricing of Options and Corporate Liabilities”, which contained what would end up becoming one of the most pivotal equations in all of mathematical finance, the Black-Scholes model[1]. The model is a stochastic-partial differential equation used to assign a value to a European style option, a type of asset that allows the holder to buy or sell a stock at its current price regardless of its future behavior. For reference, “puts” and “calls” are the two forms of options which are traded, where a put allows the holder to sell a stock at its current value in the future (useful if the stock price drops) and a call allows the holder to buy stock at its current price in the future (useful if the price rises).

While the Black-Scholes model received a fair amount of criticism over some of the assumptions it was built upon, it was still adopted by academics, professional traders, and amateurs alike who would introduce their own adjustments in an attempt to find some competitive advantage over other investors.

How is Machine Learning used on Wall Street?

While most people tend to imagine a room full of franticly shouting stockbrokers when they think of Wall Street, the truth is these “Wolf of Wall Street”-esque firms run by human traders have become a rarity in recent years. Instead, these firms are filled with quants, data scientists, and computer scientists who together design trading algorithms so that all of the actual buying and selling of can be handled by bots [2]. While financial and economic theory used to dictate how these trades were made, machine learning has allowed more creativity to be introduced into the models that make these choices [2].

Quantitative analyst Marcos Lopez de Prado released a book in 2018 titled Advancements in Financial Machine Learning that would later lead to him being awarded The Journal of Portfolio Management’s 2019 “Quant of the Year” award. Prado’s book is certainly not an exhaustive list of the uses of machine learning in finance, but it has helped many of the “old school” quants and investors transition from using the Black Scholes model and its variants into using more generic ML-based models.

Why Use Twitter for Financial Machine Learning?

One major advantage that machine learning allows for that purely financial models cannot grasp is the ability to include variables that are not based in finance. While economics will always be a driving force in the business world, a company’s stock price is not necessarily dictated by the quality of their work or the profit they make. Factors like competition with other companies or worker strikes can disrupt a business or tarnish their image, especially when written about in the news or exposed on social media. In particular, the social media site Twitter has been proposed as possibly a highly effective way to predict short-term jumps and dips in stock prices[5]. However, these jumps and dips happen so quickly in the age of computerized trading that a human broker would simply not be fast enough to decide whether or not a tweet means good news or bad. This is where machine learning shows its true advantage over both human brokers and computerized financial models: it can reasonably predict long term trends but can also react and adapt quickly to short term trends.

This is especially true amongst tech companies, where the company’s value is more closely tied to the potential future value of its technology than it is to the gains or losses incurred by the company. Many of these tech companies have young, Twitter-active CEOs and presidents that tweet about their company’s future endeavors and investments frequently.

How does Twitter affect stock prices?

[7] Elon Musk’s 2018 tweet that would later land him in hot water with the SEC [3]. This tweet would lead to the stock jumping 13.3%, and Musk being forced to step down as chairman of Tesla Motors.

In 2018, Tesla Motors founder and CEO Elon Musk tweeted that he was taking the company private, willing to buy out shareholders at 420$ a share, and that he had funding secured to do so [3]. Tesla’s stock was significantly lower than 420$ at a time, so many investors saw this as an opportunity to have an essentially risk free investment and responded by buying more of the stock. The stock price responded with a 13.3% increase almost immediately following the tweet, though the excitement was short lived after it was revealed that the company did not in fact have the necessary funds to go private. Still, if a wise investor were to buy what are known as “call” options for Tesla Motors immediately following this tweet, they would be able to buy the stock at its price from before the tweet was published, which in this case could mean an almost instantaneous 13.3% profit.

Musk’s Twitter use was deemed so disruptive by the SEC that he was banned from tweeting about certain topics related to his businesses [3], yet Tesla still shows noticeable swings in its stock price when Musk does tweet, or even when other pages tweet about Tesla.

Figure 2: The closing stock price of Pfizer in October and November of 2020 [4]. Notice that there is a very sharp peak on the day of the vaccine announcement. While this peak does decay quickly after, this is possibly just due to the volatility of the stock, which has fluctuated rather heavily over the last few months.

Of course, business executives are not the only people with enough of a public impact to swing stock prices. The Twitter pages of prominent politicians, perhaps most notably President Donald Trump and more recently President Elect Joseph Biden, have also created short-term jumps and dips in stock prices. Trump’s November 2020 twitter announcement of pharmaceutical giant Pfizer’s COVID-19 vaccine achieving 90% accuracy, for instance, preceded a rally for the stock prices of Pfizer, Moderna, and many other large pharmaceutical companies. The announcement was made Monday, November 9th, 2020, and Pfizer’s stock saw a 7.7% jump from its closing price the Friday before [4]. Many investors believe that the news also led to rallies in unrelated industries like oil, air travel, and entertainment as the American people became more optimistic about an end to COVID-19 restrictions on businesses and public spaces[4]. In this case, a wise investor would certainly want to buy stock in pharma, but also perhaps stock in other rallying industries to minimize the risk of the investment and be better prepared for long term gains.

It is worth saying that of course, we cannot prove that the tweets were the actual cause of the stocks jumping. However, simply because so many people follow the President’s Twitter page, it is reasonably likely that people will first learn about the vaccine either through the tweet itself or from a newspaper article discussing it. All that really matters is that the model can react to the news in time, and if more people react to the tweet than the announcement itself then it makes sense to simply watch for the tweet.