The Gateway to Algorithmic and Automated Trading

Brain-Powered

Published in Automated Trader Magazine Issue 29 Q2 2013

Alan Turing once famously posed the question of whether machines could think. Applied to today's ultra-competitive markets, the question becomes, can machines think well enough to make money? Anna Reitman reports on what some of the players using artificial intelligence-based systems have to say.

The field of artificial intelligence has numerous iterations and though each has its share of cheerleaders, some players say that claims of superior technology could be more marketing than reality.

Marco Fasoli, co-founder of Titian Global Investments, says his firm uses artificial intelligence (AI) techniques but he also believes there are those firms using language associated with AI to differentiate in a highly competitive and secretive market, where offerings are typically very similar to one another. (For an interview with Fasoli, click here.)

"Machine learning and artificial intelligence is a catch-all phrase. Some firms say they do it but are actually dressing up simple systems," he says.

Titian uses AI to predict intra-day and daily market price movements. It covers 21 of the most liquid global futures markets across bonds, equities, currencies and commodities. Fasoli notes that while overall performance over the three-and-a-half years of live trading since inception has been strong, commodities have performed particularly strongly.

The firm's AI system differs from other systems in that it aims to make short-term price predictions of within 24 hours. For each prediction, the system self-generates trading rules for each individual market independently of the other markets, Fasoli says.

"This results in very low levels of correlation between the different market-specific systems, even between systems that are highly correlated markets, and hence in little intra-program directionality."

For example, despite a close to 90% correlation between the underlying markets of heating oil and crude oil, the Titian systems trading these two markets have a daily correlation of -0.15% over three-and-a-half years of trading. This, says Fasoli, is because for each of the 21 markets covered, the firm uses completely independent and autonomous sets of 600 systems.

The machine learning technologies that work best in financial markets, Fasoli adds, are those that are adaptive and can best behave as reliable 'universal approximators'. In other words, systems that have the ability to draw on historical information to reliably infer likely future price behaviour when presented with unseen data.

The known unknowns

As data sets grow bigger, the application of AI to 'big data' is something the industry is taking notice of with a dose of optimism.

Vincent Kilcoyne, capital markets industry lead at analytics firm SAS, says that going forward, much of what was taken for granted as conventional wisdom is being reconsidered. In the 1990s he specialised in the use of AI to control physical systems through the use of feedback and robotics, and has watched the extent to which models have evolved.

"Nobody knows how to wrestle with the way the world is changing from the point of view of the sheer volume of data," he says. "There is a wealth of data out there that traditional models either ignore or are completely unprepared to consider."

As a result, data scientists are becoming more relevant in the capital markets industry as experts who are able to navigate structured and unstructured data sets and bring them into a form that can be used by algorithms.

"The beauty of machine learning is that you expand it, you give it more data points," Kilcoyne says, "The world is rapidly realising that the data they have been operating on is very much a small subset of what they could and should potentially be operating on."

Vincent Kilcoyne

Vincent Kilcoyne

"When you say existing models don't work when they get more complicated, well, maybe that is because you are getting complicated in the wrong direction,"

Model behaviour

Still, one of the greatest challenges identified in the AI space is that a change of even just one small input can make a model fail spectacularly. Kilcoyne says that the solution lies within the problem itself.

"When you say existing models don't work when they get more complicated, well, maybe that is because you are getting complicated in the wrong direction," he says, adding that it would be interesting to see how models evolve for longer-term strategies.

Rebellion Research occupies the longer-term end of the AI spectrum, using its machine-learning technologies to make three-month forecasts. Founded in 2005, the firm uses Bayesian probabilistic modelling to enable its algorithm to learn from large historical data sets across equities, ETFs and other asset classes. This modelling, says Spencer Greenberg, CEO and chief software architect of Rebellion, is based on the idea that you can begin with prior beliefs about what is true, and then apply certain equations to update these beliefs in the light of all the new, relevant data you receive.

"We are not coming to the process assuming we know exactly how to make money. Instead, we are saying we have this wide range of possible strategies we could use, and we are going to let the computer automatically learn which of those might be effective," says Greenberg.

