Slides Market Microstructure

Download as pdf or txt
Download as pdf or txt
You are on page 1of 147

Market Making and Inventory Management

Models: Where do we Stand?

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

• Stoll (1978) • Amihud and Mendelson (1980)


• Ho and Stoll (1981, 1983) • O’Hara and Oldfield (1986)

3
The early literature
Models regarding inventory cost / management

• Stoll (1978) • Amihud and Mendelson (1980)


• Ho and Stoll (1981, 1983) • O’Hara and Oldfield (1986)

Models regarding adverse selection

• Copeland and Galai (1983)


• Glosten and Milgrom (1985)
• Easley and O’Hara (1987)

3
The early literature
Models regarding inventory cost / management

• Stoll (1978) • Amihud and Mendelson (1980)


• Ho and Stoll (1981, 1983) • O’Hara and Oldfield (1986)

Models regarding adverse selection

• Copeland and Galai (1983)


• Glosten and Milgrom (1985)
• Easley and O’Hara (1987)

An economic literature about the determinants of bid-ask spreads in the


1980s and 1990s: Hasbrouck, Huang and Stoll, MRR, etc.

3
The early literature
Models regarding inventory cost / management

• Stoll (1978) • Amihud and Mendelson (1980)


• Ho and Stoll (1981, 1983) • O’Hara and Oldfield (1986)

Models regarding adverse selection

• Copeland and Galai (1983)


• Glosten and Milgrom (1985)
• Easley and O’Hara (1987)

An economic literature about the determinants of bid-ask spreads in the


1980s and 1990s: Hasbrouck, Huang and Stoll, MRR, etc.

The financial mathematics community only got interested in


market making from 2008 following the paper by Avellaneda and
Stoikov.
3
Overview of my journey

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.

Multiple interactions with the industry

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.

Multiple interactions with the industry


• OTC trading (neglected area of academic research): Contacted by
bond dealers in London and NYC, by FX dealers (Sasha here in
London), for adapting models to match real-world trading
environments.

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.

Multiple interactions with the industry


• OTC trading (neglected area of academic research): Contacted by
bond dealers in London and NYC, by FX dealers (Sasha here in
London), for adapting models to match real-world trading
environments.
• DeFi: Recently contacted by decentralized finance players to build
new Automated Market Makers.

4
The Avellaneda-Stoikov
framework (revisited with more
recent results)
Setup of the model (I)

One asset: reference price process (“mid”-price) (St )t

dSt = σdWt .

→ Can be the CBBT / CP+ for corporate bonds or a homemade


reference price.
→ Can be EBS / Refinitiv mid price or a homemade composite.

5
Setup of the model (II)

6
Setup of the model (II)

• Bid and ask prices of the MM denoted respectively by

Stb = St − δtb and Sta = St + δta .

6
Setup of the model (II)

• Bid and ask prices of the MM denoted respectively by

Stb = St − δtb and Sta = St + δta .

• Point processes N b and N a for the transactions (size ∆).


→ Inventory (qt )t :

dqt = ∆dNtb − ∆dNta .

6
Setup of the model (II)

• Bid and ask prices of the MM denoted respectively by

Stb = St − δtb and Sta = St + δta .

• Point processes N b and N a for the transactions (size ∆).


→ Inventory (qt )t :

dqt = ∆dNtb − ∆dNta .

• Competition and demand is modeled indirecty through the


probability / intensity of jumps.

6
Setup of the model (III)

• The intensities (λbt )t and (λat )t of N b and N a depend on the


distance to the reference price:

λbt = Λb (δtb )1qt− <Q and λat = Λa (δta )1qt− >−Q .


Λb , Λa decreasing (of course!)

7
Setup of the model (III)

• The intensities (λbt )t and (λat )t of N b and N a depend on the


distance to the reference price:

λbt = Λb (δtb )1qt− <Q and λat = Λa (δta )1qt− >−Q .


Λb , Λa decreasing (of course!)

• Cash process (Xt )t :

