Words ought to be a little wild, for they are the assault of thoughts on the unthinking
- J.M. Keynes

Tuesday, 26 January 2016

Artificial Intelligence (AI) in trading

Superhuman intelligence devoid of emotion has been the long-time goal of computer scientists working on artificial intelligence (AI) and the winning formula for many a Hollywood blockbuster. Public interest in AI has piqued again after several luminaries (Bill Gates, Stephen Hawking, Elon Musk amongst others1) argued that real life could follow a Hollywood script as AI advanced beyond human comprehension and control. While we are far from such an eventuality2, an enormous amount of money (~5% of total 2015 VC investment of ~$50BN+3) and time (~10% of overall research in computer science4) has been invested in developing AI for use in various areas from fighting cancer to writing cookbooks5.

In finance, R&D on AI is being carried out by banks, fund managers and Fintech companies. Considerable excitement has been generated by the vision of finally realising the alchemical dream in trading. Well known established hedge funds such as Bridgewater Associates and Renaissance Technologies have invested in AI and are competing with new entrants such as Rebellion Research and Aidiyia. Is the future of markets an uber-rational machine trader, untiringly able to process and draw conclusions from vast amounts of data?

Observing the progress in AI and the rapidity which markets are turning electronic, it may seem that the days of the human trader are limited. Starting from 1997, when IBM’s Deep Blue beat chess grandmaster Kasparov, AI has come a long way. In 2011, IBM’s Watson achieved a more remarkable feat of beating ‘Jeopardy’ champions Brad Rutter and Ken Jennings. ‘Jeopardy’ requires the player to frame a question based on a provided answer. This can be across a variety of themes from arts to science and history to current events. Watson was able to understand natural language (including idioms and puns), relate it to processed data across topics and come up with the correct response. In addition, Watson can improve over time based on feedback to its responses. Based on these successes, a machine trader is not hard to envision. Our version of Trader Smith can imbibe all historical market data and existing knowledge on economics, finance, politics, history, psychology. Further, it can plug itself into sources of new information – newswires, twitter feeds, etc. Armed with this knowledge bank, it can scan through asset markets looking for short-term mispricings, arbitrages and long-term investments. It can stress-test the best trade ideas and automatically execute those making the cut. Having no emotion, it can cut losses or take profits based on a rational data-based approach. It can continually improve its trading strategy by learning from its results. For the average human trader with bounded rationality, emotions and limited knowledge, an encounter with Trader Smith is likely to be very one-sided.

Although the vision is beguiling, the dominance of machines in trading is not ineluctable. For all its claims, artificial intelligence is narrowly focused on performing relatively well-defined tasks. For example, Deep Blue was only great at chess. Similarly, Watson’s expertise is focused based on where it is deployed. The original version was great at playing Jeopardy and not much else. New applications are devoted to using it as an expert in other fields such as medicine6 but this requires considerable reprogramming. True human-like intelligence (technically Artificial General Intelligence – AGI) is still far in the future (it is noteworthy that despite claims, no computer has yet passed the Turing test satisfactorily, including Watson7, 8). It might be argued that AGI is not necessary for trading. It is sufficient to program the computer using a finite knowledge base and trading rules and heuristics. For example, trading corporate bond can be done based on evaluating the borrower creditworthiness, relative value, economic outlook, etc. Trader Smith can not only do a better job given its massively greater power to crunch and analyse data but also improve based on trading results.

However, trading is unlike fields with set rules such as games or medicine9 where cause-effect-response relationships are relatively unchanging and can be computed easily (i.e. these fields are linear). In trading, a similar set of factors may produce significantly different results, i.e. trading is dominated by non-linear phenomena. Just as computers are unable to predict the weather a few days out (despite the massive computing power at the disposal of meteorologists), their clarity horizon will be fairly limited in trading. Therefore a pure deductive approach, which is the hallmark of AI currently, is unlikely to work.

Trading also requires creativity and thinking outside the box which machines are notoriously poor at. For example, Trader Smith may have got an inkling of impending doom in the run up to 2007-0810 but would it have been able to construct bespoke CDOs designed to fail in order to profit from the market downturn (a la Michael Burry11 and John Paulson12)?

AI proponents may argue that even if long-term trades are not the forte of computers, they can certainly beat human traders by capturing short-term opportunities. Indeed, a lot of algorithmic machine trading is driven by momentum and exploiting short-term arbitrage and mispricing opportunities. However, these are purely dependent on speed of processing and response times not artificial intelligence.

In addition to the challenges posed by non-linearity of markets and the need for creativity, there is likely an inherent “creator’s limit” to artificial intelligence13. This arises from the need to “train” machines to become expert at a field. The machine follows the basic rules laid down by the human experts and improves the efficiency of the decision-making process rather than “think” for itself. Yes, there are feedback loops and evolutionary algorithms which try to mimic the human thinking process but they are again constrained by the framework provided during inception / training. For example, Watson looks at the known body of medical research to arrive at a suggested course of treatment for a particular cancer. It cannot suggest an entirely novel course. At best it matches a treatment to a patient leading to a higher chance of survival. Finding a cure for cancer still needs the human mind to question basic assumptions and come up with lateral solutions. In markets, an AI system can choose profitable strategies based on a broad but fixed set of factors14. However, profitability of formulaic trading strategies rarely persists. Market participants rush in to exploit the opportunity and compete away the profits15. Therefore, far from learning and becoming better, Trader Smith would fall into obsolescence unless human help is provided.

Despite the shortcomings, there is hope for machines. Artificial intelligence can be used to augment human trading capability. Marrying ‘big data’ processing and rational analysis with creativity and human understanding of market “moods”, if done properly16, can create a winning combination. Just like in chess17.

9 Even though medical practice changes, the evolution is relatively slow, e.g. even if one study upends conventional thinking, it takes time before a new approach is validated and doctors need to change their prescription/practice
10 Apparently Rebellion Research’s “AI program predicted the stock market crash in 2008” (http://robusttechhouse.com/list-of-funds-or-trading-firms-using-artificial-intelligence-or-machine-learning/). However on their site (http://www.rebellionresearch.com/) the ‘A.I. Global Equity Strategy’ performance chart doesn’t support this assertion
13 This goes against what some very intelligent people believe but intelligence of a person is not sufficient for validity of their assertion. History has shown that intelligence is no guarantee of correctness. Before Einstein propounded the theory of relativity a lot of very intelligent men believed that all that was to be known in physics was already known.
14 For example, Rebellion Research’s AI system monitors 30 factors (http://www.wsj.com/articles/SB10001424052748703834604575365310813948080)
15 Momentum trading may be an exception but much of the academic support is based on historical regressions. The difficulty of knowing the turning points in advance means that in practice most traders are unable to make money in sideways markets
16 The challenge is to create a process for human-machine teamwork with the human combining the ability to work with AI-systems with some trading talent