Escolar Documentos
Profissional Documentos
Cultura Documentos
Abstract. We suggest that the broad distribution of time scales in financial markets could be a crucial
ingredient to reproduce realistic price dynamics in stylised Agent-Based Models. We propose a fractional
reaction-diffusion model for the dynamics of latent liquidity in financial markets, where agents are very
heterogeneous in terms of their characteristic frequencies. Several features of our model are amenable to an
exact analytical treatment. We find in particular that the impact is a concave function of the transacted
volume (aka the “square-root impact law”), as in the normal diffusion limit. However, the impact kernel
decays as t−β with β = 1/2 in the diffusive case, which is inconsistent with market efficiency. In the sub-
diffusive case the decay exponent β takes any value in [0, 1/2], and can be tuned to match the empirical
value β ≈ 1/4. Numerical simulations confirm our theoretical results. Several extensions of the model are
suggested.
cess. Other possible generalisations are discussed in the truncated1 power-law function with tail exponent α < 1
conclusions. and cutoff tc = −1 , such that (see Appendix B):
The outline of the paper is as follows. We first present Ψ (p) ≈ 1 − τ α [(p + )α − α ] , (4)
the general fractional diffusion framework with death and
sources. We then present the fractional latent order-book where τ denotes the scale of waiting times. Note that
model (FLOB) and derive its equilibrium shape, in the for short times t tc (equivalently p ) one has:
case of a balanced flow of buy/sell orders. We find that Ψ (p) ≈ 1 − τ α pα ≈ exp[−τ α pα ] consistent with fractional
the characteristic V-shape of the latent order book is pre- diffusion (see e.g. [17]), while for long times t tc (equiv-
served, leading to a concave impact law. We also show alently p ) Ψ (p) ≈ 1 − τ̃ p where τ̃ = αα−1 τ α is the
that the corresponding propagator is now described by a average time between jumps, consistent with normal dif-
tunable exponent β ∈ [0, 1/2] that resolves the above men- fusion.
tioned diffusivity puzzle. We finally confront these results
to numerical simulations. Injecting Eqs. (3) and (4) into Eq. (2) and rearranging
terms yields:
2 Fractional diffusion with death and sources φ(k, p) = Gα, (k, p) φ0 (k) + s(k, p) , (5)
with:
We here present the CTRW framework and adapt it to
the question of interest in this paper. The CTRW model −1
ω p(k 2 + ϕ)
describes random walkers that pause for a certain wait- Gα, (k, p) = p + , (6)
ing time before resuming their motion. When the average (p + )α − α
waiting time is finite, the long-time, large scale description
of an ensemble of such walkers is the standard diffusion where ω := σ 2 /τ α and ϕ = ˆ η/σ 2 . Equation (5) is central
equation. When the average waiting time diverges, the as its inverse Fourier-Laplace transform allows to com-
corresponding dynamics is described by the fractional dif- pute the evolution of the walkers density φ(x, t) for given
fusion equation [15,16]. initial condition and source terms. Unfortunately the in-
verse Fourier-Laplace transform of the kernel Gα, is not
Assuming that jump lengths and waiting times are in- analytical in the general case. In the following we thus
dependent, let Ψ (t) denote the waiting time distribution consider the limit cases of short and long times (see Ap-
function and Λ(x) denote the jump length distribution pendix C for a presentation of the problem in terms of
function. The evolution equation for the density of walk- partial-differential and integro-differential equations).
ers φ(x, t) at position x and time t reads [17]:
For t tc , we may note G− α, (k, p) = p
α−1 α
[ p +ω(k 2 +
−1
Z Z
ϕ)] . Taking the inverse Fourier-Laplace transform, one
φ(x, t) = Φ(t)φ(x, 0) + dx0 dt0Λ(x − x0 )Ψ (t0 )φ(x0 , t − t0 )
[0,t]
obtains that the kernel in real space is given by the inverse
Z Fourier transform of the Mittag-Leffler2 function (see e.g.
−
+ dt Φ(t )s(x, t − t0 ) ,
0 0
(1) [16,18]), Gα, (x, t) = F −1 {Fα [ω(k 2 + ϕ)tα ]}. Note that in
−
[0,t] the limit ϕ → 0 the kernel Gα, (x, t) can be conveniently
Rt written as:
where Φ(t) = 1 − 0 dt0 Ψ (t0 ) denotes the often called sur- 2
vival probability function, and where s(x, t) is a general − 1 x
rate-source term allowing for the injection or removal of Gα, (x, t) = √ gα α
, (ϕ → 0), (7)
4πωt α 4ωt
walkers (see Appendix A). Taking the Fourier-Laplace trans-
form (FL) of Eq. (1) yields: where we introduced the function gα , the shape of which is
discussed in e.g. [18,15]. For t tc , one obtains G+α, (k, p) =
φ(k, p) = Φ(p)φ0 (k) + Λ(k)Ψ (p)φ(k, p) + Φ(p)s(k, p) , (2) 2 −1 2
[ p + ω̃(k + ϕ)] where ω̃ =ˆ σ /τ̃ . Taking the inverse
where φ0 (k) := φ(k, t = 0), and where pΦ(p) = 1 − Fourier-Laplace transform yields the normal diffusion ker-
Ψ (p). We assume the jump lengths to have a zero mean nel (with death):
and a finite second moment. In addition, considering that
e−νt x2
when its time comes a random walker can either resume +
Gα, (x, t) = √ exp − , (8)
its motion or disappear with some small probability η, 4π ω̃t 4ω̃t
we allow theR distribution of jump lengths to be be non- 1
normalized ( dxΛ(x) = 1 − η). In the diffusion limit, this For seasoned readers, truncating the distribution of waiting
times may seem unusual in the context of fractional diffusion
is:
but is here an essential ingredient for describing a stationary
2 2
Λ(k) ≈ 1 − σ k − η , (3) order book.
2
The Mittag-Leffler function Eα (z) = Fα (−z) is a spe-
where σ denotes the root mean square of jump lengths. cial function defined by the following series as: Fα (z) =
P∞ (−z)j
We assume waiting times to be distributed according to a j=0 Γ [1+jα] .
Michael Benzaquen, Jean-Philippe Bouchaud: A fractional reaction-diffusion description of supply and demand 3
In this limit – and starting from the equilibrium book valid for α ≥ 1. When α < 1, liquidity initially outside the
ψ0 (x) = ψeq (x) – Eq. (16) becomes: interval [x0 , xT ] manages to move inside that interval and
Z t meet the incoming metaorder, even in the fast execution
(x − xu )2 limit. This provides more resistance to the metaorder, i.e.
mu
ψ(x, t) = −Lx+ du p gα . a slightly smaller impact.
0 4πω(t − u)α 4ω(t − u)α
(17) The FLOB thus provides a framework in which con-
Making use of Eq. (13) yields the following self-consistent cave impact is compatible with persistent order flow, al-
integral equation for the transaction price: though one expects a cross-over from a Q1−α/2 behaviour
√
for “slow” execution to a Q behaviour for “fast” execu-
1 t (xt − xu )2
mu
Z
xt = du p gα . (18) tion.8
L 0 4πω(t − u)α 4ω(t − u)α
The impact decay after the meta-order execution tc
Provided that impact is small (or equivalently in the limit t > T 9 can be computed by replacing the upper boundary
of small execution rates) one has (xt − xu )2 4ω(t − u)α , of the integrals in Eqs. (18) and (19) by T . In the limit of
which recovers the propagator limit where the transaction small execution rates, one easily obtains:
price is linearly related to the order flow through a power- 1−α/2 1−α/2
law decaying kernel:7 IQ (t > T ) t t−T
= − , (23)
√ Z t IQ T T
π mu
xt = du p , (19)
LΓ [1 − α/2] 0 4πω(t − u)α which decays with an infinite slope for t → T + and asymp-
totically equals (1 − α/2)(t/T )−α/2 . In the limit of high
allowing us to identify the propagator decay exponent β execution rates, the impact decay for tc t T can be
with min(1/2, α/2). Note that for α < 1 the equality β = conveniently computed as in the slow execution limit and
(1 − γ)/2 can be achieved by the choice α = 1 − γ ∈ reads:
[0, 1]. Hence, the FLOB allows the price to be diffusive
at all times in the presence of a persistent order flow. As α/2 −α/2
IQ (t T ) m Q(1−α)/2 1 − α/2 t
mentioned in the introduction, real data suggests γ ≈ 0.5 = p0 ,
which implies α ≈ 0.5. For a constant execution rate mt =
IQ 2(2 − α)ωLα Γ [1 − α/2] T
m0 = Q/T and denoting IQ = xT − x0 the impact of a (24)
meta-order of size Q, one obtains: which only differs from the low execution result by the
prefactor. For t → T + the calculation is more subtle and
α/2 relies on the source-free relaxation of the linearised order
Q1−α/2 m0
IQ = √ . (20) book profile in the vicinity of the price at the end of the
L (2 − α)Γ [1 − α/2] ω metaorder execution (see [11]). One obtains:
As one can see, Eq. (20) leads to IQ ∼ Q0.75 for α = p
IQ (t → T + ) ω(t − T )α ∗
0.5, intermediate between a square-root and a linear be- = 1− z , (25)
haviour. The pure square-root for small execution rates is IQ IQ
only recovered in the limit α = 1 considered by Donier et R∞ √
al. [11]. where z ∗ solves: a− z−(a+ −a− ) z du gα (u2 /4)(u − z)/ 4π =
0 with a± = lim→0 ∂x ψ(xT ± , T ).
In the opposite limit however of fast execution – more
precisely when (xt − xu )2 4ω(t − u)α (but still in the
regime t tc ) – one can show that the impact is again
given by a square root law (see Appendix D): 5 Numerical simulation
r
2Q In order to bolster our analytical results we performed a
IQ = h(α) , (21)
L numerical simulation of the model. Because of the pecu-
liar nature of fractional diffusion, such a simulation is more
where h(α) = (2 − α)−1/2 ≤ 1. Interestingly, the re- time consuming than a regular reaction-diffusion simula-
sult is smaller than what a purely geometric argument tion. This is because time needs be continuous and each
would suggest, where the volume initially contained be- particle (order intention) must be treated independently.
tween x0 and xT = x0 + IQ is executed against the incom- Each particle is labeled as buy/sell, and most importantly
ing metaorder. In the latter case one can write: next event time drawn from a fat-tailed probability distri-
Z IQ r bution function. In order to speed up the simulation we use
2Q
Q= dx Lx ⇒ IQ = , (22) 8
On the definition of “slow” and “fast” for real markets
0 L
where HFT significantly contribute, see [22]. √
7 9
Here, we have made use of the Taylor expansion of the For t tc one eventually recovers the 1/ t impact decay
function gα (y) when y → 0 (see [18,15]). predicted by Donier et al. [11] in the diffusive limit.
Michael Benzaquen, Jean-Philippe Bouchaud: A fractional reaction-diffusion description of supply and demand 5
during a constant rate buy meta-order execution. The tained by a linear regression and is plotted in Fig. 2. As
red dashed line corresponds to the equilibrium order book one can see, in the normal diffusion case α > 1 we obtain
from which the simulation started at t = 0. a square root decaying kernel as predicted by Donier et
al. [11], while for the fractional diffusion case (α < 1) we
obtain a weaker power law decay (with exponent ≈ α/2)
a heap queue algorithm10 to efficiently sort the up-coming consistent with Eq. (19).
events in time. The nature of the next event (diffusion
or death) is drawn from a biased distribution depending
on the diffusion and cancellation rates. Simultaneously a 6 Conclusion Normal diffusion
Poissonian rain of particles falls into the book, each par- ↵=3
ticle being naturally labeled with buy/sell depending on
the side of the book it falls in. For the sake of simplicity We have presented a fractional diffusion extension (FLOB)
the spread region between the best buy (bid) and the best of the locally linear order book (LLOB) model of Donier et
sell (ask) is rain-free. For each potentially price changing al. [11]. The fractional latent order book (FLOB) model
event, namely each event involving a particle at the bid or presented here is motivated by the existence of a very
ask, the heap is broken such that the relevant variables – 11
When T exceeds the cancelation timescale, impact trivially
volume profile, best bid and ask, spread, mid-price, event-
becomes linear in Q.
Normal diffusion
time and deposition/cancellation/reaction rates - can be Fractional diffusion
updated and stored. When a buy and ↵=3 a sell “particle” ↵ = 0.6
find themselves at the same spot, there are immediately Normal diffusion
Normal di↵usion (↵ = 3) Fractional d
removed from the book (reaction).
↵=3 ↵=0
The simulation is initialized from the theoretical equi- slope =0.54
slope = 0.547 (⇡ 1/2)
librium situation. Reflective boundary conditions are im-
plemented to ensure flat slopes at the (far away) edges
of the book. A meta-order execution can be implemented
through an additional rain of buy (resp. sell) particles that
fall precisely at the best ask (resp. bid) with given rate mt
(see Fig. 1 for an illustration of a typical numerical exper-
Normal diffusion Fractional diffusion
Fractional di↵usion (↵ = 0.6)
iment).
↵=3 ↵↵ = 0.6
= 0.6
slope =impact
Using such a simulation to measure 0.547 is(⇡not
1/2)
as slope
slope = 0.334 (⇡ ↵/2)
= 0.33
straightforward as one could think. In the fast execution
limit, discretisation induces the opening of a spread which slope = 0.547 (⇡ 1/2) slope =
struggles to refill during the execution. This effect is nat-
urally not included in the continuous reaction-diffusion
model presented above. In particular, it is responsible for
the fact that the impact decay is very difficult to repro-
duce within the numerical framework at hand. Further- ⌧
10
Also called priority queue algorithm, the heap queue algo-
rithm is a binary tree in which each parent node stores a value
Fig. 2. Fit of the inverted propagator Gτ for a random
smaller than or equal toslope
its children’s, order flux simulation: (top) in the normal diffusion case
= 0.547such
(⇡ that
1/2)in our case the (α = 3 >slope = 0.334
1) with slope(⇡ ↵/2)
0.54 ≈ 1/2, and (bottom) in
next event is always at the root. New events are pushed into
the tree from the bottom and find their place in log N time the fractional diffusion case (α = 0.6 < 1) with slope
[23]. 0.33 ≈ α/2.
6 Michael Benzaquen, Jean-Philippe Bouchaud: A fractional reaction-diffusion description of supply and demand
broad spectrum of time scales in financial markets, span- Given the density φ(x, 0) of random walkers at time t = 0,
ning seconds to days or even weeks. This extended frame- the particle density φ(x, t) at position x and time t as:
work allows us to reconcile the long-memory nature of or- Z
der flow with market efficiency (i.e. diffusive prices). The
φ(x, t) = dx0 φ(x0 , 0)P (x, t|x0 , 0) . (27)
impact of a metaorder is a concave function of volume,
crossing-over from√a Q0.75 behaviour for small execution
rates to the usual Q behaviour for large execution rates. Making use of translation invariance P (x, t−τ |x0 +`, 0) =
Another possibility to model agents heterogeneity is to P (x − `, t − τ |x0 , 0), multiplying Eq. (26) by φ(x0 , 0), and
keep a normal diffusion while introducing a wide spectrum integrating over x0 yields:
of cancellation and deposition rates. Such an approach also Z t Z
yields very interesting, complementary results and is left
φ(x, t) = Φ(t)φ(x, 0) + dτ d` Ψ (τ )Λ(l)φ(x − `, t − τ ) .
for an up-coming communication [22]. 0
(28)
Other possible generalisations can be considered. One Finally, changing variables in Eq. (28) through ` → x − x0
is to introduce a broad distribution in the individual vol- and τ → t0 yields Eq. (1) without sources (s(x, t) = 0).
umes of buy/sell orders. This is very relevant in view of the
heterogeneity of asset sizes in the financial industry. How-
ever, the mathematical apparatus needed to investigate Appendix B: Distribution of waiting times
this case needs to be developed, even in standard diffusive
case, since fluctuations in the volume profile φ(x, t) be- We here seek a simple analytical form for the Laplace
come dominant. Introducing fat-tailed jump lengths (Levy transform of a truncated power law distribution function
flights) would also be of interest. Indeed, the idea that of waiting times.R Having Ψ (t) ∼ τ0αRe−t /t1+α , we may
agents’ price reassessments can be large and sudden is ac- ∞ ∞
compute Ψ (p) = 0 dt e−pt Ψ (t) = 1+ 0 dt(e−pt −1)Ψ (t),
tually quite realistic. Again, implementing this idea is not where we have made use of the normalisation of Ψ (t). In
straightforward and will in particular need a careful anal- the limit t tc = −1 ( p 1), one obtains:
ysis of the reaction terms, since the continuity of the price
paths is lost. Z ∞
e−pt − 1
Ψ (p) − 1 ∼ τ0α dt = −(τ p)α , (29)
In conclusion, we have proposed that the broad dis- 0 tα+1
tribution of time scales in financial markets could be a
where τ α := −Γ [−α]τ0α (with Γ [−α] < 0). In the limit
crucial ingredient to model the complex dynamics of liq-
t tc = −1 (p ), one obtains:
uidity and allow one to reproduce realistic price dynamics
in stylised Agent-Based Models. Z ∞
e−t
Ψ (p)−1 ∼ τ0α dt (1−pt−1)
α+1
= −Γ [1−α]τ0α α−1 p ,
We wish to thank J. Donier (who participated to the 0 t
first stages of this work), J. Bonart, J. De Lataillade, M. (30)
Gould, S. Gualdi, I. Mastromatteo, B. Tóth and A. Dar- where Γ [1 − α] > 0. The distribution Ψ (p) must thus sat-
mon for fruitful discussions. isfy 1 − Ψ (p) ∼ pα for t tc and 1 − Ψ (p) ∼ p for t tc .
One can check that the distribution given in Eq. (4) is
indeed an appropriate candidate.
Appendix A: Evolution equation in a CTRW
model Appendix C: Fractional diffusion equation
We here present the probabilistic derivation of Eq. (1). We We here present the problem of fractional diffusion at
focus on the case without sources for the sake of simplicity. hand in terms of integro-differential equations (see e.g.
We denote P (x, t|x0 , 0) the conditional probability that a [16,18,17]). Equation (5) can also be written in the form:
random walker be at position x at time t given that it
were at position x0 at time t = 0. The evolution equation ω p(k 2 + ϕ)
for P (x, t|x0 , 0) reads: pφ(k, p) − φ0 (k) = − φ(k, p) + s(k, p) . (31)
(p + )α − α
P (x, t|x0 , 0) = Φ(t)δ(x − x0 )
Z t Z In the limit t tc , the first term of the right hand side
+ dτ Ψ (τ ) d`Λ(`)P (x, t − τ |x0 + `, 0) , (26) of Eq. (31) reduces to: −ω p1−α (k 2 + ϕ) φ(k, p). Taking
0 the inverse Fourier-Laplace transform then yields the frac-
tional diffusion equation with death and sources:
where the first term in the right hand side signifies the
particles that were at position x0 at time t = 0 and have ∂t φ = KD1−α
t (∂xx φ − ϕφ) + s(x, t) , (32)
not moved during the interval [0, t], and the second term
accounts for the particles which were at position x0 + ` at where K is a generalized diffusion coefficient, and where
time t = 0 and have jumped to position x at time t − τ . D−α
t denotes the fractional Riemann-Liouville operator
Michael Benzaquen, Jean-Philippe Bouchaud: A fractional reaction-diffusion description of supply and demand 7
Rt
[18,16] defined as D−α
t f (t) = Γ [α]
−1
0
du (t − u)α−1 f (u),
11. Donier J, Bonart J F, Mastromatteo I and Bouchaud J P
1−α −α 2015 Quantitative Finance 15 1109–1121
and Dt = ∂ t Dt .
12. Bouchaud J P, Gefen Y, Potters M and Wyart M 2004
For t tc , the first term of the right hand side of Quantitative Finance 4 176–190
Eq. (31) reduces to −ω̃(k 2 + ϕ) φ(k, p) and one easily re- 13. Lillo F and Farmer J D 2004 Studies in Nonlinear Dynam-
covers the normal diffusion equation with death and sources ics & Econometrics 8 1
∂t φ = D∂xx φ −νφ + s(x, t), where D = ω̃ (see [11]). 14. Bouchaud J P, Farmer J D and Lillo F 2008 How mar-
kets slowly digest changes in supply and demand (Elsevier:
Academic Press)
Appendix D: Impact in the fast execution limit 15. Metzler R and Klafter J 2000 Physics reports 339 1–77
16. Metzler R and Nonnenmacher T F 2002 Chemical Physics
284 67–90
We here compute the price impact in the limit of large √ 17. Henry B I and Wearne S L 2000 Physica A: Statistical
execution rates as given by Eq. (21). Letting xt = A t Mechanics and its Applications 276 448–455
into Eq. (18) with a constant execution rate mu = m0 18. Schneider W R 1990 Fractional diffusion. In Dynamics and
and changing variables through u = t(1 − v) yields: Stochastic Processes Theory and Applications (Springer
Berlin Heidelberg)
√ t1−α/2 1
Z
m0 h 2 1−α 1−√1−v 2 i
( ) 19. Donier J and Bouchaud J P 2016 Journal of Statistical
A t= dv √ gα A 4ωt
vα .
L 0 4πωv α Mechanics: Theory and Experiment 2016 123406
(33) 20. Henry B I, Langlands T A M and Wearne S L 2006 Physical
Noting integrand dominates for v → 0 – which is Review E 74 031116
√ that the
2 −α
(1 − 1 − v) v 'v 2−α δ
/4 – and letting z = vt where 21. Yuste S B, Acedo L and Lindenberg K 2004 Physical Re-
δ = (1 − α)/(2 − α), one obtains: view E 69 036126
22. Benzaquen M and Bouchaud J P 2017 In preparation
Z tδ 2 2−α 23. Brown M R 1978 SIAM journal on computing 7 298–319
1 m0 A z
A= dz √ gα . (34)
Lα 0 4πωz α 16ω
References
1. Montroll E W and Weiss G H 1965 Journal of Mathemat-
ical Physics 6 167–181
2. Grinold R C and Kahn R N 2000 Active Portfolio Man-
agement (McGraw Hill New York)
3. Almgren R, Thum C, Hauptmann E and Li H 2005 Risk
18 58–62
4. Tóth B, Lemperiere Y, Deremble C, De Lataillade J, Kock-
elkoren J and Bouchaud J P 2011 Physical Review X 1
021006
5. Mastromatteo I, Tóth B and Bouchaud J P 2014 Physical
Review E 89 042805
6. Donier J and Bonart J 2015 Market Microstructure and
Liquidity 1 1550008
7. Zarinelli E, Treccani M, Farmer J D and Lillo F 2015 Mar-
ket Microstructure and Liquidity 1 1550004
8. Gabaix X, Gopikrishnan P, Plerou V and Stanley H E 2003
Nature 423 267–270
9. Farmer J, Gerig A, Lillo F and Waelbroeck H 2013 Quant.
Finance 13 1743–1758
10. Mastromatteo I, Tóth B and Bouchaud J P 2014 Phys.
Rev. Lett. 113