Global Editions

How Data Science Predicted Brexit

By Tayyab Tariq

The world, and financial markets in particular, were stunned by Britain’s vote to exit the EU. The markets were quite confident that Britain would stay in the EU. The S&P 500 rose sharply towards the end of the trading day before the Brexit vote, which some analysts claimed as a vote by investors against the Brexit. Earlier that morning (at market Open), a unique model that we developed using media sentiment data made the opposite prediction and expected a sharp decline in markets that we saw overnight.

During my graduate work at Stanford University, I learned how modern machine learning algorithms can be used to identify complex and deep patterns in noisy datasets – patterns that may be very difficult to detect with less sophisticated algorithms or human intuition. The media coverage of Brexit is one such noisy event: identifying the nuances in the information flow that is likely to sway voters is one promise of such machine learning approaches.

Over the past 9 months we have developed a machine learning system – Pythia – that predicts financial markets using media sentiment data set called the Thomson Reuters MarketPsych Indices (TRMI). The TRMI quantify granular sentiments such as trust, uncertainty, and optimism in thousands of global news and social media sources. Pythia identifies the impactful global media sentiments in the TRMI, and then uses these characteristics in an ensemble to predict daily movements of the markets with a high degree of accuracy.

Pythia has performed well both in the testing set as well as in live trading. We first developed Pythia in November 2015. It performed well in paper trading through February 22, 2016, when we started trading a small amount of capital with it. Since live trading began, Pythia has generated a gain of 18.84% by making a simple buy or sell decision on the SPY (an ETF proxy for the S&P 500) every day, which is in line with the model’s historic performance.

A chart of the account’s performance in live trading is below. Pythia generated a simulated return of 70.4% in the 2015 out of sample testing with a Sharpe Ratio of 3.32 (excluding fees and transaction costs).

A chart of the accounts performance

It is worth noting that Pythia accurately predicted the correction in August 2015, accounting for the large jump in performance that month. It also performed well during the January-February 2016 correction.

We expanded Pythia’s prediction universe to large cap US stocks with similar success. We are studying intra-day predictions and will keep you notified about the performance.

Pythia
Pythia is a machine learning system, that predicts financial markets using media sentiment data set called the Thomson Reuters MarketPsych Indices (TRMI). Pythia identifies the impactful global media sentiments in the TRMI, and then uses these characteristics in an ensemble to predict daily movements of the markets with a high degree of accuracy.

Pythia has performed well both in the testing set (70% annual return in 2015) as well as in live trading. We started trading a small amount of capital with it on Feb 22 2016. Since live trading began, Pythia has generated a gain of 18.84% by making a simple buy or sell decision on the SPY (an ETF proxy for the S&P 500) every day, which is in line with the model’s historic performance.

The Brexit Prediction
The morning of the referendum, most investors were confident that the “Remain” vote would prevail. In line with this, the S&P 500 rose sharply towards the end of the trading day. However, However, earlier that morning (at market Open), Pythia made the opposite prediction and expected a sharp decline in markets that we saw overnight.

Tayyab Tariq is a Fulbright Scholar with a Master’s degree in Computer Science from Stanford University. He runs Red Buffer, a software company focused on Machine Learning, Predictive Analytics, Natural Language Processing and Big Data.

Authors
Top