dXt = ∆Sta dNta − ∆Stb dNtb = −St dqt + δta ∆dNta + δtb ∆dNtb .

7
Setup of the model (III)

• The intensities (λbt )t and (λat )t of N b and N a depend on the


distance to the reference price:

λbt = Λb (δtb )1qt− <Q and λat = Λa (δta )1qt− >−Q .


Λb , Λa decreasing (of course!)

• Cash process (Xt )t :

dXt = ∆Sta dNta − ∆Stb dNtb = −St dqt + δta ∆dNta + δtb ∆dNtb .

Three state variables: X (cash), q (inventory), and S (price).

7
PnL and objective function

The PnL at time T of a market maker in the above model is:

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

The PnL at time T of a market maker in the above model is:

PnLT = XT + qT ST = X0 + q0 S0
Z T
+ δ a ∆dNta + δtb ∆dNtb + σqt dWt
0 |t {z } | {z }
spread capture inventory+price risk

The original Avellaneda-Stoikov’s model considers a CARA utility:

CARA objective function (Model A)

sup E [− exp (−γ(XT + qT ST ))] ,


(δta )t ,(δtb )t ∈A

where γ is the absolute risk aversion parameter, and A the set of


predictable processes bounded from below.

8
PnL and objective function

9
PnL and objective function

Variant (Cartea, Jaimungal et al.) with a running penalty – proxy of


variance:
Expected PnL minus a quadratic running penalty (Model B –
practionners’ preferred )
" #
γ 2 T 2
Z
sup E XT + qT ST − σ qt dt
(δta )t ,(δtb )t ∈A 2 0

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

where γ is a kind of absolute risk aversion parameter.

9
PnL and objective function

Variant (Cartea, Jaimungal et al.) with a running penalty – proxy of


variance:
Expected PnL minus a quadratic running penalty (Model B –
practionners’ preferred )
" #
γ 2 T 2
Z
sup E XT + qT ST − σ qt dt
(δta )t ,(δtb )t ∈A 2 0

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

where γ is a kind of absolute risk aversion parameter.

→ Optimal control on a very simple finite graph (truncated ∆Z)

9
Value function θ (Model B)

10
Value function θ (Model B)

Hamilton-Jacobi equation (Model B)


 
1 2 2 b θ(t, q) − θ(t, q + ∆)
0 = ∂t θ(t, q) − γσ q + 1q<Q ∆H
2 ∆
 
θ(t, q) − θ(t, q − ∆)
+1q>−Q ∆H a

with final condition θ(T , q) = 0.

10
Value function θ (Model B)

Hamilton-Jacobi equation (Model B)


 
1 2 2 b θ(t, q) − θ(t, q + ∆)
0 = ∂t θ(t, q) − γσ q + 1q<Q ∆H
2 ∆
 
θ(t, q) − θ(t, q − ∆)
+1q>−Q ∆H a

with final condition θ(T , q) = 0.

A Legendre-like transform

H b (p) = sup Λb (δ)(δ − p)


δ

H (p) = sup Λa (δ)(δ − p)


a
δ

10
Comments on the equations

11
Comments on the equations

• The same family of equations appears with Model A after a change


of variables (H transforms are just more complicated).

11
Comments on the equations

• The same family of equations appears with Model A after a change


of variables (H transforms are just more complicated).
• A system of 2Q/∆ + 1 non-linear ODEs.

11
Comments on the equations

• The same family of equations appears with Model A after a change


of variables (H transforms are just more complicated).
• A system of 2Q/∆ + 1 non-linear ODEs.
• Global existence obtained with maximum principles under light
assumptions of the intensity functions:

11
Comments on the equations

• The same family of equations appears with Model A after a change


of variables (H transforms are just more complicated).
• A system of 2Q/∆ + 1 non-linear ODEs.
• Global existence obtained with maximum principles under light
assumptions of the intensity functions:

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)

By using a verification argument, we find the optimal quotes


Optimal quotes
 
