overview

Market Microstructure

An overview of market microstructure and an overview of what quantitative market making is and how it is used today.

1.0 Introduction

Once a decision has been made to purchase a stock you will need to buy a large quantity if you are a large fund e.g. 100 million shares at the current market price. It is not realistically possible to buy all the shares at the current market price since the trades you make are so large that they will alter the price of those shares. In this article I will aim to go over the basic principles of why this happens and how trades are actually placed and how it is automated and exploited today.

2.0 Market

Markets are venues where certain assets can be bought or sold; these are known as exchanges. Different types of assets can be bought and sold at specific exchanges. The same asset can also be bought from a different exchange.

It can be said that the rise in the number of venues has lead to a fragmentation of liquidity where the same asset can be bought from a variety of different exchanges. These exchanges have their own rules, costs and the actions that are performed on these venues can also be limited. This increases the complexity in achieving optimal execution.

limit order book is where buyers and sellers submit prices, where the buyers will be bidding for an asset at a given price and sellers will be asking for a price at which they are willing to sell the asset. In a limit order book there are 2 types of orders that can be made.

When a person wants to buy a financial security that person will submit this order to the market directly or, more commonly, a broker. This is done through different order types in the limit order book.

  • Market Order
  • Limit Order

2.1 Market Microstructure

The figure below shows a limit order the buys shown in blue and the sells in red.

Limit Order Book  The Buy and Sell orders are then stacked on either side of the order book with prices and quantities

At (a) there are no matching prices, however at (b) a new order comes in for a buy at 99.50 for a quantity of 500. This then crosses with the two sell orders that are available and 275 is bought at 99.45 and 225 are bought at 99.50. This leaves the order book in state (c).

Since these prices change over time there may be advantages to waiting to fulfill an order to see how the price changes over time. The rate at which you place an accepted order depends on the cost you are willingness to complete the order quickly.

A market order is an order type which accepts the price that is at the front of the Ask queue. This guarantees that a order is fulfilled but at a price that may not be optimal.

3.0 Slippage

3.1 Market Impact

Making a transaction on the market will cause the price to change. This can be seen from the order book example where the mid spread would change after the transaction has completed.

Price Impact  The graph on the top left of this figure shows the price impact that several trades make over time. In the figure 1 the graph on the left shows what the perceived impact of this looks like over time. In Figure 2 the graphs below show real world data on how the price changes over time when a order is placed at different times.

The above figure shows that price impact has distinct phases. There's transient impact over time once it reaches its maximum. Then there's temporary impact at the end of the order and then there is a decay stage to a certain level and then the price is permanently moved to a new level.

3.2 Liquidity

Liquidity has a cost and this increases as the number of instruments you buy increases. In the above example at in figure 1 (a) the mid spread would be 99.38 which is the halfway point between the buy and the sell.

The mid-spread allows us to view the cost of liquidity. The larger the spread the higher the cost. This means that if a large buy needs to be placed urgently the buys will have to "walk up the order book". Which is essentially the cost of aggression.

The fragmentation of liquidity means that a large order for an illiquid stock may not be available on traditional exchanges and dark pools and other less known venues may need to be explored to complete the full order.

3.3 Transaction Costs

In summation of the two previous sections the main transaction costs rise from the state of the order book and the size of the bid-ask spread. The liquidity of the asset being purchased will also act as a cost associated with purchasing it. The more illiquid the stock the higher the cost.

4.0 Dark Pools

Dark pools are a phenomenon that exists in the era of large banks which hold reservoirs of financial instruments which can be made available through the bank rather than the exchange directly.

These are known as "dark" pools/venues and there is no transparency and the state of the order book is unknown, this learning process can incurr additional trading costs at the dark venue.

5.0 Real World

This is the real trading landscape today, the average price you see on different public websites is actually built up of a lot of smaller orders.

This is the microstructure that High Frequency Traders try to exploit, when you click "buy 100m NVDA @ 100.00" on a BBG terminal these are split up into smaller orders at different exchanges. A HFT will beat you to the last exchange and buy it before you will. However, there are "HFT Free" exchanges which aim to stop this behaviour e.g. IEX

In terms of learning methods, these probelms can be generalised to the "news vendor problem" and reinforcement learning is an effective way to tackle this in the market today. Well, the firms that have the resources, money to implement, create and deploy these to the exchange and regularly train the algorithms. The traders or "execution analysts" are simply providing the oversight ie. if the trader spots a problem stopping the algorithm and unwinding positions manually.

So in short the trader will essentially be executing orders using an optimal execution algorithm which has either been developed in house or using a third party vendor that provides a platform where they can execute their large orders using their own proprietry algorithm. Depending on the liquidity these transactions can occur very quickly otherwise the trader will use a third party vendor which will give access to dark pool trading venues.

This is only true in highly electronic markets such as Equities, FX etc.

IEX Operating Principles