Financial Intermediation at Any Scale
For Quantitative Modelling (2/3)
Cours BachelierCharles-Albert Lehalle
Capital Fund Management, Paris and Imperial College, London
IHP, November 18, 2016 to December 4, 2016

CA Lehalle (Cours Bachelier, 2016)

1 / 73

Motivation

What about the topic “Intermediation on Financial Markets”

I

Since the 2008-2009 crisis legislators’ and regulators’ viewpoint on financial markets changed,

I

They target to monitor and limit the risk taken by the market participants,

I

In one sentence: they want to ensure most participants plays a role of intermediaries , and nothing more.

I

The notion of intermediation and the role of banks, investment banks, dealers, brokers, and now insurancecompanies and funds have evolved and continue to evolve;I

important concepts to understand this are: microstructure and infrastructure; they are linked toliquidity .

I

These last 10 years, the field of Market Microstructure emerged. Related literature has grown...

I

I am convinced financial mathematics can address quite efficiently core concepts, as partly an academic
and partly a professional, I dedicated the last 12 years to understand these changes from a practical and atheoretical viewpoint.

I

These sessions will be the occasion to share how, in my opinion, financial mathematics can answer to new
and important questions raised by recent changes.

CA Lehalle (Cours Bachelier, 2016)

2 / 73

The Standard Pitch(We Will Go Further Than This)

Following the 2008 crisis, the financial system changed a lot:I

“Clients” (from inside or outside) have no more appetite for sophisticated products.

⇒ The system went from a bespoke market to a mass market.
Bespoke means to sell products that are very different: no economies of scale but high margins.
Mass market means a lot of similar products + optimized logistics.
I

Regulators welcome this change because it can prevent an accumulation of risk in inventories (cf. optimized
logistics).

⇒ The G20 of Pittsburgh (Sept. 2009) put the emphasis on inventory control (it is the root of improved
clearing, segregated risk limits, etc).
⇒ Policy makers took profit of two existing regulations (Reg NMS in the US and MiFID in Europe) to pushtoward electronification of exchanges (i.e. improved traceability and less information asymmetry).
I

Technology went into the game. Think about the kind of recent “innovations” (uber, booking.com, M-pesa,
blockchain, etc): it is about disintermediation .

⇒ How do you desintermediate a system made of intermediates?
CA Lehalle (Cours Bachelier, 2016)

3 / 73

Market Microstructure?

Historically, market microstructure stands for not reducing
I

Sellers = Equity Shares and Bonds issuers

I

Buyers = investors.

In practice, today, associated topics are
I

Market impact, Fire sales and Flash Crashes

I

Auction / Matching mechanisms (Limit Orderbooks, RFQ, conditional / fuzzy matching, etc)

I

Optimal trading / Liquidation

I

Market Making and High Frequency Trading

I

Investment process while taking all this into account

CA Lehalle (Cours Bachelier, 2016)

4 / 73

My Viewpoint on Market Microstructure
I have been Global Head of Quantitative Research at Crédit Agricole Cheuvreux and CIB during years (including
the crisis). I discuss a lot with regulators; previously inside the working group on Financial Innovation of the
ESMA, now inside the Scientific Committee of the AMF. I am now in a large Hedge Fund.
I

From a Financial
Mathematics
perspective, it isnothing more thanadding a variable toour models: theLiquidity .

I

The interactions
between liquidity andother (usual) variables
is far from trivial.

Disclaimer : I express myown opinion and not the oneof any of these institutions.
CA Lehalle (Cours Bachelier, 2016)

5 / 73

What Will We Do During 3 Lectures + 1 Seminar?
I will not go in the details of the models (except for few of them), because I target to give you enough information
to include liquidity in the models you know better than me.
Hence, I will
+ 18 Nov:
I

Start by the definition of intermediation

I

Focus on the two main Liquidity variables on financial market: inventories and flows+ 25 Nov:
I

Show you what Liquidity looks like when we can observe it+ 2 Dec:
I

Underline why market making (inventory keeping) and optimal trading (flow management) are core for the
new role of market participants.

+ 2 Dec [Seminar]:
I

Explain what practitioners are doing.

It is an on-going work
CA Lehalle (Cours Bachelier, 2016)

6 / 73

Advertisement For Optimal Trading

Optimal Trading is About To Close The loop

My own viewpoint on optimal trading:I

We have sophisticated (but tractable) methods to optimize the strategy of one agent (investment bank,trader, asset manager, etc) facing a “background noise” (stochastic control is now really mature),

I

These methods are used by practitioners (already three books on this topic [Lehalle et al., 2013],[Cartea et al., 2015], [Guéant, 2016]),I

Differential games, and more specifically mean field games now propose very promising frameworks toreplace most of the background noise by a mean field of explicitly modelled agents:II

to provide robust results for practitioners [Cardaliaguet and Lehalle, 2016],
to obtain meaningful results for policy recommandations [Lachapelle et al., 2016].

Up to now most results on global modelling used a simplification of a reality. Now decisions are modelled andsystematic, why not inject them into a global model?
It should enable you to produce very accurate models and draw powerful conclusions.
I

Beyond optimal trading, these lectures should help you in introducing liquidity in any model of yours: pleaseask question!

CA Lehalle (Cours Bachelier, 2016)

7 / 73

Outline of the Sessions

1

The Financial System as a Network of Intermediaries

2

Stylized Facts on Liquidity

CA Lehalle (Cours Bachelier, 2016)

8 / 73

Outline

1

The Financial System as a Network of Intermediaries
Risks Transformation as The Primary Role of The Financial System
Making the Market: the Stakes of Liquidity Provision
The Market Impact of Large Orders
Quant Models For Common Practices

2

Stylized Facts on Liquidity
Seasonalities and Stationarity
Orderbook Dynamics

CA Lehalle (Cours Bachelier, 2016)

8 / 73

Outline

1

The Financial System as a Network of Intermediaries
Risks Transformation as The Primary Role of The Financial System
Making the Market: the Stakes of Liquidity Provision
The Market Impact of Large Orders
Quant Models For Common Practices

2

Stylized Facts on Liquidity
Seasonalities and Stationarity
Orderbook Dynamics

CA Lehalle (Cours Bachelier, 2016)

8 / 73

Risks Transformation as The Primary Role of The Financial System

To understand the interactions between actors of financial markets, a first step is to understand therole of the financial system .
It takes its role at the root of capitalism:I

say you see a shoes shiner at Deli, IndiaI

you pay $1 to have your shoes shined, and you ask to the guy

I“it seems you have around 30 customers each day, it let you with $30 every day, it is a good job.”I

he answers: “not at all, I earn $1 a day... I do not own the brush, its owner loans its to me $29 a day. Since a
brush costs $12 and I need my daily dollar to eat, I will never own one.”→ let’s discuss about microcredit: loan him $12 during 2 days...
You have $30, you can ask to the guy some percents to cover the risk he will not have enough clients. If you arerisk averse, you can even ask for the brush as collateral... A bank can “structures” the loan for you, it will takecare of all the administrative aspects, it is a simple risk transformation (liquidity on you side, business of theshoes shiner side).

CA Lehalle (Cours Bachelier, 2016)

8 / 73

Sometimes Hedging is Far from Optimal

Even on liquid stocks and for vanilla options (close to maturity
in this case), hedging can go wrong.
The 19th of July 2012, a trading algorithms bought and soldshares every 30 minutes without any views on its market
impact [Lehalle et al., 2012].
For one visible mistake like this on liquid underlyings of vanilla
products, how many bad sophisticated hedging processes onless liquid (even OTC) markets...
Anonymous continuous hedging of a remaining position
outside of the bank does not mean all is going well.
Nevertheless we have solutions in recent literature:[Guéant and Pu, 2013], [Li and Almgren, 2014].
But nothing more generic, for instance the whole process ofhedging books in presence of wrong way risk is not studied(as far as I know). One step in this direction is[Schied and Zhang, 2013].
CA Lehalle (Cours Bachelier, 2016)

