Machine Learning and Electronic Markets

Similar documents
The Flash Crash: The Impact of High Frequency Trading on an Electronic Market

The Flash Crash: The Impact of High Frequency Trading on an Electronic Market

High-frequency trading and changes in futures price behavior

The Flash Crash: The Impact of High Frequency Trading on an Electronic Market

Copyright 2011, The NASDAQ OMX Group, Inc. All rights reserved. LORNE CHAMBERS GLOBAL HEAD OF SALES, SMARTS INTEGRITY

Algorithmic Trading (Automated Trading)

Volatility Models and Their Applications

Trading Execution Risks

Market Microstructure Invariants

High-Frequency Quoting: Measurement, Detection and Interpretation. Joel Hasbrouck

STATISTICAL MECHANICS OF COMPLEX SYSTEMS: CORRELATION, NETWORKS AND MULTIFRACTALITY IN FINANCIAL TIME SERIES

Measuring and explaining liquidity on an electronic limit order book: evidence from Reuters D

Market Risk Analysis Volume II. Practical Financial Econometrics

The Flash Crash: The Impact of High Frequency Trading on an Electronic Market

High-Frequency Data Analysis and Market Microstructure [Tsay (2005), chapter 5]

QView Latency Optics News Round Up

Reflexivity in financialized commodity futures markets. The role of information

High-Frequency Trading and Market Stability

REGULATING HFT GLOBAL PERSPECTIVE

Trading Execution Risks

Oracle Financial Services Market Risk User Guide

PRE CONFERENCE WORKSHOP 3

Stock Market Forecast: Chaos Theory Revealing How the Market Works March 25, 2018 I Know First Research

Lecture 4. Market Microstructure

A Blessing or a Curse? The Impact of High Frequency Trading on Institutional Investors

? World Scientific NEW JERSEY. LONDON SINGAPORE BEIJING SHANGHAI HONG KONG TAIPEI CHENNAI

Q7. Do you have additional comments on the draft guidelines on organisational requirements for investment firms electronic trading systems?

CME Cattle Market Volatility

Flash Crash of May 6, 2010 Why Did It Happen? Can It Happen Again?

Automated and High Frequency Trading. Fredrik Hjorth Tieto, Stockholm October 20, 2011

We are not saying it s easy, we are just trying to make it simpler than before. An Online Platform for backtesting quantitative trading strategies.

Two kinds of neural networks, a feed forward multi layer Perceptron (MLP)[1,3] and an Elman recurrent network[5], are used to predict a company's

Chapter 6 Dealers. Topics

METALS Products. Where the metals market

FORECASTING PERFORMANCE OF MARKOV-SWITCHING GARCH MODELS: A LARGE-SCALE EMPIRICAL STUDY

Internet Appendix for Low-Latency Trading and Price Discovery: Evidence from the Tokyo Stock Exchange in the Pre-Opening and Opening Periods

NAVIGATING. a BriEF guide to the DErivativEs MarkEtPLaCE and its role in EnaBLing ECOnOMiC growth

An Online Algorithm for Multi-Strategy Trading Utilizing Market Regimes

Financial Econometrics Notes. Kevin Sheppard University of Oxford

Deutsche Börse Group s Response

Form MO-PROG1: Form A

The Simple Truth Behind Managed Futures & Chaos Cruncher. Presented by Quant Trade, LLC

Market Model for the Electronic Trading System of the Exchange: ISE T7. T7 Release 6.1. Version 1

Trading simulation 2 (Session 6)

Implementing the Expected Credit Loss model for receivables A case study for IFRS 9

Legend expert advisor

90 Days Trading Bonds

Agenda 1. May 6th General Market Context 2. Preliminary Findings 3. Initial Q&A 4. Next Steps and Analysis 5. Closing Q&A

Exhibit A. Institutions and broker-dealers that are clients of ITG Inc. ( ITG ) are eligible to execute in POSIT, including affiliates of ITG.