(To read an interviw with Greenberg, click here.)

Looking at a very large number of factors simultaneously can help their system pick up new market trends, since it increases the chance that at least some of those factors will reflect the new trend, Greenberg says.

At the time of writing, the firm covered 52 countries. The number of countries that its equity and ETF investments represent fluctuates substantially. Rebellion also creates economic reports similar to those found in fundamental analysis, looking at events with a three- to six-month horizon. Although its clients go both long and short, Rebellion does not short markets.

Looking to the future of AI, Greenberg adds his voice to the big data choir. "In this era of larger and larger data sets [with] billions of data points … there has been more emphasis on speed and building algorithms that can operate efficiently," he says.

Max Little

Max Little

Wascally wabbit

One of the research projects Greenberg points to comes from Yahoo! and is called Vowpal Rabbit. Unlike a typical batch machine learning algorithm, which looks at an entire data set before extracting rules and patterns, it looks at only one sample of the data set at a time. The name originates from the way that Bugs Bunny's arch-enemy Elmer Fudd would pronounce Vorpal Rabbit. Vorpal, from Lewis Carroll's poem Jabberwocky, was used to describe a sword that kills quickly.

In keeping with its name, Greenberg says that it is an "extraordinarily fast" algorithm that requires less computing power and resources.

One of the major stumbling blocks is the amount of computation needed to check if AI-based models are producing principled results. Training and testing is essential to ensure that models are extracting relevant patterns from the market and not just surfing on noise, says Max Little, lecturer at Aston University and Wellcome Trust/MIT Fellow.

The more variables included in an algorithmic model, the better its predictive performance tends to be, he says. That is, until you include data that hasn't been used to build the model in the first place.

He points to recent developments in non-parametric Bayesian techniques as the kind of statistical machine learning that can be applied to remove a big portion of the computation required to stress test models.

Model makers who use these techniques will notice the difference, Little says. "They will start to see big performance benefits in terms of what they can do with their data and how quickly they can get usable answers."

Although Little is currently using his expertise in medical applications, such as testing for Parkinson's disease through a phone, he has developed MATLAB packages and presents his research, titled "A functional minimisation approach to level shift detection". This research focus is a response to the huge amounts of computational resources needed to solve a problem that becomes more complicated as variables are increased in specific ways, which in computer science literature is known as a non-polynomial time hard problem.

As a simplification, Little explains that his approach is like trying to find the best arrangement of rectangular bricks of random sizes into a square box of fixed size, wasting the least amount of space possible. This could mean trying all combinations and picking the best one - a worst case scenario (or non-polynomial time hard problem) potentially requiring computations until the universe comes to an end.

Little solves this by using the non-parametric Bayesian technique known as L1 regularisation methods to approximate the selection of the best blocks to fit in the box, so to speak. This research area has been gaining momentum in academia for some 10 years, he adds.

"It approximates in a very tight way … [giving] a good answer of which variables to include," he says. "This has taken the AI world by storm because it seems to answer the question of how do we get the best model with the best prediction accuracy subject to including the smallest number of variables in a way that is computationally tractable." Compared to other techniques out there, L1 regularisation methods provide actionable signals in 1/100th of the time, Little says, adding that this could be used for portfolio optimisation on a range of assets but on a scale of milliseconds, in other words, in real-time.

Shai Heffetz

Shai Heffetz

On again, off again

The potential for how AI could be used is still in contrast with how it is being used, however. Haim Bodek, founder of consultancy firm Decimus Capital Markets and a speaker at conferences on the subject, points out that for now, the most intelligent action that can be done on a large scale will be embodied in a few basic principles.

He says successful models tend to be used in credit card fraud detection, or are relevant for social media content analysis, or oriented around statistical arbitrage strategies. In other words, they are more of a tool as opposed to the basis of the business. Moreover, because there are so many traders with access to the same data running similar models, it doesn't take long for advantages to get eliminated.

"You have algo versus algo now. There is a common practice in this industry that if somebody's machine is not making money they just shut it off," Bodek says.

