Optimal trading? In what sense?

Similar documents
Towards an Automated Trading Ecosystem

High Frequency Trading Background and Current Regulatory Discussion

White Paper Electronic Trading- Algorithmic & High Frequency Trading. PENINSULA STRATEGY, Namir Hamid

Algorithmic trading Equilibrium, efficiency & stability

Goldman Sachs Electronic Trading India: Algorithmic Trading. FIXGlobal Face2Face Electronic Trading Forum - India

Setting the Scene. FIX the Enabler & Electronic Trading

Transaction Cost Analysis and Best Execution

Algorithmic Trading Session 1 Introduction. Oliver Steinki, CFA, FRM

Toxic Equity Trading Order Flow on Wall Street

G100 VIEWS HIGH FREQUENCY TRADING. Group of 100

Algorithmic trading - Overview. Views expressed herein are personal views of the author

ELECTRONIC TRADING GLOSSARY

Design of an FX trading system using Adaptive Reinforcement Learning

algorithmic & program trading services

Machine Learning and Algorithmic Trading

There is a shortening time cycle in the

News Trading and Speed

Transaction Cost Analysis to Optimize Trading Strategies

TRADING STRATEGIES Urs Rutschmann, COO Tbricks

High-frequency trading: towards capital market efficiency, or a step too far?

Algorithmic and advanced orders in SaxoTrader

Financial Markets and Institutions Abridged 10 th Edition

Trade Execution Analysis Generated by Markit

Fast Trading and Prop Trading

Algorithmic Trading. Global Execution Services. Making the world liquid EQUITY MARKETS

PRE- AND POST- MARKET TRADING FOR US STOCKS: Are You Missing Out on Liquidity?

Execution Costs. Post-trade reporting. December 17, 2008 Robert Almgren / Encyclopedia of Quantitative Finance Execution Costs 1

FE670 Algorithmic Trading Strategies. Stevens Institute of Technology

Market Microstructure: An Interactive Exercise

The Need for Speed: It s Important, Even for VWAP Strategies

Algorithmic Presentation to European Central Bank. Jean-Marc Orlando, EFX Global Head BNP PARIBAS

From Traditional Floor Trading to Electronic High Frequency Trading (HFT) Market Implications and Regulatory Aspects Prof. Dr. Hans Peter Burghof

Bernard S. Donefer Distinguished Lecturer Baruch College, CUNY

High frequency trading

ORDER EXECUTION POLICY

High Frequency Trading Volumes Continue to Increase Throughout the World

Trading Costs and Taxes!

NYSE Enhanced Buy-Write Index (NYBW)

Forecasting Trade Direction and Size of Future Contracts Using Deep Belief Network

From Particles To Electronic Trading. Simon Bevan

High-frequency trading, flash crashes & regulation Prof. Philip Treleaven

Algorithms for VWAP and Limit Order Trading

DELTA Dashboards Visualise, Analyse and Monitor kdb+ Datasets with Delta Dashboards

Algorithmic Trading: A Buy-side Perspective

FI report. Investigation into high frequency and algorithmic trading

Financial Market Microstructure Theory

Execution Costs of Exchange Traded Funds (ETFs)

Understanding ETF Liquidity

FE570 Financial Markets and Trading. Stevens Institute of Technology

ALGORITHMIC TRADING USING MACHINE LEARNING TECH-

Cluster Analysis for Evaluating Trading Strategies 1

Stock market simulation with ambient variables and multiple agents

NDD execution: NDD can help remove the conflict of interest >>> providing a confl ict free environment for Retail FX traders CLIENT.

2DAY EXECUTIVE WORKSHOP ON ALGORITHMIC TRADING

Valdi for Equity Trading High performance trading solutions for global markets

News Trading and Speed

Stock Trading Systems: A Comparison of US and China. April 30, 2016 Session 5 Joel Hasbrouck

The Future of Algorithmic Trading

EUROPEAN SECURITIES AND MARKETS AUTHORITY (ESMA) CONSULTATION PAPER

Trader's Guide to Building An Effective Trading Strategy

Day Trade Warrior. Business Plan Trading as a Business

