intro ai072018 machine learning & ai for trading and …...figure 2: deepdream visualisation of...

14
Machine Learning & AI for Trading and Execution JULY 2018 WHITEPAPER INTRO AI072018

Upload: others

Post on 20-Mar-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: INTRO AI072018 Machine Learning & AI for Trading and …...Figure 2: DeepDream visualisation of how a Neural Network operates A PATH TO MACHINE LEARNING Andrew Ng, ex-Google - ex-Baidu

Machine Learning &AI for Trading and

Execution

JULY 2018 WHITEPAPER

INT

RO

AI0

72018

Page 2: INTRO AI072018 Machine Learning & AI for Trading and …...Figure 2: DeepDream visualisation of how a Neural Network operates A PATH TO MACHINE LEARNING Andrew Ng, ex-Google - ex-Baidu

The adaptive trading technology difference

So how do we make a difference? First and foremost we deliver adaptive trading technologies, built specifically to support the demands of e-trading markets, by combining AI-enabled decision-making tools and dynamic markets access, with a non-disruptive approach to deployment.

This ensures our clients achieve maximum return on investment on their existing systems and applications. At the same time, we give traders and developers at the heart of the business the tools to further develop the technology, win new business and retain customers.

Our modular suite of solutions is aimed at the growing population of e-traders who want to combine markets with technology in order to yield impressive results.

Visit our website: www.quodfinancial.com

Contact us:

[email protected]

London: +44 20 7997 7020Paris: +33 974 59 4445New York: +1 929 292 8090Dubai: +971 8000 320 113Hong Kong: +852 300 83 775

Table of Contents:

Pg 3. Why AI and Why nowPg 4. What is Machine LearningPg 5. A path to Machine LearningPg 6. - SuitabilityPg 7. - MethodsPg 8. - TrainingPg 9. - BuildingPg 9. Trends in Trading and ExecutionPg 10. Use cases for AI/ML in an EMSPg 13. Coexistence of Humans and MachinePg 13. Conclusion

Page 3: INTRO AI072018 Machine Learning & AI for Trading and …...Figure 2: DeepDream visualisation of how a Neural Network operates A PATH TO MACHINE LEARNING Andrew Ng, ex-Google - ex-Baidu

3

WHY AI AND WHY NOW?

Interest in Artificial Intelligence (AI) is exploding and all businesses consider it a prime future-reshaping initiative.

To understand AI we can first look at the context of Information Technology (IT) history and evolution. IT progress is written on a 10-year generational shift, driven by the Cambrian explosion of computational power. We are just coming to the end of The Mobile age (universal computing device), which superseded The Internet age (democratic connectivity) which followed The PC age (decentralised computing). Some of the current of AI-touted technologies have been in use for very long time, such as Expert systems (1970’s) or Recommendation engines (2000’s).

▪ In Explicit programming: For each language, the vocabulary and basic grammar (i.e. rules of languages) are coded and/or manually created by human agents. These methods incorporate often some statistical data collection/analysis (e.g. correlation analysis) to improve the results. As the programmes makes mistakes i.e your usual bizarre translated sentence, manual modifications to the code are made to improve the software. Besides the large cost and time required to develop an even basic programme, there are still limits to the approach; e.g. most languages have far more nuances and exceptions to the rule. For instance, “Isn’t the cat pretty?” which is a positive statement usually interpreted as a negative. These methods have been around for a long time, and all have had very poor results.

▪ In Implicit programming: No hard rules are given, but rather the program is ‘trained’ to learn how to recognise a pattern or take an action. In this case, full libraries of translated texts are ‘fed’ to the program, which ‘self-learn’ how to translate. As mistakes occur, corrections are taken by the re-training program.

It is easy to understand the superiority of the latter approach; our understanding of reality is far more implicit than declarative and explicit.

It is best to consider the new age of AI as the change of paradigm from ‘Explicit programming’, to ‘Implicit programming’. This can be further explained by looking at Translation software.

Page 4: INTRO AI072018 Machine Learning & AI for Trading and …...Figure 2: DeepDream visualisation of how a Neural Network operates A PATH TO MACHINE LEARNING Andrew Ng, ex-Google - ex-Baidu

Artificial Intelligence

Machine Learning

Deep Learning

4