International Finance. Estimation Error. Campbell R. Harvey Duke University, NBER and Investment Strategy Advisor, Man Group, plc.

a) Choose a social/economic behavior/topic that you wish to examine;

FX PRODUCTS. Making a world of forex opportunities accessible to you.

Machine Learning and the Insurance Industry Prof. John D. Kelleher

Oracle Financial Services Market Risk User Guide

ARCH Models and Financial Applications

ECLIPSE DAY TRADING SYSTEM USER GUIDE

Machine Learning in Finance and Trading RA2R, Lee A Cole

Motif Capital Horizon Models: A robust asset allocation framework

Case 1:14-md VEC Document Filed 12/06/16 Page 1 of 17

WILLIAMS & JENSEN, PLLC

ARE AGRICULTURAL COMMODITY FUTURES GETTING NOISIER? THE IMPACT OF HIGH FREQUENCING QUOTING IN THE CORN MARKET

Copyright , DayTradetoWin.com

FINRA/CFP Conference on Market Fragmentation, Fragility and Fees September 17, 2014

C A R F W o r k i n g P a p e r

High Frequency Price Movement Strategy. Adam, Hujia, Samuel, Jorge

Predicting Economic Recession using Data Mining Techniques

High-Frequency Trading in the Foreign Exchange Market: New Evil or Technological Progress? Ryan Perrin

The University of Chicago, Booth School of Business Business 41202, Spring Quarter 2012, Mr. Ruey S. Tsay. Solutions to Final Exam

Performance of Statistical Arbitrage in Future Markets

BROKERS: YOU BETTER WATCH OUT, YOU BETTER NOT CRY, FINRA IS COMING TO

Market Risk Analysis Volume IV. Value-at-Risk Models

Economics of Market Making by Robert A. Schwartz and Bruce W. Weber Zicklin School of Business Baruch College, CUNY

The Robust Repeated Median Velocity System Working Paper October 2005 Copyright 2004 Dennis Meyers

HF Markets (SV) Ltd TRADING AND EXECUTION RISKS

MPhil F510 Topics in International Finance Petra M. Geraats Lent Course Overview

Automated Options Trading Using Machine Learning

THE IMPACT OF TRADING ACTIVITY ON AGRICULTURAL FUTURES MARKETS

CPSC 540: Machine Learning

Wenzel Analytics Inc. Using Data to Capitalize on Behavioral Finance. December 12, 2016

TABLE OF CONTENTS 1. INTRODUCTION Institutional composition of the market 4 2. PRODUCTS General product description 4

Transparency: Audit Trail and Tailored Derivatives

Glossary for Retail FX

Definition 4.1. In a stochastic process T is called a stopping time if you can tell when it happens.

CME Direct Auction - Dairy User Manual. 07 Oct 2016 Version 1.0

Bond Pricing AI. Liquidity Risk Management Analytics.

Rosario Nunzio Mantegna

Futures Investment Series. No. 3. The MLM Index. Mount Lucas Management Corp.

Risk Measuring of Chosen Stocks of the Prague Stock Exchange

Cboe Europe Ltd. Large in Scale Service (LIS) Service Description. Version 1.2. October Cboe Europe Limited

Are HFTs anticipating the order flow? Crossvenue evidence from the UK market FCA Occasional Paper 16

Essential Learning for CTP Candidates NY Cash Exchange 2018 Session #CTP-08

Project B: Portfolio Manager

State Switching in US Equity Index Returns based on SETAR Model with Kalman Filter Tracking

Xetra Release Release Description. Deutsche Börse AG

Algorithmic Trading with Human Agents and Computer Agents in an Artificial Stock Market. National University of Ireland, Galway

The University of Chicago, Booth School of Business Business 41202, Spring Quarter 2009, Mr. Ruey S. Tsay. Solutions to Final Exam

Rise of the Machines: Algorithmic Trading in the Foreign Exchange Market. Alain Chaboud, Benjamin Chiquoine, Erik Hjalmarsson, and Clara Vega