No duplication of transmission of the material included within except with express written permission from the author.

Algorithmic Trading, High-Frequency Trading and Colocation: What does it mean to Emerging Market?

Measuring and Interpreting the Performance of Broker Algorithms

High Frequency Trading + Stochastic Latency and Regulation 2.0. Andrei Kirilenko MIT Sloan

ECLIPSE DAY TRADING SYSTEM USER GUIDE

The matching engine for US Treasury Futures Spreads (CME).

VDAX -NEW. Deutsche Börse AG Frankfurt am Main, April 2005

Financial Markets. Itay Goldstein. Wharton School, University of Pennsylvania

How Securities Are Traded. Chapter 3

Understanding Trading Performance in an Order Book Market Structure TraderEx LLC, July 2011

FxPro Education. Automated trading

Optimal order placement in a limit order book. Adrien de Larrard and Xin Guo. Laboratoire de Probabilités, Univ Paris VI & UC Berkeley

MOON-ES DAY TRADING SYSTEM USER GUIDE

Frontiers in Best Execution : Perspectives for Investment Managers

Predictive modelling around the world

CBOE would like to thank Sandy Rattray and Devesh Shah of Goldman, Sachs & Co. for their significant contributions to the development of the New VIX

This paper sets out the challenges faced to maintain efficient markets, and the actions that the WFE and its member exchanges support.

Algorithmic Trading: A Quantitative Approach to Developing an Automated Trading System

FX Trading: The Next Generation FX Trading and Technology Trends in 2010

Liquidity Cycles and Make/Take Fees in Electronic Markets

High Level Overview of Certain Key Regulatory Changes in Risk Management Trading in Europe *

Algorithmic Trading Present and Future in Korea

Grace Master Disclosure Document- Risk, Margin, Day Trading, Futures, Extended Day, SIPC

The (implicit) cost of equity trading at the Oslo Stock Exchange. What does the data tell us?

Moral Hazard. Itay Goldstein. Wharton School, University of Pennsylvania

Pattern Recognition and Prediction in Equity Market

Dark trading and price discovery

ECON4510 Finance Theory Lecture 7

Transcription:

Optimal trading? In what sense? Market Microstructure in Practice 3/3 Charles-Albert Lehalle Senior Research Advisor, Capital Fund Management, Paris April 2015, Printed the April 13, 2015 CA Lehalle 1 / 23

Outline 1 Optimal Trading and the Principal-Agent Problem 2 Monitoring Trading Algorithms: A Machine Learning Viewpoint CA Lehalle 2 / 23

Goals of This Session This session is smaller than the others. We will have talks during the week on optimal trading scheme. We will just focus on few aspects: The Principal-Agent problem for optimal trading; and potential robust architecture for optimal trading; Something unusual: realtime monitoring of trading algorithms. CA Lehalle 2 / 23

Outline 1 Optimal Trading and the Principal-Agent Problem 2 Monitoring Trading Algorithms: A Machine Learning Viewpoint CA Lehalle 3 / 23

Optimal Trading and the Principal-Agent Problem The Principal-Agent problem is raised when someone (the Agent) acts on behalf of someone else (the Principal); How to guarantee the alignment of interest of the Agent and the Principal? Very often the Principal gives accurate instructions and constraints to his Agent, typically in terms of risk taking. For trading we have seen the benchmarks (VWAP, TWAP, IS, etc) are used by the user of the algorithm to specify a style of trading. It is typically a kind of risk the Agent can or cannot take on behalf of the Principal. Market makers or prop. shops (the purpose of the whole firm is to make money by trading and nothing else) usually do not have to face to the P-A problem. One global optimization is better than two optimizations: one by the Buy Side, and the other by the Sell Side. CA Lehalle 3 / 23

The Usual Layers Going back to different participants and the roles inside each of them: The portfolio manager build a portfolio. Did he took into account: (1) the intraday market impact, (2) the daily impact? [Garleanu and Pedersen, 2013] He send the instructions to his dealing desk, which often acts as a supplier to the portfolio manager. The Dealing desk take the responsibility to send fractions of these instruction to different trading venues and brokers, with associated Benchmarks. The broker trades on behalf of the dealing desk, executing the portfolio manager instructions. How to measure the performance of each step? How to insure information goes backward too: from the broker to the dealing desk, from the dealing desk to the portfolio manager? This should implement a continuous improvement scheme. One important task is performed by the dealing desk and the broker: the TCA (Transaction Costs Analysis). CA Lehalle 4 / 23