9 / 73

A Modern Organization For an Intermediary

My advices to an investment bank:I

Net all your books , maintain two opposite positions is costly and risky,I

If you can’t it may be because you do not communicate enough internally (sometimes because of Chinese
walls...), hence be ready to hedge on the market ,I

But before try to match your small metaorders : send them to an internal place and cross them as muchas possible;

I

You will have synchronization issues (at the level of these metaorders, no reason to be synchronized), ask toyour traders to implement facilitation-like market making schemes inside the bank.

I

The remaining quantity has to be sent to markets as smoothly as possible, but it does not mean you will
have no impact. Who is your counterpart in the market should be an obsession: if you trade a one way
risk, you will pay for this in the future...

CA Lehalle (Cours Bachelier, 2016)10 / 73

Outline

1

The Financial System as a Network of Intermediaries
Risks Transformation as The Primary Role of The Financial System
Making the Market: the Stakes of Liquidity Provision
The Market Impact of Large Orders
Quant Models For Common Practices

2

Stylized Facts on Liquidity
Seasonalities and Stationarity
Orderbook Dynamics

CA Lehalle (Cours Bachelier, 2016)11 / 73

Making the Market in Front of Adverse Selection: Kyle’s 85 Model

The framework

The market maker choose P̃ andλ to adjust her price to the flow

CA Lehalle (Cours Bachelier, 2016)

I

An informed trader, knowing the future priceI

Noise traders, knowing nothingI

A market makers, having only access to distributions (thanks to“backtests” / observations); she changes her price linearly according to
the price pressure she observes: fP (q) = P̃ + λ · q.

I

The informed trader adjusts his participation to maximize its profit (given P̃
and λ),I

The market makers know the distribution of the informed price and set P̃
and λ so that her price is as close as possible to its expectation.

11 / 73

Outline

1

The Financial System as a Network of Intermediaries
Risks Transformation as The Primary Role of The Financial System
Making the Market: the Stakes of Liquidity Provision
The Market Impact of Large Orders
Quant Models For Common Practices

2

Stylized Facts on Liquidity
Seasonalities and Stationarity
Orderbook Dynamics

CA Lehalle (Cours Bachelier, 2016)12 / 73

The Market Impact of Large Orders

Market Impact takes place in different phasesin [Moro et al., 2009]I

the transient impact, concave in time,I

reaches its maximum, the temporary impact, at the end of themetaorder,I

then it decays,I

up to a stationary level; the price moved by a permanent shift.

The Formula of the temporary market impact should be close tos
Traded volume
MI ∝ σ ·· T −0.2
Daily volume
The term in duration is very difficult to estimate because you have a
lot of conditioning everywhere:

CA Lehalle (Cours Bachelier, 2016)12 / 73

The Market Impact of Large Orders

Market Impact takes place in different phases
On our database of 300,000 large orders[Bacry et al., 2015a]

I

the transient impact, concave in time,I

reaches its maximum, the temporary impact, at the end of themetaorder,I

then it decays,I

up to a stationary level; the price moved by a permanent shift.

The Formula of the temporary market impact should be close tos
Traded volume
MI ∝ σ ·· T −0.2
Daily volumef

CA Lehalle (Cours Bachelier, 2016)

The term in duration is very difficult to estimate because you have a
lot of conditioning everywhere:

12 / 73

Permanent Market Impact

We had enough data to investigate long term impact, exploring the relationships between permanent impact andtraded information.
Daily price moves
I If you plot the long term price moves (x-axis indays), you see an regular increase;

CA Lehalle (Cours Bachelier, 2016)

I

But the same stock is traded today, tomorrow, theday after, etc.

I

Once you remove the market impact of “future”
trades (similarly to[Waelbroeck and Gomes, 2013]), you obtain adifferent shape.

I

If you look each curve: the yellow one contains the
CAPM β (the metaorders are trading market-wide
moves), the green curve contains the idiosyncratic
moves, this shape can be read as the daily decayof metaorders impact.

13 / 73

Outline

1

The Financial System as a Network of Intermediaries
Risks Transformation as The Primary Role of The Financial System
Making the Market: the Stakes of Liquidity Provision
The Market Impact of Large Orders
Quant Models For Common Practices

2

Stylized Facts on Liquidity
Seasonalities and Stationarity
Orderbook Dynamics

CA Lehalle (Cours Bachelier, 2016)14 / 73

Price Impact vs. Adverse Selection

Adverse selection is the fact you obtained liquidity now and you could
obtain it later and have a better price.

CA Lehalle (Cours Bachelier, 2016)14 / 73

Price Impact vs. Adverse Selection

Adverse selection is the fact you obtained liquidity now and you could
obtain it later and have a better price.

Price Impact and Adverse Selection
Price Impact for market orders implies Adverse selection for limit orders.
If the price in martingale after a price change, there is adverse selection ; theimbalance says you have a little less adverse selection than that since once afull tick has been consumed, they are chances the discovered quantity islarger than average.
When you owns a limit order in the book: the more orders behind you, themore protected vs. adverse selection.
2nd worst kept secret of HFT : if you have too few orders behind you, cancel your limit order.
“discovered quantity” means the quantity at second limit that is now a first limit

CA Lehalle (Cours Bachelier, 2016)14 / 73

Price Profiles
Price profiles: future and past of the mid-price (solid) or
bid and asks (dotted), conditionally to an execution.
Global Banks
Instit. Brokers
HF MM
HF Prop.

0.04

Average mid-price move

0.02

0.00

I

Instutional Brokers (i.e. essentially “client flows”:
with a decision taken at a daily scale and large
metaorders)I

HFT, split in HF market makers and HF proprietary
tradersI

Global banks, having a mix of client flows andproprietary trading flows.

I

Conditionally to the owner of the order , theprofile can be very different

I

You can compare such graphs and make matrices[Brogaard et al., 2012]I

Nevertheless the big picture is dynamic...

−0.02
−0.04
−0.06
−0.08
−0.10
−100

0

CA Lehalle (Cours Bachelier, 2016)

100
200
Number of trades

300

400

15 / 73

Imbalance Profiles

0.1

0.0

Average Imbalance−0.1

Imbalance profiles: State of the bookconditionally to an execution, renormalized
such as best opposite is 1, the green bar isyour order size.

−0.2
−0.3
−0.4
−0.5
−0.6

Instit. Brokers

CA Lehalle (Cours Bachelier, 2016)

Global Banks

HF MM

HF Prop.

16 / 73

From High Frequency to Low Frequencies

If someone trade at a given frequency 1/δt from 0, his price impact at K δt willbe (for an exponential kernel)
X
P(K δt) − P(0) =η(1)λe−k δt λ ' η(1)(1 − e−K δt λ )/δt.
k ≤KAnd for a power lawP(K δt) − P(0) = η(1) 1 − (1 + K δt)−(γ−1) /δt.
In both cases, if he stops trading at K δt, the price will fully revert according to
an exponential (or a power lax).

Transient Impact and Decay
The concave increase of the impact with time and its reversion can be
explained using propagator models.

CA Lehalle (Cours Bachelier, 2016)17 / 73

From High Frequency to Low Frequencies

If someone trade at a given frequency 1/δt from 0, his price impact at K δt willbe (for an exponential kernel)
X
P(K δt) − P(0) =η(1)λe−k δt λ ' η(1)(1 − e−K δt λ )/δt.
k ≤KAnd for a power lawP(K δt) − P(0) = η(1) 1 − (1 + K δt)−(γ−1) /δt.
In both cases, if he stops trading at K δt, the price will fully revert according to
an exponential (or a power lax).

Transient Impact and Decay
The concave increase of the impact with time and its reversion can be
explained using propagator models.

CA Lehalle (Cours Bachelier, 2016)17 / 73