The Exchange. for Single Stock. Futures SM

Quantitative Trading System For The E-mini S&P

Execution and Cancellation Lifetimes in Foreign Currency Market

Transcription:

Machine Learning and Electronic Markets Andrei Kirilenko Commodity Futures Trading Commission This presentation and the views presented here represent only our views and do not necessarily represent the views of the Commission, Commissioners or staff of the Commodity Futures Trading Commission.

DJIA S&P 500 The Flash Crash - May 6, 2010 11,000 1,180 10,800 1,160 1,140 10,600 1,120 10,400 1,100 10,200 DJIA 1,080 10,000 E-Mini S&P 500 S&P 500 Index 1,060 1,040 9,800 8:30 9:20 10:10 11:00 11:50 12:40 13:30 14:20 Time 1,020

What did people think? A survey conducted by Market Strategies International in June 2010 reports that over 80 percent of U.S. retail advisors believe that overreliance on computer systems and high-frequency trading were the primary contributors to the volatility observed on May 6.

Modern financial markets: machines (algorithms) against machines How do machines trade in electronic markets? How are the prices discovered? How robust are the markets populated by machines? These are empirical questions.

Data: E-mini S&P 500 futures contract Trades exclusively on the CME Globex electronic trading platform. Highest dollar trading volume among U.S. equity index products. Contributes the most to price discovery of the S&P 500 index. Account-level, transaction-by-transaction data for all regular futures transactions over several days or weeks of data (e.g., August 2009). Size: 7.2 million transactions during the month of August 2009 between 9:30 a.m. and 4 p.m. EST. During August 2009: 26950 trading accounts of 346 brokers.

Approach: Machine-learning methods Biclustering and Plaid models: Can we identify different (algorithmic) trading strategies? Hidden Markov Chain (Markov Switching) models: Can we analyze the contribution of different (algorithmic) strategies to price discovery, volatility, liquidity? Network analysis: Can we gain insights into the dynamics of anonymous electronic markets?

What is biclustering? Variables Biclusters A class of clustering algorithms that simultaneously clusters the rows and columns of a matrix to find homogenous submatrices

The Static Plaid model A regression-based clustering model which features a series of additive layers that comprise the matrix.

Time Series Variation The Plaid model was originally designed for a single, static data matrix. We observe a time series of such matrices. The naïve method of ignoring time becomes overwhelmed with transient patterns. Can we identify persistent trader groups and the important covariates that separate them consistently over time?

Dynamic Data: Cross-Section and Time Series

Smooth Plaid Models: Instead of standard regression, we introduce penalties to filter out transient patterns and detect only the most persistent groupings/features.

Smooth Plaid Results: The smooth plaid model clusters traders into five broad groups: 14 high frequency traders 271 slower market makers 7126 opportunistic traders 254 fundamental traders (buyers and sellers) 8021 small traders

Trading Volume

Net Position

Net Position

Given the (reverse-engineered) identities of the trader types below, can we analyze the price discovery process? 14 high frequency traders 271 slower market makers 7126 opportunistic traders 254 fundamental traders (buyers and sellers) 8021 small traders The financial econometrician s favorite occupation: Forecasting returns!

Let s start with a simple cut: High frequency traders (HF) and everyone else (LF). Remember, retail advisors think that HF traders caused the Flash Crash! HFTs appear very different.

How do high frequency and low frequency traders trade with each other?

Transition matrix The transition matrix is quite stable: Convergence in 1 to 1½ hours in calendar time or 80,000 to 100,000 transactions in transaction time

Forecasting returns: Markov Model: 1. Use 1½-hours of data to construct the transition matrix 2. Update the transition matrix (from time zero) 3. Update the transition matrix with rolling window Naïve model: Transition probability is 1/3. Random Walk. (1) (2)

R 2 = 0.11: We can forecast one-period returns! 0.12 0.1 Constant Transition 0.08 Moving Transition R 2 0.06 Naïve Transition Random Walk 0.04 0.02 0 1 2 3 4 5 6 7 8 9 10 20 30 40 50 100 200 300 Forecasting Horizon