Basically, for all the cutting edge technology, the value of the 'on/off' button becomes singularly important once losses hit - losses that can add up very quickly in an automated, high speed environment.

Shai Heffetz, managing director of spreadbetting and CFD platform InterTrader, also notes how crowded the market is, and adds that there are too many variables to take into account in order to build a really robust AI model.

"The greatest risk of AI [is that] the system will teach itself to evolve its decision-making and at some point you will no longer understand why it is making the decision," he says.

Like many traders using automated strategies Heffetz uses heuristics, or rules of thumb, to find patterns that work. He uses stochastics as a secondary indicator and a neural network recursive system to scale up successful strategies. The system automatically runs tests in order to find correlations, adjusting pre-defined settings, and inputs or weights of inputs, in order to get better performance.

As an example, he describes a trade that netted him £1.80 on the pound based on a wide variance between the VIX and S&P. The VIX was so close to rock bottom and the S&P was so high that he reckoned the ratio would break down. But AI was essential to scale the strategy because of how fast markets move, he explains.

"By the time you start thinking about it and analysing it, that move is gone," he says.

Being human

Karsten Schroeder, chairman of Amplitude Capital in Switzerland, says that people label all kinds of techniques under the AI banner. Firms need to optimise their trading models all the time and that can involve a learning algorithm that constantly adapts to historical data as it moves forward. This kind of optimisation routine is simply an integral part of a system, Schroeder says.

"In particular on short-term trading, you need to have that adaptation because a change in price microstructure is more significant than it actually is for longer-term trading," he says.

AI Fidessa

AI Fidessa

At the same time, he added: "You have to be careful with any kind of optimisation that you find a right balance between having a close fit to the data and also having a robust solution that does not work only at a particular time period, what one would generally consider curve-fitting."

A wary approach to AI is somewhat typical in an industry well versed in machine learning's drawbacks, a reality likely to continue for the foreseeable future, says Fidessa's head of algorithmic research, Bruce Bland.

Bruce Bland

Bruce Bland

"A wary approach to AI is somewhat typical in an industry well versed in machine learning's drawbacks, a reality likely to continue for the foreseeable future,"

Bland runs a research team looking at how algos trade and uses AI as a tool to find patterns, creating cluster analysis software, for example.

Another way the vendor is using AI is in its position monitoring and management algos.

"What we have done is used fuzzy logic, an area of AI where in effect … you take what a human does and incorporate it into a set of decision tools," he says.

The resulting mathematical models can be used in identifying market abuse, but those same fuzzy logic systems can be incorporated into automated trading. It is one of the areas that Bland thinks will make a difference to market making, for example in the monitoring and hedging of positions.

The human brain tends to create order when sorting information, whereas computers, when confronted by large and varied data sets, typically can't.

The technology Bland refers to that has had success on this front is based on IDA (Intelligent Distribution Agent), a project originally funded by the US Navy and an implementation of the Global Workspace Theory. This theory suggests that the brain is only conscious of a very small amount of information at any one time, and that only the most relevant messages are pushed into this workspace, Bland explains. This is the model of the brain Fidessa bases developments on, he adds.

Using this as a design pattern, the process of analysing data is thereby de-centralised and independent, while the results from the many different data analyses are passed up to the global workspace, and then sent to all algorithms running on the same instrument at that time. The addition of planning analytics is possible by looking at the current state and comparing it with the expected states.

The design fundamentally changes the way position-keeping algorithms such as market making can be developed. The system also allowed for the intervention of traders via an alerts monitor where they could override the decisions it would take, or trade along with the system, Bland says.

Wherever scientific breakthroughs may lead, some traders stand by the simplest mathematics. Heffetz of InterTrader says that one of the more successful money managers he knows has been developing systems for three decades and uses price action - counting ticks of movements versus time lapse.

But it is hard to discount what might be around the corner.

"There are no free lunches in the market," says Max Little. "You have to constantly keep checking your models. But there are techniques out there that are pretty spectacularly good and haven't been used yet as far as I can see. And once someone gets hold of them and makes a killer application, somebody is going to make a lot of money out of it."