θ(t, qt− ) − θ(t, qt− + ∆)
δtb∗ = δ̃ b∗

 
θ(t, qt− ) − θ(t, qt− − ∆)
δta∗ = δ̃ a∗

where
−1 0
 
δ̃ b/a∗ (p) = argmaxδ Λb/a (δ)(δ − p) = Λb/a −H b/a (p) .

12
Solution of the initial problem – B (verification argument)

By using a verification argument, we find the optimal quotes


Optimal quotes
 
θ(t, qt− ) − θ(t, qt− + ∆)
δtb∗ = δ̃ b∗

 
θ(t, qt− ) − θ(t, qt− − ∆)
δta∗ = δ̃ a∗

where
−1 0
 
δ̃ b/a∗ (p) = argmaxδ Λb/a (δ)(δ − p) = Λb/a −H b/a (p) .

Easy to obtain numerically: a monotone implicit scheme for θ and then


standard optimization techniques to get the optimal quotes.

12
Closed-form approximations – Model B

13
Closed-form approximations – Model B

• Optimal control problem with an ergodic limit (T → ∞) often


reached very rapidly in practice.

13
Closed-form approximations – Model B

• Optimal control problem with an ergodic limit (T → ∞) often


reached very rapidly in practice.
• Continuous approximation of the eigenvalue problem leads to
closed-form approximations of the quotes in Model A and B (here
we focus on B) when Λb (δ) = Λa (δ) = Ae −kδ :

13
Closed-form approximations – Model B

• Optimal control problem with an ergodic limit (T → ∞) often


reached very rapidly in practice.
• Continuous approximation of the eigenvalue problem leads to
closed-form approximations of the quotes in Model A and B (here
we focus on B) when Λb (δ) = Λa (δ) = Ae −kδ :

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

• Optimal control problem with an ergodic limit (T → ∞) often


reached very rapidly in practice.
• Continuous approximation of the eigenvalue problem leads to
closed-form approximations of the quotes in Model A and B (here
we focus on B) when Λb (δ) = Λa (δ) = Ae −kδ :

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∆

Closed-form approximations spread / skew (Model B)


r r
2 γσ 2 e γσ 2 e
spread ' + ∆ skew(q) ' 2q
k 2kA∆ 2kA∆

13
Extensions I
Extensions I

14
Extensions I

Basic ideas regarding prices

14
Extensions I

Basic ideas regarding prices


• Going from arithmetic to geometric Brownian motion (easy: just
model size in $ and not in number of securities).

14
Extensions I

Basic ideas regarding prices


• Going from arithmetic to geometric Brownian motion (easy: just
model size in $ and not in number of securities).
• Including a drift and / or price jumps (easy).

14
Extensions I

Basic ideas regarding prices


• Going from arithmetic to geometric Brownian motion (easy: just
model size in $ and not in number of securities).
• Including a drift and / or price jumps (easy).
• Including stoch. vol. models (easy but lead to a system of parabolic
PDEs in dimension depending of the number of factors).

14
Extensions I

Basic ideas regarding prices


• Going from arithmetic to geometric Brownian motion (easy: just
model size in $ and not in number of securities).
• Including a drift and / or price jumps (easy).
• Including stoch. vol. models (easy but lead to a system of parabolic
PDEs in dimension depending of the number of factors).

Natural ideas regarding price dynamics for today’s audience

14
Extensions I

Basic ideas regarding prices


• Going from arithmetic to geometric Brownian motion (easy: just
model size in $ and not in number of securities).
• Including a drift and / or price jumps (easy).
• Including stoch. vol. models (easy but lead to a system of parabolic
PDEs in dimension depending of the number of factors).

Natural ideas regarding price dynamics for today’s audience


• Modeling price by microstructural models / point processes:
→ lead to a system of PDEs with nonlocal terms.

14
Extensions I

15
Extensions I

Important practical considerations

15
Extensions I

Important practical considerations


• Multiple sizes of transactions (one quote per size): does not change
the class of equations.

15
Extensions I

Important practical considerations