In this paper, we limit ourselves to the understanding of latest advance in machine learning, which we consider coming under the umbrella of implicit programming. We will look at a few ideas on how to apply AI to the core execution/trading but also ways to improve the organisation involved in trading. All these are the low-hanging fruit of the current technologies, but this shift is so big that imagining the future is hard. As technology changes the landscape, new ‘species’ emerge which in turn change the ecosystem.

Machine Learning (ML) is a set of algorithms that extract information from raw data and represent some of it in some type of model. This information technology evolution comes on the back of explosion of data in a world gone digital.

One of the most promising ML techniques is based on a type of algorithm called Neural Networks (NN), which have been around since the 1960’s. The idea behind Neural Networks is to mimic a brain neuronal system, with each neural unit being called a Node, and Node being connected to other Nodes via Connections, and the Connections organised via Layers. Each Node is a simple self-contained agent which uses a mathematical algorithm, with a backpropagation mechanism with iteratively updates the weights between Nodes, so that an input leads to the right output. Machine learning is considered “deep” when they possess multiple hidden layers that contain many Nodes, with a blooming multitude of connections.

One of the main features of NN is that you can train a system to do a task - e.g. recognising a cat in a picture - without describing what a cat is (in a procedural way). NN memorise classes of things and more-or-less reliably knows when is encounters them again.

Technology does not solve problems that don’t exist. AI is the best solution to the exponential growth of data - it is safe to say that it is the only economically viable way to analyse and utilise the mountains of data we create. AI is in its infancy and many years of innovations are ahead of us. But it will have deep and lasting impacts on the way we work and businesses operate.

What used to be a purely academic domain with little real-world application has, in the past 4 years, successfully been implemented in the real world. This is driven by four main factors:

▪ Exponentially lower cost of processing, ▪ Increasing the number of Nodes,▪ More complex way of connecting Layers,▪ And finally, automatic feature extraction.

Interestingly enough, it is not well understood why NN perform so well, but it is becoming clear that they are superior to other methods. Some projects have started to try to understand the inner workings of such techniques, such as Google DeepDream. DeepDream aims to understand how to get a sense of what NN “see” at the different layers.

WHAT IS MACHINE LEARNING?

Page 5: INTRO AI072018 Machine Learning & AI for Trading and …...Figure 2: DeepDream visualisation of how a Neural Network operates A PATH TO MACHINE LEARNING Andrew Ng, ex-Google - ex-Baidu

5

In the above DeepDream visualisation, the NN first detects edges, then textures, patterns, parts, and objects. This is often referred to as a “hierarchy of concepts” in which the problem is decomposed into a series of definable sub-concepts and can then direct its outcome based on the associated probability of each constituent calculation. An eyelash, an eye, a mouth, an ear gives an indication there is a larger grouping of a face.

The ‘neuroscience’ of Machine Learning will improve our knowledge of the performance of the underlying algorithms, which in turn will allow continuous progress in the algorithms.

Mainstream NN training requires a large set of input and output data. For instance, training for translation of full libraries and they need to be supervised to achieve a basic level of a translation programme.

Figure 2: DeepDream visualisation of how a Neural Network operates

A PATH TO MACHINE LEARNING

Andrew Ng, ex-Google - ex-Baidu Stanford professor and one of the luminaries of AI, has stated that ‘If a typical person can do a mental task with less than one second of thought, we can probably automate it using AI”.

Yet there are limits to what AI and ML can do; ML is not a panacea. Some of the limitations are:

▪ Machine learning is good at repeatable patterns but fails when something is new: ML is about pattern recognition, which means that they memorise huge amounts of patterns and they handle well when they encounter them again. Yet real life often has new creations and combinations that ML hasn’t been trained for, which will lead to large errors. Where ML scales very well is in the amount of data to be processed, it fails miserably when facing new problems/patterns. Humans cognition, on the contrary, is in general very good at coping with such varied new events - a new sentence, someone jumping in front of your car, or even a trade that has gone bad, but is easily overwhelmed by the level of data complexity.

▪ Data set and training processes are onerous: Mainstream ML requires a huge amount of data. Acquiring and managing relevant and accurate data is expensive and hard. In addition, training and calibrating models, require know-how and is labour intensive. The barrier to entry is therefore access to the data and ability to train, to which continuous investment to maintain an AI system must be added.

Page 6: INTRO AI072018 Machine Learning & AI for Trading and …...Figure 2: DeepDream visualisation of how a Neural Network operates A PATH TO MACHINE LEARNING Andrew Ng, ex-Google - ex-Baidu