From High Frequency to Low Frequencies

If someone trade at a given frequency 1/δt from 0, his price impact at K δt willbe (for an exponential kernel)
X
P(K δt) − P(0) =η(1)λe−k δt λ ' η(1)(1 − e−K δt λ )/δt.
k ≤KAnd for a power lawP(K δt) − P(0) = η(1) 1 − (1 + K δt)−(γ−1) /δt.
In both cases, if he stops trading at K δt, the price will fully revert according to
an exponential (or a power lax).

Transient Impact and Decay
The concave increase of the impact with time and its reversion can be
explained using propagator models.

CA Lehalle (Cours Bachelier, 2016)17 / 73

Outline

1

The Financial System as a Network of Intermediaries
Risks Transformation as The Primary Role of The Financial System
Making the Market: the Stakes of Liquidity Provision
The Market Impact of Large Orders
Quant Models For Common Practices

2

Stylized Facts on Liquidity
Seasonalities and Stationarity
Orderbook Dynamics

CA Lehalle (Cours Bachelier, 2016)18 / 73

Outline

1

The Financial System as a Network of Intermediaries
Risks Transformation as The Primary Role of The Financial System
Making the Market: the Stakes of Liquidity Provision
The Market Impact of Large Orders
Quant Models For Common Practices

2

Stylized Facts on Liquidity
Seasonalities and Stationarity
Orderbook Dynamics

CA Lehalle (Cours Bachelier, 2016)18 / 73

A World Tour of Volumes

We have some “intraday patterns”, the most famous
being the U-shape of the traded volume. It come fromthe practices of participants, it is important to have themin mind.
We can seeIthe effect of fixing auctions (more volume);Ithe generic U shape;Ithe influence of the opening of a market on another.

Reminder : if you want to compute correlations
between volume in Europe, US and Asia, you need to
pay attention of simultaneity (cf.
[Hayashi and Yoshida, 2005] for returns).

CA Lehalle (Cours Bachelier, 2016)18 / 73

Focus on Europe
The interesting aspect of European rhythms is they are affected by the opening of US markets. Moreover, 4weeks per year the time difference change (the time change winter / summer does not take place the same week
end).
Usual phases (in Europe):
I

Open: uncertainty on prices and unwind of the overnight positions

I

Macro economic news

I

NY opens

Volatility
CA Lehalle (Cours Bachelier, 2016)

Volumes
19 / 73

Do not mix heterogeneous effects

A large part of the variance comes from mixing Fridays with other days.
You can use auto correlations to obtain more robust estimators.
CA Lehalle (Cours Bachelier, 2016)

20 / 73

Volatility Estimation 101

A “simple” model:√
Xn+1 = Xn + σ δt ξn , Sn = Xn + ε
Under these assumptions:X√(Sn+1 − Sn )2 = 2nE(ε2 ) + O( n)nSome possible ways to handle thisI

Hawkes models [Bacry et al., 2015b],

I

Uncertainty Zones Model[Robert and Rosenbaum, 2011],

I

Clean statistics [Aït-Sahalia and Jacod, 2012],

I

etc.

CA Lehalle (Cours Bachelier, 2016)

Courtesy of M. Rosenbaum

21 / 73

Bid-Ask Spreads Have a Pattern Too
If only one microstructure effect should be kept, it is the Bid-Ask spread:I

Sell price 6= Buy priceI

Volume has an influence on the priceI

Volatility estimations are not so simple

CA Lehalle (Cours Bachelier, 2016)22 / 73

What About Real Data?

I

I

What is the difference between these three stocks?

Spread-volatility relation’ on three stocks

CA Lehalle (Cours Bachelier, 2016)23 / 73

What About Real Data?

I

Spread-volatility relation’ on three stocks

I

What is the difference between these three stocks?

I

The tick size does not constraint the bid-ask spreadat the right, it does at the left.

Tick Size and Bid-Ask Spread
The tick size is the minimum increase between two
consecutive prices. It is set in the rulebook of theexchange (or by the market maker). In the US it isregulated, in Europe it is not, hence in June 2009,
European platforms competed to lower the tick as low
as possible. It will be regulated within MiFID 2.
What should be the good value for the tick size? It is investigated in [Huang et al., 2015a]

CA Lehalle (Cours Bachelier, 2016)23 / 73

Tick Size Influences the BA-SpreadS&P 500 July 2012

CA Lehalle (Cours Bachelier, 2016)

The two previous Sections can be used to explain therole of the tick size:
I

The influence of the first, second and third queues
on the flow distribution should be restated if the tickis smaller;

I

Choosing the queue allow an agent to have a better
control on the price improvement he obtained andthe probability to be executed.

I

Expressed in bp on a log scale, the average daily
bid-ask spread as a function of the price of the
instrument gives information about the efficiency of
the tick [Lehalle et al., 2013].

I

Tick size is (badly?) regulated in the US, and not
regulated in Europe. MiFID 2 (Jan 2017) proposes
to regulate it, but the nature of the “tick tables” isunder discussion.

24 / 73

Tick Size Influences the BA-Spread

DAX July 2012

CA Lehalle (Cours Bachelier, 2016)

The two previous Sections can be used to explain therole of the tick size:
I

The influence of the first, second and third queues
on the flow distribution should be restated if the tickis smaller;

I

Choosing the queue allow an agent to have a better
control on the price improvement he obtained andthe probability to be executed.

I

Expressed in bp on a log scale, the average daily
bid-ask spread as a function of the price of the
instrument gives information about the efficiency of
the tick [Lehalle et al., 2013].

I

Tick size is (badly?) regulated in the US, and not
regulated in Europe. MiFID 2 (Jan 2017) proposes
to regulate it, but the nature of the “tick tables” isunder discussion.

24 / 73

The role of the tick size

First of all, it is used in competition across trading
venues.

CA Lehalle (Cours Bachelier, 2016)

I

when a venue decreases its tick, it enable cheaper
queue jumping in its orderbook;I

hence some traders will post there at +1 tick;I

finally the SORs will capture this priceimprovement.

25 / 73

Influence of the tick on the trading style

Remark 1 (The tick size)
1. Ideally, the information rate on an instrument should be able to generate a price change of one tick in few
trades;2. large tick stocks focus the trading strategies on queueing instead of splitting.

CA Lehalle (Cours Bachelier, 2016)

26 / 73

Universal Relation Between Bid-Ask Spreads and Volatility

I

There is an universal relation between bid-ask spreads ψand volatility σ,
Economists told us the market makers had to be paid by
the spread for the volatility risk they take:ψ ∝ σ.

I

Taken From [Dayri and Rosenbaum, 2015]

CA Lehalle (Cours Bachelier, 2016)

On a stock by stock basis, the proportional factor seems to
be close to the square root of the number of trades per day[Wyart et al., 2008]:σψ∝ √ .
N
The rational is the more trades per day, the easier tomaintain an inventory.

27 / 73

Universal Relation Between Bid-Ask Spreads and Volatility

I

There is an universal relation between bid-ask spreads ψand volatility σ,
Economists told us the market makers had to be paid by
the spread for the volatility risk they take:ψ ∝ σ.

I

Taken From [Dayri and Rosenbaum, 2015]

But for large tick instruments, the relation breaks, acorrection by η = N c /N a /2 has to be made (ψ isreplaced by ηδ, where δ is the tick and where φ is anadditional gain for market makers):
CA Lehalle (Cours Bachelier, 2016)

On a stock by stock basis, the proportional factor seems to
be close to the square root of the number of trades per day[Wyart et al., 2008]:σψ∝ √ .
N
The rational is the more trades per day, the easier tomaintain an inventory.
σψ ' ηδ ∝ √ + φ .
N

27 / 73

A Fourth Curve? (liquidity)

Intraday Seasonalities Essentials

CA Lehalle (Cours Bachelier, 2016)

I

Volumes are U-shaped, log-volumes are close toGaussian,I