• Multiple sizes of transactions (one quote per size): does not change
the class of equations.
• Multiple tiers of clients (quotes per tier): does not change the class
of equations
→ can also be useful to get signal/drift.

15
Extensions I

Important practical considerations


• Multiple sizes of transactions (one quote per size): does not change
the class of equations.
• Multiple tiers of clients (quotes per tier): does not change the class
of equations
→ can also be useful to get signal/drift.
• Doubt on the reference price: perturbation analysis. Not obvious to
filter and be time consistent.

15
Extensions I

Important practical considerations


• Multiple sizes of transactions (one quote per size): does not change
the class of equations.
• Multiple tiers of clients (quotes per tier): does not change the class
of equations
→ can also be useful to get signal/drift.
• Doubt on the reference price: perturbation analysis. Not obvious to
filter and be time consistent.
• Asymmetric long/short penalties (important for bonds).

15
Extensions I

Important practical considerations


• Multiple sizes of transactions (one quote per size): does not change
the class of equations.
• Multiple tiers of clients (quotes per tier): does not change the class
of equations
→ can also be useful to get signal/drift.
• Doubt on the reference price: perturbation analysis. Not obvious to
filter and be time consistent.
• Asymmetric long/short penalties (important for bonds).
• D2C vs. D2D (internalization vs. externalization) + market impact
on the D2D segment.

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.)

The internalization vs. externalization dilemma has to be taken into


account to build efficient algorithms.

17
A model with client tiering and multiple sizes

• In practice, the id of clients is known → client tiering (N tiers).


• Sizes are not constant and dealers propose price ladders (size is
denoted by z).

State variables: Equations with internalization only

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)

dSt = σdWt +kvt dt


XN Z
dqt = zJ b,n (ds, dz) − zJ a,n (ds, dz)+vt dt
n=1 R∗
+

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∗
+

−vt St dt − L(vt ) dt can also be done with isolated trades


| {z }
execution costs

19
The model
State variables: Equations with externalization (like in
Almgren-Chriss)

dSt = σdWt +kvt dt


XN Z
dqt = zJ b,n (ds, dz) − zJ a,n (ds, dz)+vt dt
n=1 R∗
+

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∗
+

−vt St dt − L(vt ) dt can also be done with isolated trades


| {z }
execution costs

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

A partial integro-differential equation




R  
 γ 2 2 PN b,n θ(t,q)−θ(t,q+z)
0 = ∂ θ(t, q) − σ q + zH λb,n (z)dz

t


 2 n=1 ∗ z

 R R +
 
N a,n θ(t,q)−θ(t,q−z)
λa,n (z)dz − H (∂q θ(t, q) + kq)
P

 − n=1 zH z
R∗



 +

θ(T , q) = 0,

where

H b/a,n : p ∈ R 7→ sup f b/a,n (δ)(δ − p) and H(p) := sup vp − L(v ).


δ v

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

Optimal Dealer Strategy


1.00
Pure Flow
Internalization 0.4
0.75

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

Risk Neutralization Time (min)


10
Volume Fraction

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

D2D / hedging was regarded above as in Almgren-Chriss – could also be


done with impulse control (trading a quantity at once and paying a
spread).
Detailing the sources of D2D liquidity

26
Extensions II

D2D / hedging was regarded above as in Almgren-Chriss – could also be


done with impulse control (trading a quantity at once and paying a
spread).
Detailing the sources of D2D liquidity
• Dark pool on the D2D segment: not easy to model to keep
low-dimensionality.

26
Extensions II

D2D / hedging was regarded above as in Almgren-Chriss – could also be


done with impulse control (trading a quantity at once and paying a
spread).
Detailing the sources of D2D liquidity
• Dark pool on the D2D segment: not easy to model to keep
low-dimensionality.
• LOB on the D2D segment: not easy to keep low-dimensionality.

26
Extensions II

D2D / hedging was regarded above as in Almgren-Chriss – could also be