Most business operations will never be governed by a black-and-white feasibility AI/ML criterion. It is a little like automation in a car factory; robots will do a lot of hard and repetitive task better than humans, but fully robotised factories end up having very low productivity. Humans are far more versatile and a mix of human and robots provides the best results.

STEP 2 - ACQUIRE AND MANAGE THE DATA SET:

The data may be the most important part of any AI/ML initiative; you are as good as your data (and never better). A lot of current systems already collect a lot of data, which today are often discarded. Acquiring, managing, enriching and exploiting data is at the heart of an AI/ML project. ML relies on input and output data, and the outcome/reward in the input/output data set. So your data must have this type of relationship to be relevant. The more data the better, but it also must be representative of reality. Data is a little like sand on a beach; if you want to draw the seashore contour, you need only a minimum number of points - not every grain of sand -, and the collected grains must be sparsely distributed along the shore line to adequately represent it.

6

Step 1 -What function for AI/ML?

Repeatable patterns?

Available data?

Cost of AI is off-set by the automation of the function?

Step 2 -What is the data set?

Large or Small data set?

Can the set be acquired / enriched?

Can the data be managed?

Step 3 -What AI/ML method?

What type of Problem is AI addressing?

What is the best algorithm?

What training type?

Step 4 -How to build it?

Data/Hardware/People?

Retool the process?

Build safeguards?

Figure 3: A process for an ML project

STEP 1 - FIND AN AI/ML SUITABLE ACTIVITY:

In general an acid test of the suitability of AI/ML is; for each task to be automated consider the level of complexity and the number of times new unseen events can occur.

▪ Complexity: Complexity in this context refers to simple unit of operations, which interact in multiple ways and follow simple local rules. Difficult is then a set of oper-ations which require a lot of interpretation because of lack of information / data but also sometimes (prior) knowledge to predict events. Finding in 10,000 images one individual is complex, but to know what the person’s intent is difficult. At this stage, AI/ML is well suited to address Complexity and will not manage Difficulty.

▪ Unseen events: Unseen events, as explained above, is the ability to adapt to new events. AI/ML is the wrong technique for such circumstances.

Page 7: INTRO AI072018 Machine Learning & AI for Trading and …...Figure 2: DeepDream visualisation of how a Neural Network operates A PATH TO MACHINE LEARNING Andrew Ng, ex-Google - ex-Baidu

STEP 3 - CHOOSE THE AI/ML METHOD:

The AI/ML method breaks the problems into three distinct parts: the Type of the Problem and the Type of the Algorithm, and the Training.

Type of the problem: Machine Learning is concerned with what types of problems you are solving. The broad classes of problems are:

The first 4 types of Problem require a big data set to be effective. Reinforced Learning on the contrary does not initially need a lot of data, but you can generate the data during the training process. RL is well adapted when you deal with the problems for which you have to make decisions, but it is not clear what is a good outcome at the beginning (usually called Delayed Reward). For example, it might take several moves until you know in chess if a move was smart.

Understanding the type of problem that must be addressed, is the first step into any AI/ML project. The questions revolve around the amount of data, availability of the data, and generation of additional data in the course of the AI/ML training.

Types of Algorithm:

Once you know the type of Problem you are addressing, you need to take the best ML Algorithm. For instance, a Neural Network is just one of the types of algorithm / class of algorithms which can be used. NN are themselves sub-classified into many architectures, which include:

7

Regression: Predicting a continuous variable - e.g. when you want to predict the value of a house based on the number of rooms and distance from a train station.

Classification: Predicting a variable with finite (or discreet) possible values - e.g. when you want, in a photo, to guess if it is human, dog, cat, house, etc (called a class)

Clustering: Grouping data - e.g. you want to count the number of people in a photo.

Collaborative Filtering:

Filling gaps - e.g. in a recommendation for movies (or products), the ability to ‘fill the gaps’ so you can tell the users which movies to watch (Netflix or Amazon providing you a recommendation).

Reinforcement learning (RL):

Learning with environment and using the AI/ML as a base to learn, such as the AI/ML auto-playing Go (e.g. Google Deepmind AlphaGo).

Training:

Finally, the Training is the process of self-learning. Training is in fact an optimisation method (i.e. mathematical optimisation), and that is based on trying to finding optima (finding max/min in a nonlinear function). This can only be organised via an iterative training process.