Why are we able to forecast returns? High Frequency Traders really stand out in the data. Their actions are almost deterministic. They contribute a predictable component to prices/returns. That s why we can forecast returns. How do prices form in electronic markets?

How do prices form in anonymous electronic markets? In limit order markets, the process of finding market clearing prices is fundamentally different from that of a standard demand-supply auction. The standard market-clearing price arises from an aggregation of supply and demand schedules for all market participants. In limit order markets, there is neither a uniform market-clearing price nor a time when the limit order market clears. The price discovery process in a limit order market can be thought of as a sequential aggregation process. This process can be represented as a graph of bilateral executions among all market participants - a trading network.

Price discovery (matching) represented as a trading network.

Actual trading networks

Can network variables describe market dynamics? Divide transaction data into consecutive periods of transaction time. Construct networks for each period of transaction time. Compute two sets of variables: Network variables for each network and Financial variables for each period of time. See if the two sets of variables are statistically related. Check for causality.

Financial networks: Definitions An edge is defined as the occurrence of trading between two unique counterparties within a specified period of time. A B The direction of an edge: (Trading Network) IN for buy and OUT for sell. (Liquidity Network) IN for aggressive and OUT for passive A B Examples: A sold 3 contracts to B for $10.50 B initiated a transaction for 2 contracts with A at $10.20

Network Variables Individual node: Centrality How many trading partners do you have? Centralization (CEN): Take centrality measures for each node and calculate how unequal is the whole degree distribution of edges. Pair of nodes: Assortativity Are those you trade with similar to you? Assortativity Index (AI): Take four correlation coefficients and calculate a compound measure. Triple of nodes: Clustering Are those you trade with trade with each other? Clustering Coefficient (CC): Ratio of closed triplets to connected triples. Network components: How connected is the whole network? Large Strongly Connected Component (LSCC): The largest subset of nodes such that any node can reach any other node by traversing edges.

Results Network variables are statistically significantly related to financial variables (returns, volatility, volume, intertrade duration). Network variable that quantifies centrality (star-shaped pattern) has a very high correlation with returns. Network variable that quantifies the assortativity of connections (diamond-shaped pattern) has a high correlation with volatility. Network variables strongly Granger-cause trading volume, realized volatility and intertrade duration, but are not Granger-caused by them. Cool. But is all of this useful?

Volume Price May 6, 2010 - The Flash Crash: E-mini S&P 500 Volume and Price 90000 1180 80000 1160 70000 Volume Price 1140 60000 1120 50000 1100 40000 1080 30000 20000 1060 10000 1040 0 1020 8:30 9:20 10:10 11:00 11:50 12:40 13:30 14:20 15:10 Time

Trader Categories These were constructed manually, but note the similarities! High Frequency Traders (16) Intermediaries (179) Fundamental Buyers (1263) Fundamental Sellers (1276) Opportunistic Traders (5808) Small Traders (Noise) (6880) Did High Frequency Traders do it?

Trader Volume Trader Volume Trader Volume Trader Volume 700000 600000 500000 400000 300000 200000 100000 May 3 Trader Categories 700000 600000 500000 May 4 High Frequency Traders 400000 High Frequency Traders 300000 200000 Opportunistic Traders and Intermediaries 100000 Opportunistic Traders and Intermediaries 0 Fundamental Sellers Fundamental Buyers 0 Fundamental Sellers Fundamental Buyers -0.00736-0.00536-0.00336-0.00136 0.00064 0.00264 0.00464 0.00664-0.00736-0.00536-0.00336-0.00136 0.00064 0.00264 0.00464 0.00664 700000 600000 500000 May 5 600000 High Frequency Traders 500000 High Frequency Traders 400000 400000 300000 300000 200000 200000 Opportunistic Traders and Intermediaries 100000 Opportunistic Traders and Intermediaries 100000 Fundamental Sellers Fundamental Buyers 0 Fundamental Sellers Fundamental Buyers 0-0.00736-0.00536-0.00336-0.00136 0.00064 0.00264 0.00464 0.00664-0.00736-0.00236 0.00264 Net Position Scaled by Market Trading Volume 700000 May 6