A Principal-Agent problem inside trading algorithms? A Real VWAP Exec In a lot of optimal trading schemes, the control is not the interaction with the orderbook (i.e. send a market order or a limit order), but something smoother, like the participation rate or a trading intensity. Even if the control is the price to post orders (like in [Bayraktar and Ludkovski, 2012] or [Guéant et al., 2012]), in practice some risk controls have to be added (see [Labadie and Lehalle, 2014] for some details). Moreover when the trading algorithm is monitored and piloted by a trader, the algorithm is constrained to use parameters easy to understand by a human operator. CA Lehalle 5 / 23

A Two Layers Architecture In [Bouchard et al., 2011], we proposed to model a trading algorithm in two layers: one, implementing a stochastic control scheme, takes care of the scheduling part of the trading logic; for this strategic layer, the control is to launch trading robots, having random properties (market impact, average price, etc) with known laws; these trading robots can adjust their behaviour taking into account the fast fluctuations of liquidity. In terms of latency, it allows the strategic layer to be up to 5 minutes away to the trading venues; the tactics (i.e. the robots), can be co-located. They report their advances to the strategic layer who adjust his decisions. CA Lehalle 6 / 23

Outline 1 Optimal Trading and the Principal-Agent Problem 2 Monitoring Trading Algorithms: A Machine Learning Viewpoint CA Lehalle 7 / 23

Monitor? what for? Each trader monitors 150 to 700 trading algorithms. algorithms reacts to realtime feeds, estimates, market state. Algo have meta parameters that can be tuned by traders. An algo (should not but) can have unexpected behaviours (bad logic, bad programming, unexpected inputs). CA Lehalle 7 / 23

Unexpected behaviours The 1st of Aug 2012, it is assumed an issue in the deployment of a new version of Knight s software suite conducted them to bankruptcy. Knight Capital was one of the four market makers on the Nyse. They have been bought by Getco few months later. It took them 45 min to understand what append and shut their systems down. Source: Bloomberg news CA Lehalle 8 / 23

Unexpected behaviours The 1st of Aug 2012, it is assumed an issue in the deployment of a new version of Knight s software suite conducted them to bankruptcy. Knight Capital was one of the four market makers on the Nyse. They have been bought by Getco few months later. It took them 45 min to understand what append and shut their systems down. Source: Bloomberg news Same kind of issue one year later for Goldman Sachs on options market. CA Lehalle 8 / 23

The flash crash The 6th of May 2010, prices dropped on wall street by 10% in 10 minutes Most probably: the trading algorithms (and specially the market making ones) run for liquidity as a reaction to the large sell of E-mini contracts by an institutional investor. Circuit breakers did not react as expected. Prices CA Lehalle 9 / 23

The flash crash The 6th of May 2010, prices dropped on wall street by 10% in 10 minutes Most probably: the trading algorithms (and specially the market making ones) run for liquidity as a reaction to the large sell of E-mini contracts by an institutional investor. Circuit breakers did not react as expected. Trading speed CA Lehalle 9 / 23

What kind of interactions with the trader? A typical (Bloomberg) screen Trading algorithms are parametrized via: A benchmark, specifying the risk profile allowed (VWAP to follow the usual liquidity profile, PoV to follow the current liquidity profile in realtime, TWAP to be agnostic and conservative, Implementation Shortfall to be fast and price reactive, or Liquidity Seeking to be liquidity reactive), or a combination with switch / cases. A set of hard constraints (avoid a given type of trading pools, no more late than..., or no more ahead than...). Some meta parameters like: aggressiveness, speed, pegging on other instruments. The trader can modify them or call the initiator of the metaorder to give him advices (it is part of the execution service provided by intermediaries). CA Lehalle 10 / 23