Unsupervised: Draws inferences from unlabelled datasets including cluster analysis

Convolutional: These neural networks apply learnt memory of historical results to processing new data.

Recurrent: The output of each layer directly feeds into the input to make predictions on future data.

Self-Organised: Iterating network that self-organises into clusters classifying each cluster by different priorities

Page 8: INTRO AI072018 Machine Learning & AI for Trading and …...Figure 2: DeepDream visualisation of how a Neural Network operates A PATH TO MACHINE LEARNING Andrew Ng, ex-Google - ex-Baidu

There are 4 major Training methods:

DATA:The new oil

As previously explained, data is, at the moment, the most critical part of any project. Data is often both internal, i.e. captured by internal systems, as well as sourced from outside providers - such as market data providers. Conscient of the increasing value of data, data providers and aggregators are ramping up the price, which is making data prohibitively expensive. In addition, data management, which is the dual functions of ‘how much of data needs to be retained’ and ‘how to store the data’, is crucial in order to ensure that the project is economically viable. And finally, the data confidentiality (for B2B) and privacy (mostly for B2C, such as the European regulation with GDPR) are now issues to be tackled head-on. In a summary, data in an AI/ML projet covers Data Acquisition, Data Management and Data Ownership/Confidentiality.

8

Supervised: In this Training method inputs and results are labelled for the algorithm to have a known reference set of results. The algorithm is trained by a comparison of its calculated results to the pre-defined values. Using various methodologies such as regression or classification the Machine Learning Algorithm is able to predict new data based on its database of labelled data. This is effective where historical data has a direct correlation to future data.

Unsupervised: This Training method has no database of labelled results. The algorithm is tasked to find patterns and hidden structures within the data but there is no ‘evaluation’ of the results. This method is most common for anomaly detection, clustering, density estimation.

Semi-Supervised:

This is an enhancement to Supervised learning where both a labelled and an unlabelled data set is used. Labelled data is costly to produce and verify, so part-supervised learning uses a small labelled dataset, the learning from this set can then be applied to the unlabelled data. This is typical for classification, prediction and regression. In this case, it is assumed that some of the structure of the labelled set is shared with the unlabelled set allowing for continuity, cluster and manifold assumptions.

Reinforced learning:

This method is inspired by behavioural psychology, using cumulative reward methodology. It uses a Trial & Error concept, where the positive reward state can be achieved in the fastest possible time. For this method an environment with an agreed set of actions and a desired outcome is defined. The algorithm (agent) is allowed to manipulate the actions and the reward is then fed back to the agent. This is repeated until the agent has found the best configuration of actions to generate the reward.

As this domain is a very new field, the classifications are more fluid than hard categories and any project will be based on a lot of discovery type of methodology.

STEP 4 - BUILD AN AI/ML PLATFORM

Page 9: INTRO AI072018 Machine Learning & AI for Trading and …...Figure 2: DeepDream visualisation of how a Neural Network operates A PATH TO MACHINE LEARNING Andrew Ng, ex-Google - ex-Baidu

ALGOS: Algorithms are still immature and a long cycle of innovation is ahead of us. In addition, the IT schism between the commercial and open source is true in the AI/ML space. Also, as in all nascent technologies no industry standard has yet emerged. Therefore, any strategy should ensure that an algorithm does not ‘trap’ the overall platform into an ecosystem. The big algorithm providers, such as Google, MS Azure or AWS, are also bundling the cloud aspect with the data management, and computing power.

HARDWARE: Any AI project, from development, training and deployment depend on powerful hardware. For instance, Graphics Processor Units (GPU) are very good at manipulating matricees, and are therefore commonly used in the training process. There are big efforts to build specialised chips - e.g. for face recognition, or for self-driving. On the longer horizon, but with earth-changing possibilities, is the advent of the quantum computer, which are well suited for algorithms used in AI/ML such as optimisation algorithms. Any project must be holistic in nature when bundling the data management and AI/ML hardware selection. The cloud computing is a scalable model, but unchecked costs can very quickly explode. There is a necessity to granulary understand how much data and how much computer power is needed for a given AI/ML project.

PEOPLE: The staff needed for such a project include a diverse set of data scientists / AI specialists (rare species in high demand), but also trainers. Training an algorithm is often very labour intensive and far more than initially thought. The approach requires a retooling of classical software development methodology, where the users are at the end of the process. Here users must become trainers of the AI/ML platforms. For instance, we have all been unknowingly training AI with the CAPTCHA entries.