done with impulse control (trading a quantity at once and paying a
spread).
Detailing the sources of D2D liquidity
• Dark pool on the D2D segment: not easy to model to keep
low-dimensionality.
• LOB on the D2D segment: not easy to keep low-dimensionality.

Other sources of liquidity

26
Extensions II

D2D / hedging was regarded above as in Almgren-Chriss – could also be


done with impulse control (trading a quantity at once and paying a
spread).
Detailing the sources of D2D liquidity
• Dark pool on the D2D segment: not easy to model to keep
low-dimensionality.
• LOB on the D2D segment: not easy to keep low-dimensionality.

Other sources of liquidity


• RFQ in addition to RFS: linked to pre-hedging part of your expected
flow (done with Sasha B. and Philippe B.).

26
Extensions II

D2D / hedging was regarded above as in Almgren-Chriss – could also be


done with impulse control (trading a quantity at once and paying a
spread).
Detailing the sources of D2D liquidity
• Dark pool on the D2D segment: not easy to model to keep
low-dimensionality.
• LOB on the D2D segment: not easy to keep low-dimensionality.

Other sources of liquidity


• RFQ in addition to RFS: linked to pre-hedging part of your expected
flow (done with Sasha B. and Philippe B.).
• Hedging with cointegrated assets (spot vs. futures): initially done
with Fayçal Drissi → raises the question of a multi-asset setting!

26
Extensions II

27
Extensions II

Other important extensions

27
Extensions II

Other important extensions


• Different and asymmetric liquidity regimes
→ Hawkes processes (with exponential kernel to stay Markovian)
→ Markov-modulated Poisson processes (a few liquidity states):
done with P. Bergault.

27
Extensions II

Other important extensions


• Different and asymmetric liquidity regimes
→ Hawkes processes (with exponential kernel to stay Markovian)
→ Markov-modulated Poisson processes (a few liquidity states):
done with P. Bergault.
• Better modelling of adverse selection
→ trades convey information depending on id and price (a fair deal
with a standard client may be better than a seemingly good deal
with an informed client).

27
Extensions II

Other important extensions


• Different and asymmetric liquidity regimes
→ Hawkes processes (with exponential kernel to stay Markovian)
→ Markov-modulated Poisson processes (a few liquidity states):
done with P. Bergault.
• Better modelling of adverse selection
→ trades convey information depending on id and price (a fair deal
with a standard client may be better than a seemingly good deal
with an informed client).
• Price signalling: need to model the impact of streamed prices.

27
Regarding extensions

28
Regarding extensions

Many effects can be taken into account in the one-asset case

28
Regarding extensions

Many effects can be taken into account in the one-asset case


• Important in itself.

28
Regarding extensions

Many effects can be taken into account in the one-asset case


• Important in itself.
• Important for decentralized finance
→ In 2021, 3 days before Christmas, I received an email from David
Bouba who co-founded an AMM (Swaap): a whitepaper, interesting
remarks, and an invitation to discuss with him.

28
Regarding extensions

Many effects can be taken into account in the one-asset case


• Important in itself.
• Important for decentralized finance
→ In 2021, 3 days before Christmas, I received an email from David
Bouba who co-founded an AMM (Swaap): a whitepaper, interesting
remarks, and an invitation to discuss with him.
→ Less than a year later, we released a paper to build AMM based
on price oracles or offchain reference prices (Bergault, Bertucci,
Bouba, Guéant).

28
Regarding extensions

Many effects can be taken into account in the one-asset case


• Important in itself.
• Important for decentralized finance
→ In 2021, 3 days before Christmas, I received an email from David
Bouba who co-founded an AMM (Swaap): a whitepaper, interesting
remarks, and an invitation to discuss with him.
→ Less than a year later, we released a paper to build AMM based
on price oracles or offchain reference prices (Bergault, Bertucci,
Bouba, Guéant).
• Not really satisfying for FX (correlations + triplets) or corporate
bonds (many securities for one issuer).
→ diversification and liquidity differences must be taken into
account.

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.

• d currencies (currency 1, USD, used for accounting)

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.