Volatility are U-shaped too (less intense at the end
than at the start of the day),I

Volatility is “more path dependent” than volumes,

I

BA-spread is large at the start of the day, butfinishes small because of market maker running to
get rid of their inventory passively,

I“Volume on the Book” (i.e. Q A + Q B )/2)
seasonality is the invert of the one of BA-spread.
The more the spread is constraied by the tick, themore the seasonality is strong on thevolume-ob-the-book.

I

News implies peaks of volume / volatility,

I

Activity on other markets has an influence.
28 / 73

Outline

1

The Financial System as a Network of Intermediaries
Risks Transformation as The Primary Role of The Financial System
Making the Market: the Stakes of Liquidity Provision
The Market Impact of Large Orders
Quant Models For Common Practices

2

Stylized Facts on Liquidity
Seasonalities and Stationarity
Orderbook Dynamics

CA Lehalle (Cours Bachelier, 2016)29 / 73

Orderbook Dynamics

Orderbooks are the place where the matching of orders take place:I

an inserted order is compared to potential matching ones already in the engine,I

if it matches to one or more orders, it give birth to transactions,I

otherwise it is stored into the matching engine.

Iorderbook dynamics is the study and the modelling of the insertions and cancellations of orders,conditionally to its “state”. The more information in the “state”, the more complex (and accurate?) model.

I

There is now a large offer of models, from “zero-intelligence” ones (see [Smith et al., 2003]) to “gametheoretic” ones (see [Lachapelle et al., 2016]), via empirics-driven PDE ones (see [Gareche et al., 2013]).

CA Lehalle (Cours Bachelier, 2016)29 / 73

Empirics on Orderbooks Dynamics (continuous phase)

The limit orderbook (LOB) is a software receiving instructions from traders via members of the exchange(typically brokers). Orders contain a direction (side), a quantity, and (possibly) a price. I.e. buy 250 shares (ofVodafone) at 15.000. The price is a multiple of the tick size.

CA Lehalle (Cours Bachelier, 2016)30 / 73

Empirics on Orderbooks Dynamics (continuous phase)

The limit orderbook (LOB) is a software receiving instructions from traders via members of the exchange(typically brokers). Orders contain a direction (side), a quantity, and (possibly) a price. I.e. buy 250 shares (ofVodafone) at 15.000. The price is a multiple of the tick size.
1. The initial state of the LOB is empty, then a trader
send a first order. It is stored in the LOB.

CA Lehalle (Cours Bachelier, 2016)30 / 73

Empirics on Orderbooks Dynamics (continuous phase)

The limit orderbook (LOB) is a software receiving instructions from traders via members of the exchange(typically brokers). Orders contain a direction (side), a quantity, and (possibly) a price. I.e. buy 250 shares (ofVodafone) at 15.000. The price is a multiple of the tick size.
1. The initial state of the LOB is empty, then a trader
send a first order. It is stored in the LOB.
2. Another trader send an order in the other direction
at a non matching price.

CA Lehalle (Cours Bachelier, 2016)30 / 73

Empirics on Orderbooks Dynamics (continuous phase)

The limit orderbook (LOB) is a software receiving instructions from traders via members of the exchange(typically brokers). Orders contain a direction (side), a quantity, and (possibly) a price. I.e. buy 250 shares (ofVodafone) at 15.000. The price is a multiple of the tick size.
1. The initial state of the LOB is empty, then a trader
send a first order. It is stored in the LOB.
2. Another trader send an order in the other direction
at a non matching price.
3. The seller is impatient he cancels his resting order
to insert it at a matching (less interesting price).

CA Lehalle (Cours Bachelier, 2016)30 / 73

Empirics on Orderbooks Dynamics (continuous phase)

The limit orderbook (LOB) is a software receiving instructions from traders via members of the exchange(typically brokers). Orders contain a direction (side), a quantity, and (possibly) a price. I.e. buy 250 shares (ofVodafone) at 15.000. The price is a multiple of the tick size.
1. The initial state of the LOB is empty, then a trader
send a first order. It is stored in the LOB.
2. Another trader send an order in the other direction
at a non matching price.
3. The seller is impatient he cancels his resting order
to insert it at a matching (less interesting price).
4. Or a very impatient trader can directly insert a“marketable” order.

CA Lehalle (Cours Bachelier, 2016)30 / 73

Empirics on Orderbooks Dynamics (continuous phase)

The limit orderbook (LOB) is a software receiving instructions from traders via members of the exchange(typically brokers). Orders contain a direction (side), a quantity, and (possibly) a price. I.e. buy 250 shares (ofVodafone) at 15.000. The price is a multiple of the tick size.
1. The initial state of the LOB is empty, then a trader
send a first order. It is stored in the LOB.
2. Another trader send an order in the other direction
at a non matching price.
3. The seller is impatient he cancels his resting order
to insert it at a matching (less interesting price).
4. Or a very impatient trader can directly insert a“marketable” order.
5. If the buyer is really patient, he can cancel his order
and wait at a more advantageous price.

CA Lehalle (Cours Bachelier, 2016)30 / 73

Components of the Orderbook Dynamics

The atomic events impacting an orderbook areIinsertion,Icancellation,Itransaction.

The available information
I the state of the orderbook itself:
queue size at each tick,
could be reduced to the queue size at each level (or limit),
I or to the imbalance only (cf. the worst kept secret of HFTs)
I
I

I

the past imbalances, trades, etc. (including the volatility)Ibids and asks on correlated instruments (Futures, ETF, Options, etc).

CA Lehalle (Cours Bachelier, 2016)31 / 73

Model I

I

CA Lehalle (Cours Bachelier, 2016)

To understand the dynamics of the queues, we will capture the inflows andoutflows on the two sides of the book.

32 / 73

Model I

CA Lehalle (Cours Bachelier, 2016)I

To understand the dynamics of the queues, we will capture the inflows andoutflows on the two sides of the book.

I

Out first model will be the simplest one: each queue has its own dynamics.
It is a little more than “zero-intelligence models”, since the intensity of thethree flows will be functions of the state (i.e. size) of the queue.

32 / 73

Model I

CA Lehalle (Cours Bachelier, 2016)I

To understand the dynamics of the queues, we will capture the inflows andoutflows on the two sides of the book.

I

Out first model will be the simplest one: each queue has its own dynamics.
It is a little more than “zero-intelligence models”, since the intensity of thethree flows will be functions of the state (i.e. size) of the queue.

I

We renormalize the quantities in AES (“Average Event Size” of thequeue), and work in “ticks” and not in “limits”.

32 / 73

Model I: Empirics

First Limit

CA Lehalle (Cours Bachelier, 2016)33 / 73

Model I: Empirics

Second Limit

CA Lehalle (Cours Bachelier, 2016)33 / 73

Model I: Invariant Distributions

We can derive theoretically theinvariant distribution of thequantity at a given distance of themid priceIusing the data,I

using our model fitted on the
data,

I

using a Poisson process
fitted on the data for eachqueue.

We can compare asymptotic distributions(do not forget once a queueis empty the mid pricechanges)

CA Lehalle (Cours Bachelier, 2016)34 / 73

Model I Stylized Facts

Events (insert, cancel, trade) are counted, modelled using three independent Point Process.

When the State is the Size of One Queue.
The intensity of Point Processes for cancels, inserts and trades are function of the size of the concerned queue.
I

Asymptotic distributions of sizes are close to the real ones,I

But the probability of a limit order to be executed obtained by this model is not close to real ones.

CA Lehalle (Cours Bachelier, 2016)35 / 73

Model II

CA Lehalle (Cours Bachelier, 2016)I

Model II is a sophistication of Model I

I

Flows at first queue are a function of its state (i.e. size)

36 / 73

Model II

CA Lehalle (Cours Bachelier, 2016)I

Model II is a sophistication of Model I

I