The retooling of the process post-AI/ML should take into account how human/machine productivity is best optimised - too much automation or no automation results in a similar low productive outcome. In addition, the introduction of such radical solutions should be staged and with safeguards in place to ensure huge mistakes don’t occur.

TRENDS IN TRADING AND EXECUTIONAUTOMATION, SOR, ALGORITHMS

Capital markets, and specifically execution, have been under two tectonic forces in the past 10 years:

▪ Technology change: The trend in trading/execution is the full embrace of e-trading in all asset classes, with fixed income as the laggard in the adoption rate. Money and contracts are now a piece of information stored in a database (and soon in some domains in a blockchain), which makes execution a prime candidate for AI/ML. An interesting phenomenon that has picked up momentum is the increased investments by buy-side institutions in their core trading and execution. This is the result of the realisation that they need to invest in technology to stay ahead of their peers as well as the desire to disenfranchise themselves from the sell-side, which is amplified by the introduction of new regulations.

▪ Regulatory change: The current regulatory body in Europe and the US is mostly the result of the response to the 2008 financial crisis. One of the major areas of regulation is to provide higher protection to investors. MiFID II, an European regulation, has spread its wings across geographies to a larger extent than anticipated. Two of the biggest objectives of MiFID II are to provide better transparency and ensure Best Execution across all the execution chain and asset classes.

9

Page 10: INTRO AI072018 Machine Learning & AI for Trading and …...Figure 2: DeepDream visualisation of how a Neural Network operates A PATH TO MACHINE LEARNING Andrew Ng, ex-Google - ex-Baidu

Execution is generating a lot of data, but few systematic approaches have been in place to bring execution to a new paradigm of data-driven computing.

Why the Execution Management System (EMS) is a good candidate for AI/ML? Execution relies on very complex set of procedures/rules and many connections. These procedures/rules rarely change, which fulfills our first criterion of repeatable patterns. Furthermore a lot of data exists and/or additional data can be acquired. Here we look at 4 potential applications of AI/ML in the EMS space:

▪ Optimisation of the Parameters in Algorithmic trading, ▪ Adaptive routing, ▪ Surveillance and compliance, ▪ Technical Operations.

OPTIMISATION OF THE PARAMETERS OF ALGORITHMIC TRADING

USE CASES FOR AI/ML IN AN EMS

In most advanced EMSes, the behaviour of benchmark and SOR algorithms is managed via a large number of parameters (instead of hard-coded). In Quod Financial EMS, there are over 100 parameters to manage a single trading algorithm. An example of a parameter is “Level of Aggressivity”. This is defined as the amount of liquidity that a trader wants to destroy during the execution. The aggressivity takes into account, for a given instrument (i.e. stock or currency rate), the available liquidity but also the overall immediacy to complete the execution: it is a common practice to be less aggressive at the start of the execution and increase aggressivity towards the end.

Execution technologies address three main strategic areas:

10

Seeking Liquidity

In a highly fragmented liquidity environment, the prime objective of electronic trading is to find liquidity across venues (exchanges, ECNs/MTFS, and Banks/market makers). This covers liquid but also increasingly illiquid products. Best of class Smart Order Routing is using an algorithmic approach to achieve an overall execution strategy, which is more than simply the ‘best’ price. The execution strategy will cover an array of complex objectives, including total cost of execution (which includes all fees), immediacy (how quickly do you want to execute / take liquidity), venues preferences (where you want / you can seek or post liquidity).

Reducing trading impact

The cost of trading is far more than the fees paid to the broker/banks or exchanges. The principal cost is in fact the market impact - i.e. the cost generated by other market participants moving liquidity / price against you because they have a prior knowledge of your execution. Reducing impact of trading is therefore an important function of the execution. This is now best achieved via an arsenal of benchmark execution algorithms - such as TWAP or VWAP.

Automation Execution is a low cost / high volume business. This can only be achieved with a high level of automation. Automation covers Straight-Through-Processing (STP), but increasingly it means using a variety of algorithms to take complex rule-driven decisions.

Page 11: INTRO AI072018 Machine Learning & AI for Trading and …...Figure 2: DeepDream visualisation of how a Neural Network operates A PATH TO MACHINE LEARNING Andrew Ng, ex-Google - ex-Baidu