Net Position 2500 1205 2000 May 3 1500 1200 1000 500 0 1195-500 -1000 1190-1500 -2000 1185-2500 HFT NP -3000 Price 1180 8:31 9:21 10:11 11:01 11:51 12:41 13:31 14:21 15:11 Time 5000 4000 3000 2000 1000 0-1000 -2000-3000 -4000 May 5 Net Holdings of High Frequency Traders 1175 1170 1165 1160 1155 1150-5000 1145 8:31 9:21 10:11 11:01 11:51 12:41 13:31 14:21 15:11 4000 3000 2000 1000 0-1000 -2000-3000 May 4 1185 1180 1175 1170 1165 1160-4000 1155 8:31 9:21 10:11 11:01 11:51 12:41 13:31 14:21 15:11 4000 3000 2000 1000 0-1000 -2000-3000 -4000 May 6 1180 1160 1140 1120 1100 1080 1060-5000 1040 mtime 9:20 10:10 11:00 11:50 12:40 13:30 14:20 15:10 HFTs do not accumulate inventory larger than 4500 contracts!

The Flash Crash: This Market is a Complex Adaptive System 13:32 A large fundamental seller initiates a sell program 13:42 HFTs reverse the direction of their trading (start selling) 13:45 Hot Potato : Lack of Fundamental and Opportunistic Buyers 13:45:28-13:45:33 5 second trading pause 13: 45:33 13:45:58 Prices stabilize 13:46 Fundamental and Opportunistic Buyers lift prices up 14:08 Prices are at the 13:32 level

Order originated Settlement Data Position Reporting The Complexity of the Electronic Markets Proprietary/Vendor system Log in Price feed Fill information (Order matched) Drop Copies Matching Engine Clearing House Server Risk limits on GUI Trading Server Risk limits set at trading server Quote/Order acknowledgment Order sent to the exchange Co-location Facility Internet / VPN access Exchange sets limits FCM/broker-dealer sets limits Trading firm sets limits (Exchange pre-trade controls) Exchange Server Risk limits set at exchange level Trading Firm Risk Manager Risk limits set at exchange level Risk Manager FCM/Broker- Dealer

Proability Proability Trade Speed An Agent Based Simulation Model Inventory Constraints + # Contracts Order Price Selection Agent Classes Order Size 1 0.8 0.6 0.4 0.2 0 Trader CDF -4 1 6 Ticks from Best Bid/Ask 1 0.5 0 Order Size CDF 1 6 Number of Contracts

We Can Simulate The Flash Crash! Trader Types Number of Traders* Speed of Order Inventory Constraints Market Volume Small 200 (42%) 2 hours None 1% Fundamental Buyers 40 (8%) 1 minute None 9% Fundamental Sellers 40 (8%) 1 minute None 9% Intermediaries (Market Makers) 6 (1.3%) 20 seconds -4 4 10% Opportunistic 183 (39%) 2 minute -4 4 33% High Frequency 3 (0.6%) 2 second -20 20 38% * The simulated market is 1/32 the size of the real market for computational tractability

More importantly: Can we design risk safeguards to prevent future Flash Crashes? Trading Firm FCM/BD Exchange Clearing House Data providers Technology vendors Proximity services

Conclusions Regulators need to know what type of trading strategies are deployed in anonymous electronic markets, when and how. Algorithmic traders (machines) need to know what type of trading strategies are deployed in anonymous electronic markets, when and how. Investors need to know what type of trading strategies are deployed in anonymous electronic markets, when and how. How do we find out?: Use machine-learning methods to learn about the machines. Once we know, we can collectively come up with solutions to keep the markets liquid, fair, and free of abuse. Design safeguards against malfunctions.