Data Analysis and Machine Learning Lecture 8: Limit Order Book and Order Flow Imbalance Guest Lecturer: Douglas M. Vieira PhD student, Imperial College London 2017.11.01
Outline of the lecture Order flow imbalance Empirical example
How an exchange used to look like Figure: The New York stock exchange trading floor in September 1963. Source: Wiki Commons. Trading was done via a single market maker, who would tell bid and ask prices. The traders could only buy or sell at the given prices. This is an example of a quote-driven market.
How an exchange looks like now Figure: A modern server room. Source: Wiki Commons. Market making is now decentralised: each trader can electronically post the prices at which they are willing to buy or sell. Buy and sell orders are matched automatically. This is an example of a order-driven market.
Definition In a order-driven market, there are three basic types of orders a trader can submit: Limit order: a binding intention of either buy or sell an specified quantity of an asset for at least or at most a limit price. Market order: buy or sell an specified quantity of an asset at the best possible price available in the market. Cancellation: cancels an unmatched or partially matched limit order previously sent. The limit order book is the collection of all unmatched or partially matched limit orders. The limit order book is composed of: Bid side: the collection of buy limit orders, and Ask side: the collection of sell limit orders. Other two important concepts are the Best bid price: the highest price among the buy limit orders, and Best ask price: the lowest price among the sell limit orders.
Example of a limit order Figure: A limit buy order: Buy 2 at 69200. Source: Cont, R. (2015).
Example of a market order Figure: A market sell order of 10. Source: Cont, R. (2015).
Example of a cancellation Figure: Cancellation of 3 sell orders at 69900. Source: Cont, R. (2015).
Limit vs market orders Rationale of submitting limit or market orders Limit order: Guarantees price but not execution, Market order: Guarantees execution but not price. Empirically, limit orders are cancelled much more often than filled. In [?], for example, it was observed a cancel-to-fill ratio of 4:1.
Types of high frequency data There are three levels of high frequency data, referring to different aggregation levels of limit orders. Level-I data: provides the minimal information about the limit order book, it only shows the best bid and ask prices and the total liquidity at that level, Level-II data: provides a minimally aggregated limit order book, which assigns the total liquidity for each price level in the market, Level-III data: the richest type of data set, information about each individual limit order is provided. Level-I data sets are more accessible. For instance, we can download sample data for Level-I attickdata.com.
Real example of a limit order book Figure: Real limit order book. The left table is the bid side, whose columns display the brokers, sizes and prices, respectively. The right table is the ask side, the columns are prices, sizes and brokers. Source: http://atendimento.xpi.com.br/consulta-de-cliente/xp-pro-manual/
Real example of a limit order book (animation) https://www.maximemorariu.com/research-topics
Order flow imbalance Order flow imbalance Cont, Kukanov, Stoikov. Price impact of order book events
Empirical example Empirical example Demo time!