Slides Market Microstructure
Slides Market Microstructure
Slides Market Microstructure
Olivier Guéant
Market Microstructure: The CFM-Imperial Workshop – 11/12/2023
1
A journey through market
making: from solving equations
to helping practitionners
Introduction to market making
2
Introduction to market making
Market makers
2
Introduction to market making
Market makers
• Activity: providing bid and ask/offer prices to other market
participants.
2
Introduction to market making
Market makers
• Activity: providing bid and ask/offer prices to other market
participants.
• The way they make money: capturing part of the bid-ask spreads.
2
Introduction to market making
Market makers
• Activity: providing bid and ask/offer prices to other market
participants.
• The way they make money: capturing part of the bid-ask spreads.
• Risks:
2
Introduction to market making
Market makers
• Activity: providing bid and ask/offer prices to other market
participants.
• The way they make money: capturing part of the bid-ask spreads.
• Risks:
• Holding inventory
2
Introduction to market making
Market makers
• Activity: providing bid and ask/offer prices to other market
participants.
• The way they make money: capturing part of the bid-ask spreads.
• Risks:
• Holding inventory
→ face the risk that prices move adversely without them being able
to unwind their position.
2
Introduction to market making
Market makers
• Activity: providing bid and ask/offer prices to other market
participants.
• The way they make money: capturing part of the bid-ask spreads.
• Risks:
• Holding inventory
→ face the risk that prices move adversely without them being able
to unwind their position.
• Information asymmetry / adverse selection by informed traders
2
Introduction to market making
Market makers
• Activity: providing bid and ask/offer prices to other market
participants.
• The way they make money: capturing part of the bid-ask spreads.
• Risks:
• Holding inventory
→ face the risk that prices move adversely without them being able
to unwind their position.
• Information asymmetry / adverse selection by informed traders
→ face the risk of buying / selling when the price will go down / up.
2
Introduction to market making
Market makers
• Activity: providing bid and ask/offer prices to other market
participants.
• The way they make money: capturing part of the bid-ask spreads.
• Risks:
• Holding inventory
→ face the risk that prices move adversely without them being able
to unwind their position.
• Information asymmetry / adverse selection by informed traders
→ face the risk of buying / selling when the price will go down / up.
Remark: The talk is mainly about market making in OTC markets. Not
market making in limit order books (no tick size, no queue, no priority).
2
The early literature
3
The early literature
Models regarding inventory cost / management
3
The early literature
Models regarding inventory cost / management
3
The early literature
Models regarding inventory cost / management
3
The early literature
Models regarding inventory cost / management
4
Overview of my journey
The roots
4
Overview of my journey
The roots
• Post-PhD inspiration (2010): met C.-A. Lehalle at Crédit Agricole
Cheuvreux who introduced me to Avellaneda-Stoikov (A-S) paper.
4
Overview of my journey
The roots
• Post-PhD inspiration (2010): met C.-A. Lehalle at Crédit Agricole
Cheuvreux who introduced me to Avellaneda-Stoikov (A-S) paper.
• Initial focus and mathematical results: Solved the PDEs of A-S (one
asset) + provided closed-form approximations of optimal quotes –
initially as a theoretical / mathematical exercise.
4
Overview of my journey
The roots
• Post-PhD inspiration (2010): met C.-A. Lehalle at Crédit Agricole
Cheuvreux who introduced me to Avellaneda-Stoikov (A-S) paper.
• Initial focus and mathematical results: Solved the PDEs of A-S (one
asset) + provided closed-form approximations of optimal quotes –
initially as a theoretical / mathematical exercise.
4
Overview of my journey
The roots
• Post-PhD inspiration (2010): met C.-A. Lehalle at Crédit Agricole
Cheuvreux who introduced me to Avellaneda-Stoikov (A-S) paper.
• Initial focus and mathematical results: Solved the PDEs of A-S (one
asset) + provided closed-form approximations of optimal quotes –
initially as a theoretical / mathematical exercise.
4
Overview of my journey
The roots
• Post-PhD inspiration (2010): met C.-A. Lehalle at Crédit Agricole
Cheuvreux who introduced me to Avellaneda-Stoikov (A-S) paper.
• Initial focus and mathematical results: Solved the PDEs of A-S (one
asset) + provided closed-form approximations of optimal quotes –
initially as a theoretical / mathematical exercise.
4
The Avellaneda-Stoikov
framework (revisited with more
recent results)
Setup of the model (I)
dSt = σdWt .
5
Setup of the model (II)
6
Setup of the model (II)
6
Setup of the model (II)
6
Setup of the model (II)
6
Setup of the model (III)
7
Setup of the model (III)
dXt = ∆Sta dNta − ∆Stb dNtb = −St dqt + δta ∆dNta + δtb ∆dNtb .
7
Setup of the model (III)
dXt = ∆Sta dNta − ∆Stb dNtb = −St dqt + δta ∆dNta + δtb ∆dNtb .
7
PnL and objective function
PnLT = XT + qT ST = X0 + q0 S0
Z T
+ δ a ∆dNta + δtb ∆dNtb + σqt dWt
0 |t {z } | {z }
spread capture inventory+price risk
8
PnL and objective function
PnLT = XT + qT ST = X0 + q0 S0
Z T
+ δ a ∆dNta + δtb ∆dNtb + σqt dWt
0 |t {z } | {z }
spread capture inventory+price risk
8
PnL and objective function
9
PnL and objective function
i.e.
Z T γ 2 2
sup E ∆δta Λa (δta )1qt− >−Q + ∆δtb Λb (δtb )1qt− <Q − σ qt dt
(δta )t ,(δtb )t ∈A 0 2
9
PnL and objective function
i.e.
Z T γ 2 2
sup E ∆δta Λa (δta )1qt− >−Q + ∆δtb Λb (δtb )1qt− <Q − σ qt dt
(δta )t ,(δtb )t ∈A 0 2
9
Value function θ (Model B)
10
Value function θ (Model B)
10
Value function θ (Model B)
A Legendre-like transform
10
Comments on the equations
11
Comments on the equations
11
Comments on the equations
11
Comments on the equations
11
Comments on the equations
1. Λb/a is C 2 .
0
2. Λb/a < 0.
3. limδ→+∞ Λb/a (δ) = 0.
4. The intensity functions Λb/a satisfy:
00
Λb/a (δ)Λb/a (δ)
sup 2 < 2.
δ 0
Λb/a (δ)
11
Solution of the initial problem – B (verification argument)
12
Solution of the initial problem – B (verification argument)
12
Closed-form approximations – Model B
13
Closed-form approximations – Model B
13
Closed-form approximations – Model B
13
Closed-form approximations – Model B
r r
b∗ 1 2q + ∆ γσ 2 e a∗ 1 2q − ∆ γσ 2 e
δ∞ (q) ' + δ∞ (q) ' −
k 2 2kA∆ k 2 2kA∆
13
Closed-form approximations – Model B
r r
b∗ 1 2q + ∆ γσ 2 e a∗ 1 2q − ∆ γσ 2 e
δ∞ (q) ' + δ∞ (q) ' −
k 2 2kA∆ k 2 2kA∆
13
Extensions I
Extensions I
14
Extensions I
14
Extensions I
14
Extensions I
14
Extensions I
14
Extensions I
14
Extensions I
14
Extensions I
15
Extensions I
15
Extensions I
15
Extensions I
15
Extensions I
15
Extensions I
15
Extensions I
15
A first model for the FX market
Organization of the FX market (Schrimpf-Sushko)
16
Organization of the FX market (Schrimpf-Sushko)
RFSs and RFQs (D2C) and access to multiple platforms (D2D and
all-to-all)
16
Organization of the FX market (Schrimpf-Sushko)
RFSs and RFQs (D2C) and access to multiple platforms (D2D and
all-to-all) → dealers can internalize or externalize the flow.
16
The internalization-externalization dilemma (S.-S.)
17
The internalization-externalization dilemma (S.-S.)
17
A model with client tiering and multiple sizes
dSt = σdWt
XN Z
dqt = zJ b,n (ds, dz) − zJ a,n (ds, dz)
n=1 R∗
+
| {z }
client flow from tier n
N Z
X
dXt = −St dqt + zδ a,n (t, z)J a,n (dt, dz) + zδ b,n (t, z)J b,n (dt, dz)
n=1 R∗
+
| {z }
spread capture
18
The model
State variables: Equations with externalization (like in
Almgren-Chriss)
N Z
X
dXt = −St dqt + zδ a,n (t, z)J a,n (dt, dz) + zδ b,n (t, z)J b,n (dt, dz)
n=1 R∗
+
19
The model
State variables: Equations with externalization (like in
Almgren-Chriss)
N Z
X
dXt = −St dqt + zδ a,n (t, z)J a,n (dt, dz) + zδ b,n (t, z)J b,n (dt, dz)
n=1 R∗
+
Objective function
" #
Z T
γ
E XT + qT ST − σ 2 qt2 dt .
2 0
19
Estimating intensities: tiering
Tiering
1.0
0.8
25
Normalized Intensity
0.6 20
( bps 1 )
15
0.4
10
1
5
0.2
0
4 3 2 1 0 1 2
1
0.0
1.25 1.00 0.75 0.50 0.25 0.00 0.25 0.50 0.75
(bps)
1
Λb/a,n (δ, z) = λb/a,n (z)f b/a,n (δ) = λb/a,n (z)
1+ exp(αb/a,n + β b/a,n δ)
20
HJB equation
where
21
Solution of the control problem
Optimal controls
b,n∗ b,n∗ θ(t, qt− ) − θ(t, qt− + z)
δ (t, z) = δ̄
z
a,n∗ a,n∗ θ(t, qt− ) − θ(t, qt− − z)
δ (t, z) = δ̄
z
where
−1 0
δ̄ b/a,n∗ (p) = f b/a,n (z, ·) −H b/a,n (p) ,
and
vt∗ = H0 (∂q θ(t, qt− ) + kqt− ) .
22
Optimal quotes and execution rate
0.50
0.2
Bid and Ask Quotes (bps)
Execution Rate ( M s 1)
0.25 Tier 2 Optimal Ask Ladder
0.00 0.0
0.25
Tier 1 Optimal Bid Ladder Optimal Execution Rate
0.2
0.50
0.75
0.4
1.00
100 75 50 25 0 25 50 75 100
Inventory ( M)
23
Optimal quotes and execution rate
1.0
14
0.8 12
0.6
8
0.4 6
4
0.2
2
0.0 0
= 10 4 = 10 3 = 10 2 = 10 1
24
Optimal risk/reward curve
12
10
P&L ($K)
5 10 15 20 25 30
Risk ($K)
25
Extensions II
Extensions II
26
Extensions II
26
Extensions II
26
Extensions II
26
Extensions II
26
Extensions II
26
Extensions II
26
Extensions II
27
Extensions II
27
Extensions II
27
Extensions II
27
Extensions II
27
Regarding extensions
28
Regarding extensions
28
Regarding extensions
28
Regarding extensions
28
Regarding extensions
28
Regarding extensions
28
A model for multi-currency
market making
A model for multi-currency market making
29
A model for multi-currency market making
I present here the model we wrote with P. Bergault (Risk rising star
award) and A. Barzykin.
29
A model for multi-currency market making
I present here the model we wrote with P. Bergault (Risk rising star
award) and A. Barzykin.
29
A model for multi-currency market making
I present here the model we wrote with P. Bergault (Risk rising star
award) and A. Barzykin.
29
A model for multi-currency market making
I present here the model we wrote with P. Bergault (Risk rising star
award) and A. Barzykin.
29
A model for multi-currency market making
I present here the model we wrote with P. Bergault (Risk rising star
award) and A. Barzykin.
29
A model for multi-currency market making
I present here the model we wrote with P. Bergault (Risk rising star
award) and A. Barzykin.
now multiplicative (in bps) and Λn,i,j (z, δ) = λn,i,j (z)f n,i,j (z, δ) with
1
f n,i,j (z, δ) = αn,i,j (z)+β n,i,j (z)δ
.
1+e
29
A model for multi-currency market making
30
A model for multi-currency market making
30
A model for multi-currency market making
• Possibility to externalize
on the D2D segment of the market. → for
i,j
i < j, process ξt modeling the amount (expressed in
t∈[0,T ]
reference currency) per unit of time of currency i bought by the
dealer and paid in currency j.
30
A model for multi-currency market making
• Possibility to externalize
on the D2D segment of the market. → for
i,j
i < j, process ξt modeling the amount (expressed in
t∈[0,T ]
reference currency) per unit of time of currency i bought by the
dealer and paid in currency j.
i,j
• Execution costs: Li,j (ξ) = ψ i,j |ξ| + η i,j |ξ|1+φ .
30
A model for multi-currency market making
• Possibility to externalize
on the D2D segment of the market. → for
i,j
i < j, process ξt modeling the amount (expressed in
t∈[0,T ]
reference currency) per unit of time of currency i bought by the
dealer and paid in currency j.
i,j
• Execution costs: Li,j (ξ) = ψ i,j |ξ| + η i,j |ξ|1+φ .
N X
d Z
X z
dqti J n,i,j (dt, dz) − J n,j,i (dt, dz)
= i
n=1 j=1 z∈R∗
+
St
j6=i
d i,j i−1 j,i
X ξt
X ξ t
+ − dt.
Si
j=i+1 t j=1
Sti
30
A model for multi-currency market making
Dynamics of the account where fees and execution costs are accounted
for in reference currency:
N
X X Z
dXt = zδ n,i,j (t, z)J n,i,j (dt, dz)
n=1 1≤i6=j≤d z∈R∗
+
X
− Li,j ξti,j .
1≤i<j≤d
31
A model for multi-currency market making
Dynamics of the account where fees and execution costs are accounted
for in reference currency:
N
X X Z
dXt = zδ n,i,j (t, z)J n,i,j (dt, dz)
n=1 1≤i6=j≤d z∈R∗
+
X
− Li,j ξti,j .
1≤i<j≤d
31
A model for multi-currency market making
Writing all inventories in reference currency terms, i.e. Yti t∈[0,T ]
=
qti Sti t∈[0,T ] , we get
d
X i−1
X
dYti = µit Yt−
i
dt + σ i Yt−
i
dWti + k i ξti,j − ξtj,i Yt−
i
dt
j=i+1 j=1
N X
X d Z
z J n,i,j (dt, dz) − J n,j,i (dt, dz)
+
n=1 j=1 z∈R∗
+
j6=i
d
X i−1
X
+ ξti,j − ξtj,i dt.
j=i+1 j=1
32
Optimization problem
33
HJB equation
N
θ(t, y ) − θ(t, y + ze i − ze j )
X X
+ zH n,i,j z, λn,i,j (z)dz
z
n=1 1≤i6=j≤d
R∗
+
X
+ Hi,j ∂y i θ(t, y ) − ∂y j θ(t, y )
1≤i<j≤d
+k i y i 1 + ∂y i θ(t, y ) − k j y j 1 + ∂y j θ(t, y ) ,
with θ(T , y ) = 0,
34
HJB equation
N
θ(t, y ) − θ(t, y + ze i − ze j )
X X
+ zH n,i,j z, λn,i,j (z)dz
z
n=1 1≤i6=j≤d
R∗
+
X
+ Hi,j ∂y i θ(t, y ) − ∂y j θ(t, y )
1≤i<j≤d
+k i y i 1 + ∂y i θ(t, y ) − k j y j 1 + ∂y j θ(t, y ) ,
i,j
H : p ∈ R 7→ sup pξ − Li,j (ξ).
ξ
34
Optimal strategy
Optimal pricing
θ(t, Yt− ) − θ(t, Yt− + ze i − ze j )
δ n,i,j∗ (t, z) = δ̄ n,i,j z,
z
with δ̄ n,i,j (z, p) = (f n,i,j )−1 −∂p H n,i,j (z, p) .
35
Optimal strategy
Optimal pricing
θ(t, Yt− ) − θ(t, Yt− + ze i − ze j )
δ n,i,j∗ (t, z) = δ̄ n,i,j z,
z
with δ̄ n,i,j (z, p) = (f n,i,j )−1 −∂p H n,i,j (z, p) .
35
Numerical approximation
36
Numerical approximation
36
Numerical approximation
36
Numerical approximation
36
Numerical approximation
36
Numerical approximation
36
Numerical approximation
36
Numerical approximation
36
Numerical approximation
36
Numerical approximation
36
Numerical approximation
θ(t, y ) − θ(t, y + z) θ(t, y ) − θ(t, y − z)
Hb + Ha
z z
H b (p) + H a (−p)
H b(p) H a( p) H b(p) + H a( p)
6.0
5 5
5.5
4 4 5.0
4.5
3 3
4.0
2 2 3.5
3.0
1 1
2.5
0 0 2.0
1.00 0.75 0.50 0.25 0.00 0.25 0.50 0.75 1.00 1.00 0.75 0.50 0.25 0.00 0.25 0.50 0.75 1.00 1.00 0.75 0.50 0.25 0.00 0.25 0.50 0.75 1.00
37
Optimal quotes and execution rate
0.5
0.0
0.5
1.0
1.5
2.0
100 75 50 25 0 25 50 75 100
GBP Inventory (M$)
38
Optimal quotes and execution rate
GBPCHF
0.2 EURJPY
EURCHF
EURGBP
0.0
1.0
EUR GBP CHF JPY
0.8
0.2
0.6
0.4
0.2
0.4
0.0
JPY CHF GBP EUR
100 75 50 25 0 25 50 75 100
EUR Inventory (M$)
39
Optimal risk/reward curve
20
10
EUR Inventory (M$)
10
20
30
30 20 10 0 10 20 30
GBP Inventory (M$)
40
Example (video)
41
General conclusion
General conclusion
Final remarks
42
General conclusion
Final remarks
• Market making models are important for OTC markets.
42
General conclusion
Final remarks
• Market making models are important for OTC markets.
• Many effects need better models (adverse selection, information
leakage (skew), etc.).
42
General conclusion
Final remarks
• Market making models are important for OTC markets.
• Many effects need better models (adverse selection, information
leakage (skew), etc.).
• Finding a way to tackle more effects in high dimensions.
42
General conclusion
Final remarks
• Market making models are important for OTC markets.
• Many effects need better models (adverse selection, information
leakage (skew), etc.).
• Finding a way to tackle more effects in high dimensions.
• Work on mid-prices in OTC markets (filtering).
42
General conclusion
Final remarks
• Market making models are important for OTC markets.
• Many effects need better models (adverse selection, information
leakage (skew), etc.).
• Finding a way to tackle more effects in high dimensions.
• Work on mid-prices in OTC markets (filtering).
• Research on AMMs is very active (Paris, Berkeley, UK, etc.) →
interesting even beyond cryptos.
42
The End
43