• d currencies (currency 1, USD, used for accounting)


• d stochastic processes denoted by (St1 )t∈[0,T ] , . . . , (Std )t∈[0,T ] that
model the market price of each of the d currencies in terms of the
reference one.

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.

• d currencies (currency 1, USD, used for accounting)


• d stochastic processes denoted by (St1 )t∈[0,T ] , . . . , (Std )t∈[0,T ] that
model the market price of each of the d currencies in terms of the
reference one.
• N tiers of clients.

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.

• d currencies (currency 1, USD, used for accounting)


• d stochastic processes denoted by (St1 )t∈[0,T ] , . . . , (Std )t∈[0,T ] that
model the market price of each of the d currencies in terms of the
reference one.
• N tiers of clients.
• R∗+ −marked point processes J n,i,j (dt, dz) modelling transactions
with clients from tier n regarding the currency pair (i, j) – z is the
size variable measured in reference currency.

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.

• d currencies (currency 1, USD, used for accounting)


• d stochastic processes denoted by (St1 )t∈[0,T ] , . . . , (Std )t∈[0,T ] that
model the market price of each of the d currencies in terms of the
reference one.
• N tiers of clients.
• R∗+ −marked point processes J n,i,j (dt, dz) modelling transactions
with clients from tier n regarding the currency pair (i, j) – z is the
size variable measured in reference currency.
• Logistic kernels νtn,i,j (dz) = Λn,i,j z, δ n,i,j (t, z) dz where the δs are


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

• Possibility to externalize on the D2D segment of the market.

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+φ .

Resulting dynamics of the inventories:

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

Dynamics of market exchange rates (covariance matrix Σ):


 
d
X i−1
X
dSti = µit Sti dt + σ i Sti dWti + k i  ξti,j − ξtj,i  Sti dt.
j=i+1 j=1

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

Mathematically, we assume that the dealer wants to maximize


" d
#
Z T
X γ
E XT + YTi − Yt| ΣYt dt
2 0
i=1

33
HJB equation

The HJB equation is


γ 1 2
0 = ∂t θ(t, y ) + y | µ(t) + y | D(µ(t))∇y θ(t, y ) − y | Σy + Tr D(y )ΣD(y )Dyy

θ(t, y )
Z 2 2

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

The HJB equation is


γ 1 2
0 = ∂t θ(t, y ) + y | µ(t) + y | D(µ(t))∇y θ(t, y ) − y | Σy + Tr D(y )ΣD(y )Dyy

θ(t, y )
Z 2 2

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, where

H n,i,j : (z, p) ∈ R∗+ × R 7→ sup f n,i,j (z, δ)(δ − p)


δ

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) .


Optimal hedging (externalization)


0

ξti,j∗ = Hi,j ∂y i θ(t, Yt− ) − ∂y j θ(t, Yt− )
   
j
+k i Yt−
i
1 + ∂y i θ(t, Yt− ) − k j Yt− 1 + ∂y j θ(t, Yt− )

35
Numerical approximation

36
Numerical approximation

• Equations are there but no grid in high dimension

36
Numerical approximation

• Equations are there but no grid in high dimension


• Simple structure for Σ: low-dimensional factor methods (not for this
problem).

36
Numerical approximation

• Equations are there but no grid in high dimension


• Simple structure for Σ: low-dimensional factor methods (not for this
problem).
• (Deep) Reinforcement Learning (slow and the danger of NN).

36
Numerical approximation

• Equations are there but no grid in high dimension


• Simple structure for Σ: low-dimensional factor methods (not for this
problem).
• (Deep) Reinforcement Learning (slow and the danger of NN).
• Trick in Bergault, Evangelista, Guéant, Vieira:

36
Numerical approximation

• Equations are there but no grid in high dimension


• Simple structure for Σ: low-dimensional factor methods (not for this
problem).
• (Deep) Reinforcement Learning (slow and the danger of NN).
• Trick in Bergault, Evangelista, Guéant, Vieira:
• HJB equations associated with continuous state space optimal
control problems boil down to Riccati equations when Hamiltonians
are quadratic.