Flows at first queue are a function of its state (i.e. size)Iand flows at the second queue are a function of its own state and the oneof the first queue (same side).

36 / 73

Model II: Empirics

First Limit

CA Lehalle (Cours Bachelier, 2016)37 / 73

Model II: Empirics

Second Limit

CA Lehalle (Cours Bachelier, 2016)37 / 73

Model II Stylized Facts

Adding the influence of the first queue on the second one
Adding as information the size of the first queue on the same side, we see the intensities on the second queue
are really different when the curent queue is protected by a large first queue rather than are in fact close to a firstlimit.

CA Lehalle (Cours Bachelier, 2016)38 / 73

Model III

CA Lehalle (Cours Bachelier, 2016)I

Model III is a sophistication of Model II

I

Like for Model II: flows at the second queue are a function of its own state
and the one of the first queue (same side).

39 / 73

Model III

CA Lehalle (Cours Bachelier, 2016)I

Model III is a sophistication of Model II

I

Like for Model II: flows at the second queue are a function of its own state
and the one of the first queue (same side).

I

but flows of the first queue are influenced by its size and the best opposite
queue size.

39 / 73

Model III: Empirics

First Limit

CA Lehalle (Cours Bachelier, 2016)

40 / 73

Model III: Empirics

Second Limit

CA Lehalle (Cours Bachelier, 2016)

40 / 73

Model III Stylized Facts

Influence of the opposite queue
Adding the size of the opposite queue in the state space increases the accuracy of the model. It is a way to take
into account the worst kept secret of High Frequency Trades (i.e. influence of imbalance on next mid-pricemove).

CA Lehalle (Cours Bachelier, 2016)41 / 73

Model IV: The Queue Reactive Model

The Queue Reactive Model is a sophistication of Model III
I

CA Lehalle (Cours Bachelier, 2016)

Like for Model III: flows of the first queue are influenced by its size and thebest opposite queue size.

42 / 73

Model IV: The Queue Reactive Model

The Queue Reactive Model is a sophistication of Model III

CA Lehalle (Cours Bachelier, 2016)

I

Like for Model III: flows of the first queue are influenced by its size and thebest opposite queue size.

I

Like for Model II: flows at the second queue are a function of its own state
and the one of the first queue (same side).

42 / 73

Model IV: The Queue Reactive Model

The Queue Reactive Model is a sophistication of Model III

CA Lehalle (Cours Bachelier, 2016)

I

Like for Model III: flows of the first queue are influenced by its size and thebest opposite queue size.

I

Like for Model II: flows at the second queue are a function of its own state
and the one of the first queue (same side).

I

But we now model the behaviour of the third queue (previously it was
Model I driven), when it become the second queue we keep it with proba
1 − θ or draw its size according to the observed distribution (with proba θ).

42 / 73

Model IV: The Queue Reactive Model

The Queue Reactive Model is a sophistication of Model III

CA Lehalle (Cours Bachelier, 2016)

I

Like for Model III: flows of the first queue are influenced by its size and thebest opposite queue size.

I

Like for Model II: flows at the second queue are a function of its own state
and the one of the first queue (same side).

I

But we now model the behaviour of the third queue (previously it was
Model I driven), when it become the second queue we keep it with proba
1 − θ or draw its size according to the observed distribution (with proba θ).

I

And we had to add another effect: with a proba θreinit , the full orderbook isdrawn from its stationary distribution when the price change.

42 / 73

Models Efficiency: Yet Another Criterion

Volatility and η = N c /2N a with respect to θ
Again we obtained asymptotic results.
We are more happy with execution
probabilities, but we add one criterion: wemeasure the volatility and to compare it withthe historical one.
We see θ controls the mean reversion of theprice. Hence θ and θreinit have to be chosen
to reproduce the mean reversion and thevolatility of the modelled instrument (typicallyθ = 0.2 and θreinit = 0.7 for France Telecom /Orange).

CA Lehalle (Cours Bachelier, 2016)43 / 73

Model III: Stylized facts
Adding exogenous information
Using the current sizes of the queues is not enough to recover realistic orderbook dynamics. Two more effects
have to be added
I

When a third limit is promoted to second limita , you cannot reuse its size. On average it is too large,
impulsing an high mean-reversion to the price (and hence a very low volatility).

I

Moreover after a price change you need to “reset” the sizes on the two sides of the book (to prevent a toohigh mean-reversion too).

⇒ memory of the recent past of events is needed, to prevent a too high level of mean reversion.
a

The notions of “third” and “second” limits have to be properly defined. Here the stock is a large tick one.

Time to time (in around 10 to 20% of the time), everyone accept the new price.
Think about two previous macroscopic cases:I

The liquidation of Kerviel’s inventory: prices changes because of liquidity consumption, no one accepts the
new prices. ⇒ Large mean reversion.

I

The announce by President Sarkozy of the end of advertising on public TV channels. Prices change fast,and everyone accepts the new prices. ⇒ Large permanent price change.

CA Lehalle (Cours Bachelier, 2016)44 / 73

Conclusion on Orderbook Empirics

Using staged models of orderbook dynamics, we observed
I

The sub-linear, increasing, cancellation rate.

I

The decreasing limit order insertion rate for non-best limits.

I

Agents are acting strategically in the orderbook and this has to be taken into account.

I

A simple way is to unconditionally “reset” the orderbook with a given probability θreinit . In reality other(exogenous) factors are probably affecting this probability (i.e. the “acceptance” of a newly printed price).

I

In the paper (with Huang and Rosenbaum) we do more: we use the Queue Ractive Model to simulate
trading strategies.

CA Lehalle (Cours Bachelier, 2016)45 / 73

A Mean Field Game in Electronic Orderbooks

We have seen participants act strategicallyI

when a seller enters into the “trading game”,

I

he can choose to wait, sending a limit order,Ior to pay immediately a “price impact”.

I

if he waits he can obtain a better price (the price impact of the
opposite, liquidity consuming, order)⇒ he needs to valuate the price of waiting in the queue.
We provided a theoretical study with numerical simulations [Lachapelle et al., 2016]. The closest existing study(in economics) is [Roşu, 2009]. Empirical studies investigated on high frequency data ([Gareche et al., 2013],[Huang et al., 2015b]).

CA Lehalle (Cours Bachelier, 2016)46 / 73

Our Mean Field Game Model: One QueueI

Sellers only,I

one agent i arrives in “the game” at t according to a Poissonprocess N of intensity λ,Iit compares the value to wait in the queue (y (x), where x is thesize of the queue) to zero to choose to wait in the queue (whenu(x) > 0) or not, its decision is δ iIthe queue is consumed by a Poisson process M µ(x) ofintensity µ(x),Iin case of transaction, a “pro-rata” scheme is used(“equivalent” to infinitesimal possibility to modify orders): q/xof the order is part of it; can be relaxed for FIFO.

CA Lehalle (Cours Bachelier, 2016)

47 / 73

Forward and backward parts
The Mean Field is the size of the queue (it is a forward process):


µ(x )
j
dxt = q dNt δ j − dMt t , remark: j = N, I could have written dNt δ N .
The Value function the ith agent wants to minimize is driven by the following running cost


q
q
µ(x)
dJ(xt ) =− cq dt.
P(xt ) + (1 − )J(xt − q) dMt
xt
xt
Z T
u(x) := EdJ(xt ),
t0

and its control δ i is to choose to be submitted to this cost function or to pay zero at t0 :U i (x) :=max δ i u(x).

δ i ∈{0,1}

The optimal decision δ i is the solution of the backward associated dynamics.

CA Lehalle (Cours Bachelier, 2016)

48 / 73

Dynamics

The value function evolves following these four main possible events (we have price impact P(x) and waiting cost
proportional to c q ; seen from any agent, the control δ i is now replaced by the anonymous decision 1u(x)>0 ):u(x, t + dt) = (1 − λ1u(x)>0 dt − µ(x)dt) · u(x)+ λ1{u(x)>0} dt · u(x + q)q
q
P(x) + (1 − )u(x − q)
+ µ(x)dt ·xx− c q dt