Liquidity is a dynamic feature of the market. The liquidity captures different underlying forces including:

▪ The performance/behaviour of the single instrument, e.g. a company doing better or worse over time, or a bond being affected by the change of a company credit rating.

▪ The rules modifications at the venue(s) level, e.g. margin / risk levels are varied or Increase/decrease in the overall volume/participation.

This constant change in liquidity patterns creates the need to review, on a frequent basis, the performance of the algorithms and to tune the governing parameters. This is a labour-intensive quantitative analysis job, which is done by data scientists (also called ‘Quants’). In fact, it is our belief that a fair amount of algorithms parameters/performance are not reviewed and consequently infrequently tuned. The case for applying AI/ML to the optimization of the algorithmic trading parameters is very strong and additional arguments include:

▪ Trading algorithms provide a lot of data; including Best Execution and Transaction Cost Analysis which can be enriched by different market data and benchmarks. It has to be noted that the data set is not as big as required by mainstream ML, but RL is well suited.

▪ ML algorithms can be trained easily; the training can utilise the existing algorithmic trading testing / back testing environments (which are part of the regulatory requirements for algorithmic trading). These environments provide a good way to replicate the behaviour of multiple agents and the venues, and a replay mechanism.

In our own case, we have decided in our first trials to use a RL technique called Contextual Bandits. In Contextual Bandits, the following process is followed:

1. The algorithm observes a context: the features extracted from market data and order input properties,

2. It then makes a decision: what parameters are best (choosing one action from a number of alternative actions)

3. And finally observes an outcome of the decision

The outcome defines a reward. The objective of the training is therefore to minimise/maximise the average reward, which is for example in our case to minimise slippage (impact of the execution) of the algo order.

This technique works well with sparse data, and the outcomes are reached after a long series of actions - like a game of chess, where you will not know until you win, lose, or draw. To address a complex decision in algorithmic trading the Contextual Bandits algorithms are evolving rapidly. For instance the notion of average expected outcome (usually called Regret) allows to recalibrate the outcomes.

From this first project, a second AI/ML project is the Algorithmic Trading Selector. This aims to assist the (human or machine replicated) trader to select the best algo taking into account the execution objectives and context (e.g. liquidity).

11

Page 12: INTRO AI072018 Machine Learning & AI for Trading and …...Figure 2: DeepDream visualisation of how a Neural Network operates A PATH TO MACHINE LEARNING Andrew Ng, ex-Google - ex-Baidu

DOMAIN CANDIDACY BENEFITS HOW

Adaptive Routing: EMS provide a mechanism to define a static set rules to route orders to a venue or algo (on a broker).

The rules are usually not dynamic enough to adapt to the changing nature of liquidity and behaviour of venues.

Furthermore, regular reviews of the routing data is rarely conducted. This means that easy savings are forgone.

Same as Algorithmic trading.

Providing AI/ML-driven assistance for routing decisions (instead of static rules) to find best venues/brokers.

The most innovative AI/ML method can find best Broker benchmark algorithm for any given order/order type.

We have implement-ed Contextual Bandits reinforced learning for the single step decision making.

Market Surveillance:Surveillance is a broad term which covers a large set of domains, includ-ing: 1. Client behaviour, e.g. suspect trade, price dislocation, ...2. Counter-party / venue behaviour, e.g. latency of venues, FX Reject rate, Information leakage (including slip-page), spread, spread capture, …3. Market mouvements, e.g. overall liquidity measure, …

Understanding the overall behaviour within the market, is a domain, which is essential but requires real-time and post-mortem analysis.

Market participants behave in a very predictable way. New behaviour / patterns could are uncommon, and can be added whenever discovered.

Market surveillance based on auto-detec-tion by different AI algorithms, will allow a in-depth and grangu-lar monitoring of the status of the market/market participants.

Supervised learning approaches such as K-Nearest Neighbour (KNN) and Support Vector Machines (SVM) have been applied to both level 2 tick data as well as daily data to detect market abuse (e.g. to detect pump-and-dump and spoof trading). Addi-tionally Adaptive hidden Markov model based systems have been used to detect and classify several types of market abuse

Technical operations: The management and monitoring of all the environment (servers, network, software, etc) is automated via Sys-tem Management Systems (SMS).