36
Numerical approximation

• Equations are there but no grid in high dimension


• Simple structure for Σ: low-dimensional factor methods (not for this
problem).
• (Deep) Reinforcement Learning (slow and the danger of NN).
• Trick in Bergault, Evangelista, Guéant, Vieira:
• HJB equations associated with continuous state space optimal
control problems boil down to Riccati equations when Hamiltonians
are quadratic.
• For HJ equations on graphs, the easy case is that of exponential
Hamiltonians (hence the special case of exponential intensities).

36
Numerical approximation

• Equations are there but no grid in high dimension


• Simple structure for Σ: low-dimensional factor methods (not for this
problem).
• (Deep) Reinforcement Learning (slow and the danger of NN).
• Trick in Bergault, Evangelista, Guéant, Vieira:
• HJB equations associated with continuous state space optimal
control problems boil down to Riccati equations when Hamiltonians
are quadratic.
• For HJ equations on graphs, the easy case is that of exponential
Hamiltonians (hence the special case of exponential intensities).
• But...

36
Numerical approximation

• Equations are there but no grid in high dimension


• Simple structure for Σ: low-dimensional factor methods (not for this
problem).
• (Deep) Reinforcement Learning (slow and the danger of NN).
• Trick in Bergault, Evangelista, Guéant, Vieira:
• HJB equations associated with continuous state space optimal
control problems boil down to Riccati equations when Hamiltonians
are quadratic.
• For HJ equations on graphs, the easy case is that of exponential
Hamiltonians (hence the special case of exponential intensities).
• But...
• Quadratic approximations of the H functions (makes sense for not
too asymmetric flows)...

36
Numerical approximation

• Equations are there but no grid in high dimension


• Simple structure for Σ: low-dimensional factor methods (not for this
problem).
• (Deep) Reinforcement Learning (slow and the danger of NN).
• Trick in Bergault, Evangelista, Guéant, Vieira:
• HJB equations associated with continuous state space optimal
control problems boil down to Riccati equations when Hamiltonians
are quadratic.
• For HJ equations on graphs, the easy case is that of exponential
Hamiltonians (hence the special case of exponential intensities).
• But...
• Quadratic approximations of the H functions (makes sense for not
too asymmetric flows)...
• Gives an approximate value function θ̃: Polynomial of degree 2 in y
with coefficients solving a Riccati-like equation (no curse of
dimensionality).

36
Numerical approximation

• Equations are there but no grid in high dimension


• Simple structure for Σ: low-dimensional factor methods (not for this
problem).
• (Deep) Reinforcement Learning (slow and the danger of NN).
• Trick in Bergault, Evangelista, Guéant, Vieira:
• HJB equations associated with continuous state space optimal
control problems boil down to Riccati equations when Hamiltonians
are quadratic.
• For HJ equations on graphs, the easy case is that of exponential
Hamiltonians (hence the special case of exponential intensities).
• But...
• Quadratic approximations of the H functions (makes sense for not
too asymmetric flows)...
• Gives an approximate value function θ̃: Polynomial of degree 2 in y
with coefficients solving a Riccati-like equation (no curse of
dimensionality).
• θ̃ is plugged in the above equations to get great pricing and hedging
strategies. 36
Approximation of the Hamiltonians

   
θ(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

Optimal Top of Book Quotes


2.0
GBPUSD
1.5 EURUSD
EURGBP
1.0
Bid and Ask Quotes (bps)

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

Optimal Externalization Strategy


JPYUSD
CHFUSD
0.4 GBPUSD
EURUSD
CHFJPY
GBPJPY
Execution Rate (M$ s 1)

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

Inventory Risk and Probability Distribution


30

20

10
EUR Inventory (M$)

10

20

30
30 20 10 0 10 20 30
GBP Inventory (M$)

40
Example (video)

Time for a short animation

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

Thank you. Questions?

43

You might also like