← nothing happens← new entrance← transaction← waiting cost

To solve it at the k th order, we will perform a Taylor expansion of u(x + q) and u(x − q) for small q at the k thorder).

CA Lehalle (Cours Bachelier, 2016)49 / 73

Taylor expansion of the master equation

At the second order, we obtain:
0=

CA Lehalle (Cours Bachelier, 2016)µ(x)(P(x) − u)−c + (λ1{u>0} − µ(x))u 0x1µ(x) 0 +q(λ1{u>0} −µ(x))u 00 +u ,2x

50 / 73

Taylor expansion of the master equationµ(x)(P(x) − u)−c + (λ1{u>0} − µ(x))u 0x
Just keep the first order term0=

It corresponds to a (trivial) shared risk Mean Field Game monotone system with N = 1. The mean field aspect
does not come from the continuum of agents (for every instant, the number of players is finite), but rather fromthe stochastic continuous structure of entries and exits of players.

CA Lehalle (Cours Bachelier, 2016)

50 / 73

Solution for a specific form of µ(x)At queue sizes x ∗ such that x ∗ = µ(x ∗ )P(x ∗ )/c, u sign changes.
Moreover, for the specific case µ(x) = µ1 1x<S + µ2 1x≥S :There is a point strictly before S where u switches from negative to positive. It means that participants anticipate
service improvement.
CA Lehalle (Cours Bachelier, 2016)

51 / 73

A stylized orderbook: decision process

The decision-taking process will follow this mechanism:

CA Lehalle (Cours Bachelier, 2016)I

consuming liquidity allows to obtain quantity immediately but at an
impacted price, with respect to the liquidity available in the book,Ieach time a market participant has to take a buy or sell decision, hetries to anticipate the “long term” value for him to be liquidity provider or
liquidity consumer,Ieach market participant can use a SOR (Smart Order Router[Foucault and Menkveld, 2008]) for this sophisticated valuation,otherwise he will just consume liquidity.

52 / 73

A stylized orderbook: decision process

The decision-taking process will follow this mechanism:

CA Lehalle (Cours Bachelier, 2016)I

consuming liquidity allows to obtain quantity immediately but at an
impacted price, with respect to the liquidity available in the book,Ieach time a market participant has to take a buy or sell decision, hetries to anticipate the “long term” value for him to be liquidity provider or
liquidity consumer,Ieach market participant can use a SOR (Smart Order Router[Foucault and Menkveld, 2008]) for this sophisticated valuation,otherwise he will just consume liquidity.

52 / 73

A stylized orderbook: decision process

The decision-taking process will follow this mechanism:

CA Lehalle (Cours Bachelier, 2016)I

consuming liquidity allows to obtain quantity immediately but at an
impacted price, with respect to the liquidity available in the book,Ieach time a market participant has to take a buy or sell decision, hetries to anticipate the “long term” value for him to be liquidity provider or
liquidity consumer,Ieach market participant can use a SOR (Smart Order Router[Foucault and Menkveld, 2008]) for this sophisticated valuation,otherwise he will just consume liquidity.

52 / 73

Model details• Orders arrive at Poisson rate Λ = λ + λ−• strategic arrivals: λ, non-optimal: λ− (can be read as “SOR” on “non-SOR” participants)• (Qa , Qb ) := number of orders on ask and bid sides• Value functions: u(Q a , Q b ) for sellers and v (Q a , Q b ) for buyers• Matching process for any quantity Q: Qq/Q a• Transaction price:pbuy (Q a ) := P +δq,Qa − qpsell (Q b ) := P −δqQb − qwhere: q is the order size, δ is the market depth, P is the fair price• cost to maintain inventory: ca and cb
CA Lehalle (Cours Bachelier, 2016)

53 / 73

Decision process• If u(Qta + q, Qtb ) > psell (Qtb ), it is more valuable to route the sell order to the ask queue → Liquidity
Consumer (LC) order• If v (Qta , Qtb + q) < pbuy (Qta ), it is more valuable to route the buy order to the bid queue → Liquidity Provider(LP) order———————————————————————————• Notations of the routing decisions:⊕Rbuy(v , Qta , Qtb + q) := 1v (Q a ,Q b +q)<pbuy (Q a ) , LP buy order
t

t

t

⊕
Rsell
(u, Qta + q, Qtb ) := 1u(Q a +q,Q b )>psell (Q b ) , LP sell order
t

t

t

⊕
(Qta, Qtb), LC buy order
Rbuy (Qta, Qtb) := 1 − Rbuy⊕
Rsell (Qta, Qtb) := 1 − Rsell(Qta, Qtb), LC sell order is processed

CA Lehalle (Cours Bachelier, 2016)

54 / 73

The Model in Detail
The 2D mean field is the size of the two queues (Qta , Qtb ); it evolves according to the forward dynamics (j, k , `are strategic ask providing, strategic ask consuming, and blind ask consuming agents):
λdQta = dNt sell

(j)

λ

⊕
Rsell
(j) −(dNt buy| {z }δj(k )λ− (`) Rbuy (k ) +dNt
| {z }) q,δk