The current best practices rely on proactive alerting and rules-based management. The shortcoming of this approach is that underlying issues are not addressed until an in-cident happens (triggering the alert / rules), or when it is too late to provide corrective actions.

Behaviour of the system is highly pre-dictable - with very recognizable pat-terns and very rare (if any) new emerging patterns.

There is a lot of available data, com-ing from the current system (Perfor-mance metrics, such as CPU or memory usage) which are complemented by comprehensive system/application Loggings.

Moving from proactive/reactive to forecast-ing management and auto-repair.

Multivariate Time Series - this approach provides observations of multiple different measures and an interest in forecasting one or more of them. At this time, we only fore-cast and have not decid-ed to link it to auto-repair.

ADAPTIVE ROUTING, MARKET SURVEILLANCE, TECHNICAL OPERATIONS

The below 4 additional domains that can immediately benefit from an AI/ML initiative are simple examples. But, in a more systematic basis, reviews should be performed on all core or supporting trading functions to find how to apply these technologies.

12

Page 13: INTRO AI072018 Machine Learning & AI for Trading and …...Figure 2: DeepDream visualisation of how a Neural Network operates A PATH TO MACHINE LEARNING Andrew Ng, ex-Google - ex-Baidu

In broader terms, one of the biggest challenges in any AI/ML system is to evaluate a positive outcome. For a self-learning system to optimise, it must be able to evaluate results as being improved or not. Adding further complexity to a trading landscape is the same actors may have different intentions based on factors not available to the machine or within the data. Does a trade need to be done quickly, are there other trades not visible to the system that must be considered. A bank may accept losing trades to improve the relationship with a client. A fund may make a worse trade because of the personal preferences of the underlying client.

The role of the trader is therefore changed from the operator / agent within the trading space to the designer and implementer of the trading strategy. This new role will cover:

COEXISTENCE OF HUMANS AND MACHINE

Simplify large data

Find patterns

Iterate huge

parameter sets

MACHINE

Exception management

Provide Context

Define Intent and

Evaluate

▪ Defining the intent and evaluating results of the AI/ML▪ Managing the exceptions that the new process/system will inevitably generate -

from the minor and daily cases, to the critical (sometimes fatal). Only humans have the flexibility to quickly react to the unknown and unexpected.

CONCLUSIONAI/ML is in its infancy, with all common shortcomings deriving from its immaturity. This includes the lack of standards and adequate ecosystem for some corporate development, relative high cost for any project and shortage of good talent. There is some misunderstanding about what are the functions and processes suited to AI/ML. We have established an acid test; (1) AI/ML addresses problems which are based on repeatable patterns (with rare new variations), and (2) there must be sufficient data to train the algorithm (at a reasonable cost of acquisition).

Execution is a very good candidate for such an initiative. The direct benefits are higher level of automation, but also performing tasks/processes that are out of reach such as reviewing on a frequent basis the execution performance and making data-driven decisions to improve the performance. Even if the technology is not mature, we believe that you need to allow an iterative mode based on Trial and Error approach to create the necessary know-how. In any profound change, there are losers and winners. But doing nothing is the greatest risk.

AI/ML requires a lot of rethinking of both how system / software is created, but also how operations/processes are organised. For instance, users must be brought into the training of the algorithms, and this requires a redesign/retooling of the software.

To take a parallel with the industrial revolution, the biggest consequence of the advent of the power loom was not to make hand-weavers’ jobs redundant, it changed radically the social landscape, creating an expositional amount of wealth. The unforeseen effects included the new belief that the future was going to be brighter than today, which in turn unleashed credit (deriving from the Latin, Trust), the engine of capitalism.

HUMANS

13

Page 14: INTRO AI072018 Machine Learning & AI for Trading and …...Figure 2: DeepDream visualisation of how a Neural Network operates A PATH TO MACHINE LEARNING Andrew Ng, ex-Google - ex-Baidu

AI is not only about automation (and job losses), but about achieving things that we can not do

economically or technically

Technology For Data-driven Automated Trading

EQUITIES | FX | DERIVATIVES

BUY-SIDE | SELL-SIDE

QUOD FINANCIAL (UK) LtdLONDON ▪ PARIS ▪ NEW YORK ▪ HONG KONG ▪ DUBAI+44 20 7997 7020 ▪ +33 974 59 4445 ▪ +1 92 92 92 8090 ▪ +852 300 83 775 ▪ +971 8000 320 113 - www.quodfinancial.com