How to monitor all this in real-time? In [Azencott et al., 2014] we define some efficiency criteria Y t (like performance) and some potential explanatory variables Xt 1,..., X t N (like a sector, an increase of volatility, a change in liquidity). On the fly (for instance every five minutes), we will build predictors φ(x) = E(Y X) of the current performance of all the trading algorithms of a trader using the sector, the volatility level, the liquidity, etc. The variables succeeding to explain bad performances will be said to be the causes of bad performance. That for, we will define the predicting power π(t) of each variable X i. CA Lehalle 11 / 23

Performances and explanatory variables We use the PnL (in bid ask spread) as a performance criterion; We use market descriptors: volatility (risk), bid-ask spread (liquidity), and momentum (directionality); We renormalize them using their scores (i.e. their empirical likelihood); We add patterns: price trends, price jumps and volume peaks. CA Lehalle 12 / 23

Scoring Scoring increases the contrast of the figure. CA Lehalle 13 / 23

Scoring Scoring increases the contrast of the figure. It is performed using the past values of the variable and using its empirical distribution function (roughly: replace x by its quantile). CA Lehalle 13 / 23

Scoring Scoring increases the contrast of the figure. It is performed using the past values of the variable and using its empirical distribution function (roughly: replace x by its quantile). CA Lehalle 13 / 23