and for the cost function at the ask:q buy aqλ (k )λ− (`)
u
a
b
J
(Q
−
q,
Q
)
(dNt buy Rbuy (k ) +dNt
dJ u (Q a , Q b ) =
p
(Q
)
+
1
−
) − ca q dt.
Qa
Qa| {z }δk

RT
Again, with T large enough, u(Qa , Qb ) = E t=0
J(Qta , Qtb ) dt given Q0a = Qa , Q0b = Qb , andU (Qa , Qb ) :=max δ i u(Qa , Qb ) + (1 − δ i )psell (Q b ).

δ i ∈{0,1}

The control δ i is thus the result of a backward process.
CA Lehalle (Cours Bachelier, 2016)

55 / 73Equation of a Seller Utility Functionu(Qta , Qtb )=(1 − λbuy dt − λsell dt − 2λ− dt) u(Qta , Qtb )+(λsell Rsell (u, Qta + q, Qtb ) + λ− )dt u(Qta , Qtb − q)⊕
+ λsell Rsell(u, Qta + q, Qtb )dt u(Qta + q, Qtb )+(λbuy Rbuy (v , Qta , Qtb + q) + λ− )dt · [qq buy ap (Qt ) + (1 − a ) u(Qta − q, Qtb )]
Qta
Qt
{z
}
{z
}
|
|
trade part (ask)removing (ask)⊕+ λbuy Rbuy
(v , Qta , Qtb + q)dt u(Qta , Qtb + q)
− ca q dt.

← nothing← sell order, LC← sell order, LP← buy order, LC← buy order, LP← waiting cost

And symmetrical dynamics for a buyer utility function.

CA Lehalle (Cours Bachelier, 2016)56 / 73

Why this Model is Important?

It provides a way to compute the utility function of a trader in the book:I

For the owner of a limit order, just write the equation a non stationarized way, you obtain the dynamics of theutility function. Add a terminal condition (the limit order is executed) and you can write an optimal strategy
for a limit order.

I

For the owner of a market order, should it be better to wait inside the book? just read the stationarized utility
function.

I

and you can elaborate...

CA Lehalle (Cours Bachelier, 2016)57 / 73

First order expansion for small q• Symmetric case: ca = cb = c• Simpler notations: x := Qa and y := Qb

First Order Equations
1
0 = [(λRb +λ−) (pb (x)−u)−c] + [λRs⊕ −λRb −λ− ] · (∂x u +∂y u)
x
1
0 = [(λRs +λ−) (ps (y )−v )+c] + [λRs⊕ −λRb −λ− ] · (∂x u +∂y u)yGeneral form: shared risk MFG where m := (x, y ) ∈ R2

0 = βa (u, v , x, y ) + α(u, v , x, y )(∂x u + ∂y u)
0 = βb (u, v , x, y ) + α(u, v , x, y )(∂x v + ∂y v )CA Lehalle (Cours Bachelier, 2016)

58 / 73

Four regions

Four mixes of LC and/or LP agents:
Sellers and buyers are Liquidity Providers
R ++= {(x, y ), Rs⊕ (x, y ) = Rb⊕ (x, y ) = 1},
Sellers and buyers are Liquidity Consumers
R −−= {(x, y ), Rs (x, y ) = Rb (x, y ) = 1},
Sellers provide liquidity and buyers consume it
R +−= {(x, y ), Rs⊕ (x, y ) = Rb (x, y ) = 1},
Sellers consume liquidity and buyers provide it
R −+= {(x, y ), Rs (x, y ) = Rb⊕ (x, y ) = 1}.

CA Lehalle (Cours Bachelier, 2016)59 / 73

(Anti)Symmetry and 1st Order Analysis (1)

Lemma
⊕
⊕
∀x, y , Rsell(u, x, y ) = Rbuy
(2P − v , y , x)

And as a direct consequence, if there is a unique solution (u, v ) to the previous system, then∀x, y , u(x, y ) + P = P − v (y , x).
I

The characteristic lines of the solutions to the system have the form y = x + k

IThanks to the lemma: we solve the equations along the characteristics, only on the region y ≤ x (samereasoning on y ≥ x).

I

Think of small bid and ask queues on a given y = x + k , k > 0. First both buyers and sellers are LP.

CA Lehalle (Cours Bachelier, 2016)60 / 73

1st Order Analysis (2)I

As (x, y = x + k ) grow, sellers turn to be LC first,
while buyers remain LP (boundary between R ++and R −+ ). Looking at the equations, we can get
the parametric curve of points M0 = (x0 , l(x0 ))where the switch happens.
(The coeff multiplying the derivatives switches sign
+ equality in the routing decision criterium)I

We can do the same kind of reasoning for thesecond switching curve M1 , when buyers turn to be
LC (boundary between R −+ and R −− ).
(Here no sign switch. M0 is used for ODE
resolution + antisymmetry argument + equality inthe routing decision criterium)

The curves analytically computed at order 1.

CA Lehalle (Cours Bachelier, 2016)

61 / 73

1st Order Analysis (2)I

As (x, y = x + k ) grow, sellers turn to be LC first,
while buyers remain LP (boundary between R ++and R −+ ). Looking at the equations, we can get
the parametric curve of points M0 = (x0 , l(x0 ))where the switch happens.
(The coeff multiplying the derivatives switches sign
+ equality in the routing decision criterium)I

We can do the same kind of reasoning for thesecond switching curve M1 , when buyers turn to be
LC (boundary between R −+ and R −− ).
(Here no sign switch. M0 is used for ODE
resolution + antisymmetry argument + equality inthe routing decision criterium)

Computations corroborate the first order expansion ...
and show second order terms effects

CA Lehalle (Cours Bachelier, 2016)

61 / 73

Second order equations

General form
0 = βa (u, v , x, y ) + α(u, v , x, y )(∂x u + ∂y u)+ q ρ(v , x, y ))∂x u + ξ1 (u, v , x, y )∂xx u + ξ2 (u, v , x, y )∂yy u ,0 = βb (u, v , x, y ) + α(u, v , x, y )(∂x v + ∂y v )+ q ρ(2P−u, y , x))∂y v +ξ1 (u, v , x, y )∂xx v +ξ2 (u, v , x, y )∂yy v ,• where:ρ = x1 (λRb + λ− ),ξ1 = (λ(Rs⊕ +Rb ) + λ− )/2, and ξ2 = (λ(Rs +Rb⊕ ) + λ− )/2.
———————————————————————
Now, we use this toolbox to model various markets...

CA Lehalle (Cours Bachelier, 2016)62 / 73

Results

In the paper, we use this framework to study:

CA Lehalle (Cours Bachelier, 2016)I

the equilibrium with one type of agents: Stable liquidity
imbalance states are possible.

I

When another type of agent is added (faster): The
imbalanced states are fewer, and the bid-ask spread (i.e.
average cost for liquidity consumers) decreases. But its
decrease is in favour of the faster traders .

IThe results are compatible with empirical studies([Gareche et al., 2013], [Huang et al., 2015b]).

63 / 73

Results

In the paper, we use this framework to study:

CA Lehalle (Cours Bachelier, 2016)I

the equilibrium with one type of agents: Stable liquidity
imbalance states are possible.

I

When another type of agent is added (faster): The
imbalanced states are fewer, and the bid-ask spread (i.e.
average cost for liquidity consumers) decreases. But its
decrease is in favour of the faster traders .

IThe results are compatible with empirical studies([Gareche et al., 2013], [Huang et al., 2015b]).

63 / 73

Conclusion on MFG Modelling

Mean Field Games seems to be an adequate framework to model the controlled dynamics of the orderbooks
I

It needed to identify carefully the intensives of agents,Ifor simplicity, we modelled pro-rata rules, but it could be extended,I

we obtain results that are in line with empirical observations.

Iin the paper, we derive results about the effect of mixing time scales in the same orderbooks.

Iin another paper [Lehalle et al., 2010] we attempt to introduce MFG at a largest time scale (i.e. once aparticipant traded, he needs to unwind this position). In this other model we introduced the idea of “latent
orderbook” (i.e. our mean field: the aggregation of the views of all market participants).

I

There is another paper using MFG at an intermediate time scale to design kind of “robust” optimal trading
for liquidation [Jaimungal and Nourian, 2015].

CA Lehalle (Cours Bachelier, 2016)64 / 73

Outcomes of the MFG Model

The Liquidity GameI

It is possible to write properly the value of one limit order in a book (and to obtain its stationarized value);I

In the MFG model, liquidity imbalance can be stable, it is in contradiction to the worst kept secret of
HFTs;

I

But if we mix trading speeds, no imbalance is stable anymore.

⇒ It is like orderbook dynamics alternate between two statesIa liquidity game, during which traders compete for liquidity;I

when one of the queue is very small, every one run to be the last to capture the remaning quantity;i.e. the worst kept secret of HFT is reinforced this way.

I

just after the best queue has been fully consumed, a price game takes place: do the traders accept the newprice or let the current sizes of the queues drive mean reversion?

Traders look at “exogenous” information to accept the new price or not: indices, Futures, news, long lasting
consuming pressure.

CA Lehalle (Cours Bachelier, 2016)65 / 73

Thank You For Your Attention

CA Lehalle (Cours Bachelier, 2016)

66 / 73References I
Agarwal, A., Bartlett, P. L., and Dama, M. (2010).
Optimal Allocation Strategies for the Dark Pool Problem.
In Teh, Y. W. and Titterington, M., editors, Proceedings of The Thirteenth International Conference on Artificial Intelligence and Statistics (AISTATS), volume 9, pages 9–16.
Aït-Sahalia, Y. and Jacod, J. (2012).
Analyzing the Spectrum of Asset Returns: Jump and Volatility Components in High Frequency Data.
Journal of Economic Literature, 50(4):1007–50.
Alfonsi, A., Fruth, A., and Schied, A. (2009).
Optimal execution strategies in limit order books with general shape functions.
Quantitative Finance, 10(2):143–157.
Almgren, R. (2009).
Optimal Trading in a Dynamic Market.
Technical Report 2.
Almgren, R. and Lorenz, J. (2007).
Algorithmic Trading III: Precision, Control, Execution.
Institutional Investor Journals.
Almgren, R. F. and Chriss, N. (2000).
Optimal execution of portfolio transactions.
Journal of Risk, 3(2):5–39.
Bacry, E., Iuga, A., Lasnier, M., and Lehalle, C.-A. (2015a).
Market Impacts and the Life Cycle of Investors Orders.
Market Microstructure and Liquidity, 1(2).

CA Lehalle (Cours Bachelier, 2016)

67 / 73References II
Bacry, E., Mastromatteo, I., and Muzy, J.-F. (2015b).
Hawkes Processes in Finance.
Market Microstructure and Liquidity, 01(01):1550005.
Bertsimas, D. and Lo, A. W. (1998).
Optimal control of execution costs.
Journal of Financial Markets, 1(1):1–50.
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.
Brogaard, J., Hendershott, T. J., and Riordan, R. (2012).
High Frequency Trading and Price Discovery.
Technical report, Berkeley University.
Brokmann, X., Serie, E., Kockelkoren, J., and Bouchaud, J. P. (2014).
Slow decay of impact in equity markets.
Cardaliaguet, P. and Lehalle, C.-A. (2016).
Mean Field Game of Controls and An Application To Trade Crowding.
Cartea, A., Donnelly, R. F., and Jaimungal, S. (2013).
Algorithmic Trading with Model Uncertainty.
Social Science Research Network Working Paper Series.
Cartea, A. and Jaimungal, S. (2014).
A Closed-Form Execution Strategy to Target VWAP.
Social Science Research Network Working Paper Series.

CA Lehalle (Cours Bachelier, 2016)

68 / 73References III

Cartea, A., Jaimungal, S., and Penalva, J. (2015).
Algorithmic and High-Frequency Trading (Mathematics, Finance and Risk).
Cambridge University Press, 1 edition.
Çetin, U. and Danilova, A. (2015).
Markovian Nash equilibrium in financial markets with asymmetric information and related forward-backward systems.
Dayri, K. and Rosenbaum, M. (2015).
Large Tick Assets: Implicit Spread and Optimal Tick Size.
Market Microstructure and Liquidity, 01(01):1550003.
Doukhan, P. (1994).
Mixing: Properties and Examples (Lecture Notes in Statistics).
Springer, 1 edition.
Foucault, T. and Menkveld, A. J. (2008).
Competition for Order Flow and Smart Order Routing Systems.
The Journal of Finance, 63(1):119–158.
Ganchev, K., Nevmyvaka, Y., Kearns, M., and Vaughan, J. W. (2010).
Censored exploration and the dark pool problem.
Commun. ACM, 53(5):99–107.
Gareche, A., Disdier, G., Kockelkoren, J., and Bouchaud, J.-P. (2013).
A Fokker-Planck description for the queue dynamics of large tick stocks.
Phys. Rev. E, 88(3):32809–32820.

CA Lehalle (Cours Bachelier, 2016)

69 / 73References IV
Gatheral, J., Schied, A., and Slynko, A. (2012).
Transient Linear Price Impact and Fredholm Integral Equations.
Mathematical Finance, 22:445–474.
Guéant, O. (2016).
The Financial Mathematics of Market Liquidity: From Optimal Execution to Market Making.
Chapman and Hall/CRC.
Guéant, O. and Lehalle, C.-A. (2015).
General intensity shapes in optimal liquidation.
Mathematical Finance, 25(3):457–495.
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.
Guéant, O., Lehalle, C.-A., and Fernandez-Tapia, J. (2013).
Dealing with the inventory risk: a solution to the market making problem.
Mathematics and Financial Economics, 4(7):477–507.
Guéant, O. and Pu, J. (2013).
Option pricing and hedging with execution costs and market impact.
Hayashi, T. and Yoshida, N. (2005).
On Covariance Estimation of Non-synchronously Observed Diffusion Processes.
Bernoulli, 11(2):359–379.
Hirsch, M. W. and Smith, H. (2005).
Monotone dynamical systems, volume 2, pages 239–357.

CA Lehalle (Cours Bachelier, 2016)70 / 73References V

Huang, W., Lehalle, C.-A., and Rosenbaum, M. (2015a).
How to predict the consequences of a tick value change? Evidence from the Tokyo Stock Exchange pilot program.
Huang, W., Lehalle, C.-A., and Rosenbaum, M. (2015b).
Simulating and analyzing order book data: The queue-reactive model.
Journal of the American Statistical Association, 10(509).
Jaimungal, S. and Nourian, M. (2015).
Mean-Field Game Strategies for a Major-Minor Agent Optimal Execution Problem.
Social Science Research Network Working Paper Series.
Kushner, H. J. and Yin, G. G. (2003).
Stochastic Approximation and Recursive Algorithms and Applications (Stochastic Modelling and Applied Probability) (v. 35).
Springer, 2nd edition.
Kyle, A. P. (1985).
Continuous Auctions and Insider Trading.
Econometrica, 53(6):1315–1335.
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).
Lachapelle, A., Lasry, J.-M., Lehalle, C.-A., and Lions, P.-L. (2016).
Efficiency of the Price Formation Process in Presence of High Frequency Participants: a Mean Field Game analysis.
Mathematics and Financial Economics, 10(3):223–262.

CA Lehalle (Cours Bachelier, 2016)

71 / 73References VI

Lehalle, C.-A. (2008).
Rigorous optimisation of intra day trading.
Wilmott Magazine.
Lehalle, C.-A. (2013).
Market Microstructure knowledge needed to control an intra-day trading process.
In Fouque, J.-P. and Langsam, J., editors, Handbook on Systemic Risk. Cambridge University Press.
Lehalle, C.-A., Guéant, O., and Razafinimanana, J. (2010).
High Frequency Simulations of an Order Book: a Two-Scales Approach.
In Abergel, F., Chakrabarti, B. K., Chakraborti, A., and Mitra, M., editors, Econophysics of Order-Driven Markets, New Economic Windows. Springer.
Lehalle, C.-A., Laruelle, S., Burgot, R., Pelin, S., and Lasnier, M. (2013).
Market Microstructure in Practice.
World Scientific publishing.
Lehalle, C.-A., Lasnier, M., Bessson, P., Harti, H., Huang, W., Joseph, N., and Massoulard, L. (2012).
What does the saw-tooth pattern on US markets on 19 July 2012 tell us about the price formation process.
Technical report, Crédit Agricole Cheuvreux Quant Note.
Li, T. M. and Almgren, R. (2014).
Option Hedging with Smooth Market Impact.
Technical report.
Moro, E., Vicente, J., Moyano, L. G., Gerig, A., Farmer, D. J., Vaglica, G., Lillo, F., and Mantegna, R. N. (2009).
Market impact and trading profile of large trading orders in stock markets.

CA Lehalle (Cours Bachelier, 2016)

72 / 73References VII
Pagès, G., Lapeyre, B., and Sab, K. (1990).
Sequences with low discrepancy. Generalization and application to Robbins-Monro algorithm.
Statistics, 21(2):251–272.
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.
Robert, C. Y. and Rosenbaum, M. (2011).
A New Approach for the Dynamics of Ultra-High-Frequency Data: The Model with Uncertainty Zones.
Journal of Financial Econometrics, 9(2):344–366.
Roşu, I. (2009).
A Dynamic Model of the Limit Order Book.
Review of Financial Studies, 22(11):4601–4641.
Schied, A. and Zhang, T. (2013).
A state-constrained differential game arising in optimal portfolio liquidation.
Smith, E., Farmer, D. J., Gillemot, L., and Krishnamurthy, S. (2003).
Statistical Theory of the Continuous Double Auction.
Quantitative Finance, 3(6):481–514.
Waelbroeck, H. and Gomes, C. (2013).
Is Market Impact a Measure of the Information Value of Trades? Market Response to Liquidity vs. Informed Trades.
Social Science Research Network Working Paper Series.
Wyart, M., Bouchaud, J.-P., Kockelkoren, J., Potters, M., and Vettorazzo, M. (2008).
Relation between Bid-Ask Spread, Impact and Volatility in Double Auction Markets.
Technical Report 1.

CA Lehalle (Cours Bachelier, 2016)

73 / 73