Binary prediction To be fast and take into account the number of possible predictors given the number of data, at each t, we select the 5% worst performances (i.e. Y is now zero or one) and try to explain them using two-sided binary predictors: φ(x) = { 0 if x [θ, θ + ] 1 otherwise we choose the thresholds (θ (i), θ + (i)) to obtain the best possible predictor for each X i. CA Lehalle 14 / 23

We have some guarantee Generic Optimal Randomized Predictors Fix a random vector X R N of explanatory factors and a target binary variable Y. Let 0 v(x) 1 be any Borel function of x R N such that v(x) = Pr(Y = 1 X) almost surely. For any Borel decision function φ Φ, define the predictive power of the randomized predictor Ŷφ by π(φ) = Q(µ, P 1 (φ), P 0 (φ)), where Q is a fixed continuous and increasing function of the probabilities of correct decisions P 1, P 0. Then there exists ψ Φ such that the predictor Ŷφ has maximum predictive power π(ψ) = max φ Φ π(φ) Any such optimal Borel function 0 ψ(x) 1 must almost surely verify, for some suitably selected constant 0 c 1. (1) ψ(x) = 1 for v(x) > c ; ψ(x) = 0 for v(x) < c. Meaning that our two-sided predictors are not bad at all when it comes to do something simple. Moreover we have confidence intervals too (see in the paper). CA Lehalle 15 / 23

Influence of a variable via a predictor Influence of explanatory variables We define the influence of X a subset of explanatory variables as the predictive power of the best predictor: I t (X, Y ) = π(ψ) = max φ Φ π(φ). Remind we do not use the past of the variables X (except to build their score and for the pattern matching detectors). We just rely here on the joint distribution of (Y, X) over all the instrument currently traded. It means we will use the states of all algorithms to try to establish a relation, now, between bad performances and variables of interest. CA Lehalle 16 / 23

Simultaneous prediction as a clustering mechanism At the end of this process: at each update, we build optimal predictors and combinations of predictors explaining at most current bad performances. Implicitly we selected hyperplanes in the space of combinations of our explanatory variables separating trading algos with good perf. vs. bad ones. Some subsets of predictors are good (i.e. they allow hyperplanes to be efficiently positioned), others are not. This allows us to identify variables currently influencing the performances. They are said to be the causes of bad performances. We present to the trader the summarized information: sort by this variable if you want to understand what is happening to your algos. CA Lehalle 17 / 23

Monitoring results Seen from one trading algo top: the explanatory variable. bottom: the performance. The performance quantile is in dotted red; around update 40 this algo is 3 times among the 5% worst performers; on update 41, the spread score is selected by the good predictors to be used: θ = 0, θ + 70%. CA Lehalle 18 / 23

Monitoring results Seen from one trading algo top: the explanatory variable. bottom: the performance. The performance quantile is in dotted red; around update 40 this algo is 3 times among the 5% worst performers; around update 32, the volume score is selected to predict bad perf. of other algos. CA Lehalle 18 / 23

Monitoring results Seen from one trading algo top: the explanatory variable. bottom: the performance. The performance quantile is in dotted red; around update 40 this algo is 3 times among the 5% worst performers; the volatility score is selected at update 42, but the associated predictors says it is ok for this algo. CA Lehalle 18 / 23

Outline 1 Optimal Trading and the Principal-Agent Problem 2 Monitoring Trading Algorithms: A Machine Learning Viewpoint CA Lehalle 19 / 23

Conclusion (1) During this talk we have explore two aspects of optimal trading: The Principal-Agent problem, or how to conciliate the interests of the end user of the algo (i.e. the issuer of the metaorder) and the actions of the trading algorithm (the kind of risk it will take or not). And we have seen this kind of problem arise inside the life cycle of the trading algorithm itself. I opened the topic of algo trading to machine learning and big data, even further than what we did with Laruelle and Pagès in our two joint papers ([Laruelle and Pagès, 2012] and [Pagès et al., 2011] ; see also [Kearns and Nevmyvaka, 2013]). I hope I convinced you TCA is a wonderful field of applications for ML. CA Lehalle 19 / 23

Overall Conclusion We went together trough the following questions: Part 1. The last few years, we have seen the emergence of continuous trading on equity markets, it had (unexpected) consequences as a deep modification of the role of market makers. Will any market evolve to the same state, or will some markets stay in a different, less liquid one, forever? Part 1. The concept of intermediation is at the core of the functioning of the financial system, could we use our tools to shed light on the system itself? Part 2. The big question in modelling is how mechanical and informational effects mix to move the price? To my eyes, too many models today embed the answer to this question ex ante, hence they cannot provide an answer. Part 2. As usual in control: the specification of the utility function and the accuracy of the parameters of the models are of importance. Do we have enough specifications? Do we know what to do when the signal over noise ratio is bad? My answer to this second question is to switch from stochastic control to machine learning. Part 3. We questioned the role of the specification of the utility function: what would a multi-scale architecture for an optimal trading system? Part 3. Practitioners use machine learning in optimal trading and microstructure more than it appears, where are the theoretical papers? In terms of future directions of research, the only point I could add is to note that if you put some of these questions together, you often obtain a mean field game, or at least a differential game... CA Lehalle 20 / 23

And more... CA Lehalle 21 / 23

References I Azencott, R., Beri, A., Gadhyan, Y., Joseph, N., Lehalle, C.-A., and Rowley, M. (2014). Realtime market microstructure analysis: online Transaction Cost Analysis. Quantitative Finance, pages 0 19. Bayraktar, E. and Ludkovski, M. (2012). Liquidation in Limit Order Books with Controlled Intensity. Mathematical Finance. Bouchard, B., Dang, N.-M., and Lehalle, C.-A. (2011). Optimal control of trading algorithms: a general impulse control approach. SIAM J. Financial Mathematics, 2(1):404 438. Garleanu, N. B. and Pedersen, L. H. (2013). Dynamic Trading with Predictable Returns and Transaction Costs. Journal of Finance, 68(6):2309 2340. Guéant, O., Lehalle, C.-A., and Fernandez-Tapia, J. (2012). Optimal Portfolio Liquidation with Limit Orders. SIAM Journal on Financial Mathematics, 13(1):740 764. Kearns, M. and Nevmyvaka, Y. (2013). Machine Learning for Market Microstructure and High Frequency Trading. Risk Books. Labadie, M. and Lehalle, C.-A. (2014). Optimal starting times, stopping times and risk measures for algorithmic trading. The Journal of Investment Strategies, 3(2). CA Lehalle 22 / 23

References II Laruelle, S. and Pagès, G. (2012). Stochastic approximation with averaging innovation applied to Finance. Monte Carlo Methods and Applications, 18(1):1 51. Pagès, G., Laruelle, S., and Lehalle, C.-A. (2011). Optimal split of orders across liquidity pools: a stochastic algorithm approach. SIAM Journal on Financial Mathematics, 2:1042 1076. CA Lehalle 23 / 23