You are on page 1of 62

Some Applications of Hawkes Processes

for Order Book Modelling


Ioane Muni Toke
Ecole Centrale Paris
Chair of Quantitative Finance
First Workshop on Quantitative Finance and Economics
International Christian University, Tokyo (Mitaka)
February 23rd, 2011
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 1 / 60
Table of contents
1
Introduction : Modeling with Point processes
2
Self- and mutually exciting Hawkes processes
3
A simple model for buy and sell intensities
4
Some statistical ndings about the order ows
5
An order book model with Hawkes processes
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 2 / 60
Introduction : Modeling with Point processes
Table of contents
1
Introduction : Modeling with Point processes
2
Self- and mutually exciting Hawkes processes
Denition and stationarity condition
Simulation of a multivariate Hawkes process
Maximum-likelihood estimation
Goodness of t
3
A simple model for buy and sell intensities
4
Some statistical ndings about the order ows
5
An order book model with Hawkes processes
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 3 / 60
Introduction : Modeling with Point processes
Modeling Financial Data with Point Processes
(Ultra-) High frequency data i.e. tick-by-tick data
(Engle 2000) often cited as seminal paper (1996)
ACD models by (Engle & Russell 1997)
Empirical ts on durations : Weibull, . . .
Tractability in multivariate settings
0
1
2
3
4
t
1
t
2
t
3
t
4
Time
t
2
Counting process N
Events t
Figure: Illustration of a simple point process: events, durations, counter
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 4 / 60
Introduction : Modeling with Point processes
Intensity process
Intensity
Let N be a point process adapted to a ltration F
t
. The left-continuous
F
t
-intensity process is dened as
(t|F
t
) = lim
h0
E
_
N(t + h) N(t)
h

F
t
_
, (1)
or equivalently
(t|F
t
) = lim
h0
1
h
P[N(t + h) N(t) > 0|F
t
] . (2)
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 5 / 60
Self- and mutually exciting Hawkes processes
Table of contents
1
Introduction : Modeling with Point processes
2
Self- and mutually exciting Hawkes processes
Denition and stationarity condition
Simulation of a multivariate Hawkes process
Maximum-likelihood estimation
Goodness of t
3
A simple model for buy and sell intensities
4
Some statistical ndings about the order ows
5
An order book model with Hawkes processes
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 6 / 60
Self- and mutually exciting Hawkes processes Denition and stationarity condition
Table of contents
1
Introduction : Modeling with Point processes
2
Self- and mutually exciting Hawkes processes
Denition and stationarity condition
Simulation of a multivariate Hawkes process
Maximum-likelihood estimation
Goodness of t
3
A simple model for buy and sell intensities
4
Some statistical ndings about the order ows
5
An order book model with Hawkes processes
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 7 / 60
Self- and mutually exciting Hawkes processes Denition and stationarity condition
Multidimensional Hawkes processes
Let M N

. Let {(t
m
i
)
i
}
m=1,...,M
be a M-dimensional point process.
N
t
= (N
1
t
, . . . , N
M
t
) denotes the associated counting process.
Denition
A multidimensional Hawkes process is dened with intensities

m
, m = 1, . . . , M given by :

m
(t) =
m
0
(t) +
M

n=1
_
t
0
P

j =1

mn
j
e

mn
j
(ts)
dN
n
s
, (3)
i.e. in its simplest version with P = 1 and
m
0
(t) constant :

m
(t) =
m
0
+
M

n=1
_
t
0

mn
e

mn
(ts)
dN
n
s
=
m
0
+
M

n=1

t
n
i
<t

mn
e

mn
(tt
n
i
)
.
(4)
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 8 / 60
Self- and mutually exciting Hawkes processes Denition and stationarity condition
Stationarity condition (I)
Well take here P = 1 to simplify the notations. Rewriting equation (4)
using vectorial notation, we have :
(t) =
0
+
_
t

G(t s)dN
s
, (5)
where
G(t) =
_

mn
e

mn
t
1
R
+
(t)
_
m,n=1,...,M
. (6)
Assuming stationarity gives E[(t)] = constant vector, and thus
stationary intensities must satisfy :
=
0
+ E
__
t

G(t s)dN
s
_
=
0
+ E
__
t

G(t s)(s)ds
_
, (7)
i.e.
=
_
I
_

0
G(u)du
_
1

0
(8)
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 9 / 60
Self- and mutually exciting Hawkes processes Denition and stationarity condition
Stationarity condition (II)
Stationarity of a multivariate Hawkes process
A sucient condition for a multivariate Hawkes process to be linear is that
the spectral radius of the matrix
=
_

0
G(u)du =
_

mn

mn
_
m,n=1,...,M
(9)
be strictly smaller than 1.
We recall that the spectral radius of the matrix G is dened as :
(G) = max
aS(G)
|a|, (10)
where S(G) denotes the set of all eigenvalues of G.
Note that this result can also be seen as a particular (linear) case of
(Bremaud 1996, Theorem 7) which deals with general non-linear Hawkes
processes.
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 10 / 60
Self- and mutually exciting Hawkes processes Simulation of a multivariate Hawkes process
Table of contents
1
Introduction : Modeling with Point processes
2
Self- and mutually exciting Hawkes processes
Denition and stationarity condition
Simulation of a multivariate Hawkes process
Maximum-likelihood estimation
Goodness of t
3
A simple model for buy and sell intensities
4
Some statistical ndings about the order ows
5
An order book model with Hawkes processes
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 11 / 60
Self- and mutually exciting Hawkes processes Simulation of a multivariate Hawkes process
Thinning procedure
Lewis & Shedler (1979) proposes a thinning procedure that allows the
simulation of a point process with bounded intensity.
Basic thinning theorem
Consider a one-dimensional non-homogeneous Poisson process {N

(t)}
t0
with rate function

(t), so that the number of points N

(T
0
) in a xed
interval (0, T
0
] has a Poisson distribution with parameter

0
=
_
T
0
0

(s)ds. Let t

1
, t

2
, . . . , t

(T
0
)
be the points of the process in
the interval (0, T
0
]. Suppose that for 0 t T
0
, (t)

(t).
For i = 1, 2, . . . , N

(T
0
), delete the points t

i
with probability 1
(t

i
)

(t

i
)
.
Then the remaining points form a non-homogeneous Poisson process
{N(t)}
t0
with rate function (t) in the interval (0, T
0
].
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 12 / 60
Self- and mutually exciting Hawkes processes Simulation of a multivariate Hawkes process
Simulation of a multivariate Hawkes process (I)
A general algorithm based on thinning is proposed by Ogata (1981).
We use the following notation :
U
[0,1]
denotes the uniform distribution on the interval [0, 1],
[0, T] is the time interval on which the process is to be simulated,
and we dene
I
K
(t) =
K

n=1

n
(t) (11)
the sum of the intensities of the rst K components of the multivariate
process. I
M
(t) =

M
n=1

n
(t) is thus the total intensity of the multivariate
process and we set I
0
= 0. The algorithm is then rewritten as follows.
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 13 / 60
Self- and mutually exciting Hawkes processes Simulation of a multivariate Hawkes process
Simulation of a multivariate Hawkes process (II)
Algorithm - Initialization
1
Initialization : Set i 1, i
1
1, . . . , i
M
1 and
I

I
M
(0) =
M

n=i

i
0
(0).
2
First event : Generate U U
[0,1]
and set s
1

ln U.
1 If s > T Then go to last step.
2 Attribution Test : Generate D U
[0,1]
and set t
n
0
1
s where n
0
is
such that
I
n
0
1
(0)
I

< D
I
n
0
(0)
I

.
3 Set t
1
t
n
0
1
.
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 14 / 60
Self- and mutually exciting Hawkes processes Simulation of a multivariate Hawkes process
Simulation of a multivariate Hawkes process (III)
Algorithm - General routine
3
General routine : Set i
n
0
i
n
0
+ 1 and i i + 1.
1 Update maximum intensity: Set I

I
M
(t
i 1
) +

M
n=1

P
j=1

nn
0
j
.
2 New event : Generate U U
[0,1]
and set s s
1
I

ln U.
If s > T, Then go to the last step.
3 Attribution-Rejection test : Generate D U
[0,1]
.
If D
I
M
(s)
I

,
Then set t
n
0
i
n
0
s where n
0
is such that
I
n
0
1
(s)
I

< D
I
n
0
(s)
I

, and
t
i
t
n
0
i
n
0
and go through the general routine again,
Else update I

I
M
(s) and try a new date at step (b) of the general
routine.
4
Output: Retrieve the simulated process ({t
n
i
}
i
)
n=1,...,M
on [0, T].
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 15 / 60
Self- and mutually exciting Hawkes processes Simulation of a multivariate Hawkes process
Sample paths of a bivariate Hawkes process (I)
We simulate a bivariate Hawkes process with P = 1 and the following
parameters:

1
0
= 0.1,
11
1
= 0.2,
11
1
= 1.0,
12
1
= 0.1,
12
1
= 1.0,

2
0
= 0.5,
21
1
= 0.5,
21
1
= 1.0,
22
1
= 0.1,
22
1
= 1.0, (12)
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 16 / 60
Self- and mutually exciting Hawkes processes Simulation of a multivariate Hawkes process
Sample paths of a bivariate Hawkes process (II)
0
1
2
3
4
0 20 40 60 80 100
Time
Intensity maximum I
*
Intensity
1
Intensity
2
Events t
1
Events t
2
Figure: Simulation of a two-dimensional Hawkes process with P = 1 and
parameters given in equation (12).
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 17 / 60
Self- and mutually exciting Hawkes processes Simulation of a multivariate Hawkes process
Sample paths of a bivariate Hawkes process (III)
0
1
2
3
20 22 24 26 28 30 32 34 36 38 40
Time
Intensity maximum I
*
Intensity
1
Intensity
2
Events t
1
Events t
2
Figure: Simulation of a two-dimensional Hawkes process with P = 1 and
parameters given in equation (12). (Zoom of the previous gure).
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 18 / 60
Self- and mutually exciting Hawkes processes Maximum-likelihood estimation
Table of contents
1
Introduction : Modeling with Point processes
2
Self- and mutually exciting Hawkes processes
Denition and stationarity condition
Simulation of a multivariate Hawkes process
Maximum-likelihood estimation
Goodness of t
3
A simple model for buy and sell intensities
4
Some statistical ndings about the order ows
5
An order book model with Hawkes processes
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 19 / 60
Self- and mutually exciting Hawkes processes Maximum-likelihood estimation
Computation of the log-likelihood function (I)
The log-likelihood of a multidimensional Hawkes process can be computed
as the sum of the likelihood of each coordinate, i.e. is written:
ln L({t
i
}
i =1,...,N
) =
M

m=1
ln L
m
({t
i
}), (13)
where each term is dened by:
ln L
m
({t
i
}) =
_
T
0
(1
m
(s)) ds +
_
T
0
ln
m
(s)dN
m
(s). (14)
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 20 / 60
Self- and mutually exciting Hawkes processes Maximum-likelihood estimation
Computation of the log-likelihood function (II)
In the case of a multidimensional Hawkes process, denoting {t
i
}
i =1,...,N
the ordered pool of all events {{t
m
i
}
m=1,...,M
}, this log-likelihood can be
computed as:
ln L
m
({t
i
}) = T
m
(0, T) (15)
+
N

i =1
z
m
i
ln
_
_

m
0
(t
i
) +
M

n=1
P

j =1

t
n
k
<t
i

mn
j
e

mn
j
(t
i
t
n
k
)
_
_
,
where z
m
i
is equal to 1 if the event t
i
is of type m, 0 otherwise.
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 21 / 60
Self- and mutually exciting Hawkes processes Maximum-likelihood estimation
Computation of the log-likelihood function (III)
This can be computed in a recursive way. We observe that:
R
mn
j
(l ) =

t
n
k
<t
m
l
e

mn
j
(t
m
l
t
n
k
)
=

t
n
k
<t
m
l 1
e

mn
j
(t
m
l
t
n
k
)
+

t
m
l 1
t
n
k
<t
m
l
e

mn
j
(t
m
l
t
n
k
)
= e

mn
j
(t
m
l
t
m
l 1
)

t
n
k
<t
m
l 1
e

mn
j
(t
m
l 1
t
n
k
)
+

t
m
l 1
t
n
k
<t
m
l
e

mn
j
(t
m
l
t
n
k
)
= e

mn
j
(t
m
l
t
m
l 1
)
R
mn
j
(l 1) +

t
m
l 1
t
n
k
<t
m
l
e

mn
j
(t
m
l
t
n
k
)
=
_

_
e

mn
j
(t
m
l
t
m
l 1
)
R
mn
j
(l 1) +

t
m
l 1
t
n
k
<t
m
l
e

mn
j
(t
m
l
t
n
k
)
if m = n,
e

mn
j
(t
m
l
t
m
l 1
)
_
1 + R
mn
j
(l 1)
_
if m = n.
(16)
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 22 / 60
Self- and mutually exciting Hawkes processes Maximum-likelihood estimation
Computation of the log-likelihood function (IV)
The nal expression of the log-likelihood may be written:
Log-likelihood of a multivariate Hawkes process
ln L
m
({t
i
}) = T
N

i =1
M

n=1
P

j =1

mn
j

mn
j
_
1 e

mn
j
(Tt
i
)
_
+

t
m
l
ln
_
_

m
0
(t
m
l
) +
M

n=1
P

j =1

mn
j
R
mn
j
(l )
_
_
, (17)
where R
mn
j
(l ) is dened with equation (16) and R
mn
j
(0) = 0.
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 23 / 60
Self- and mutually exciting Hawkes processes Maximum-likelihood estimation
Properties of the maximum-likelihood estimator
Ogata (1978) shows that for a stationary one-dimensional Hawkes process
with constant
0
and P = 1, the maximum-likelihood estimator

T
= (

0
,
1
,

1
)) is
consistent, i.e. converges in probability to the true values
= (
0
,
1
,
1
)) as T :
> 0, lim
T
P[|

T
| > ] = 0. (18)
asymptotically normal, i.e.

T
_

_
N(0, I
1
()) (19)
where I
1
() =
_
E
_
1

j
__
i ,j
.
asymptotically ecient, i.e. asymptotically reaches the lower bound
of the variance.
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 24 / 60
Self- and mutually exciting Hawkes processes Maximum-likelihood estimation
Numerical estimation of a simulated process
T
1
0

11
1

11
1

12
1

12
1

2
0

21
1

21
1

22
1

22
1
100 0.614 0.510 0.369 1.482 1.710 0.518 0.337 0.600 1.605 2.595
(0.372) (0.268) (0.269) (1.216) (3.172) (0.272) (0.206) (0.365) (2.051) (6.586)
500 0.516 0.505 0.268 1.043 0.865 0.518 0.264 0.507 0.814 1.048
(0.112) (0.085) (0.080) (0.214) (0.479) (0.120) (0.080) (0.084) (0.278) (0.221)
1000 0.507 0.492 0.254 1.018 0.761 0.513 0.255 0.488 0.794 1.003
(0.079) (0.054) (0.052) (0.122) (0.203) (0.092) (0.052) (0.061) (0.387) (0.152)
0.500 0.500 0.250 1.000 0.750 0.500 0.250 0.500 0.750 1.000
Table: Maximum likelihood estimation of a two-dimensional Hawkes process on
simulated data. Each estimation is the average result computed on 100 samples
of length [0, T]. Standard deviations are given in parentheses.
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 25 / 60
Self- and mutually exciting Hawkes processes Goodness of t
Table of contents
1
Introduction : Modeling with Point processes
2
Self- and mutually exciting Hawkes processes
Denition and stationarity condition
Simulation of a multivariate Hawkes process
Maximum-likelihood estimation
Goodness of t
3
A simple model for buy and sell intensities
4
Some statistical ndings about the order ows
5
An order book model with Hawkes processes
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 26 / 60
Self- and mutually exciting Hawkes processes Goodness of t
Time change theorem and goodness of t
Time change theorem
Let (N
t
) be a one-dimensional point process on R
+
such that
_

0
(s)ds = . Let t

be the stopping time dened by


_
t

0
(s)ds = . (20)
Then the process

N() = N(t

) is an homogeneous Poisson process with


constant intensity = 1.
(Multivariate componentwise) Corollary
The durations
m
i

m
i 1
=
m
(t
m
i 1
, t
m
i
) =
_
t
m
i
t
m
i 1

m
(s)ds are exponentially
distributed with parameter 1. See e.g. (Bowsher 2007).
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 27 / 60
Self- and mutually exciting Hawkes processes Goodness of t
Testing the simulated data (I)
The integrated intensity of the m-th coordinate of a multidimensional
Hawkes process between two consecutive events t
m
i 1
and t
m
i
of type m is
computed as:

m
(t
m
i 1
, t
m
i
) =
_
t
m
i
t
m
i 1

m
(s)ds
=
_
t
m
i
t
m
i 1

m
0
(s)ds +
_
t
m
i
t
m
i 1
M

n=1
P

j =1

t
n
k
<s

mn
j
e

mn
j
(st
n
k
)
ds
=
_
t
m
i
t
m
i 1

m
0
(s)ds +
_
t
m
i
t
m
i 1
M

n=1
P

j =1

t
n
k
<t
m
i 1

mn
j
e

mn
j
(st
n
k
)
ds
+
_
t
m
i
t
m
i 1
M

n=1
P

j =1

t
m
i 1
t
n
k
<s

mn
j
e

mn
j
(st
n
k
)
ds
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 28 / 60
Self- and mutually exciting Hawkes processes Goodness of t
Testing the simulated data (II)

m
(t
m
i 1
, t
m
i
) =
_
t
m
i
t
m
i 1

m
0
(s)ds
+
M

n=1
P

j =1

t
n
k
<t
m
i 1

mn
j

mn
j
_
e

mn
j
(t
m
i 1
t
n
k
)
e

mn
j
(t
m
i
t
n
k
)
_
+
M

n=1
P

j =1

t
m
i 1
t
n
k
<t
m
i

mn
j

mn
j
_
1 e

mn
j
(t
m
i
t
n
k
)
_
. (21)
This computation can be simplied with a recursive element. Let us denote
A
mn
j
(i 1) =

t
n
k
<t
m
i 1
e

mn
j
(t
m
i 1
t
n
k
)
. (22)
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 29 / 60
Self- and mutually exciting Hawkes processes Goodness of t
Testing the simulated data (III)
We observe that
A
mn
j
(i 1) =

t
n
k
<t
m
i 1
e

mn
j
(t
m
i 1
t
n
k
)
= e

mn
j
(t
m
i 1
t
m
i 2
)

t
n
k
<t
m
i 2
e

mn
j
(t
m
i 2
t
n
k
)
+

t
m
i 2
t
n
k
<t
m
i 1
e

mn
j
(t
m
i 1
t
n
k
)
= e

mn
j
(t
m
i 1
t
m
i 2
)
A
mn
j
(i 2)
+

t
m
i 2
t
n
k
<t
m
i 1
e

mn
j
(t
m
i 1
t
n
k
)
. (23)
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 30 / 60
Self- and mutually exciting Hawkes processes Goodness of t
Testing the simulated data (IV)
The integrated density can thus be written i N

m
(t
m
i 1
, t
m
i
) =
_
t
m
i
t
m
i 1

m
0
(s)ds +
M

n=1
P

j =1

mn
j

mn
j
_
_
1 e

mn
j
(t
m
i
t
m
i 1
)
_
A
mn
j
(i 1) +

t
m
i 1
t
n
k
<t
m
i
_
1 e

mn
j
(t
m
i
t
n
k
)
_
_
, (24)
where A is dened as in equation (22) with j , A
mn
j
(0) = 0.
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 31 / 60
Self- and mutually exciting Hawkes processes Goodness of t
Testing the simulated data (V)
0
1
2
3
4
5
6
7
8
0 1 2 3 4 5 6 7 8
E
m
p
i
r
i
c
a
l

q
u
a
n
t
i
l
e
s
Theoretical quantiles
0
1
2
3
4
5
6
7
8
0 1 2 3 4 5 6 7 8
E
m
p
i
r
i
c
a
l

q
u
a
n
t
i
l
e
s
Theoretical quantiles
Figure: Quantile plots for one sample of simulated data of a two-dimensional
Hawkes process with P = 1 and parameters given in equation (12). (Left) m = 0.
(Right) m = 1.
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 32 / 60
A simple model for buy and sell intensities
Table of contents
1
Introduction : Modeling with Point processes
2
Self- and mutually exciting Hawkes processes
Denition and stationarity condition
Simulation of a multivariate Hawkes process
Maximum-likelihood estimation
Goodness of t
3
A simple model for buy and sell intensities
4
Some statistical ndings about the order ows
5
An order book model with Hawkes processes
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 33 / 60
A simple model for buy and sell intensities
A model for buy and sell intensities (I)
Hewlett (2006) proposes to model the clustered arrivals of buy and sell
trades using Hawkes processes. Using the exponent B for buy variables
and S for sell variables, the model is written :

B
(t) =
B
0
+
_
t
0

BB
e

BB
(tu)
dN
B
u
+
_
t
0

BS
e

BS
(tu)
dN
S
u
,(25)

S
(t) =
S
0
+
_
t
0

SB
e

SB
(tu)
dN
B
u
+
_
t
0

SS
e

SS
(tu)
dN
S
u
. (26)
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 34 / 60
A simple model for buy and sell intensities
A model for buy and sell intensities (II)
Hewlett (2006) imposes some symmetry constraints, stating that mutual
excitation and self-excitation should be the same for both processes, which
is written :

B
0
=
S
0
=
0
(27)

SB
=
BS
=
cross
(28)

SB
=
BS
=
cross
(29)

SS
=
BB
=
self
(30)

SS
=
BB
=
self
(31)
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 35 / 60
A simple model for buy and sell intensities
Goodness of t
Hewlett (2006) ts this model on two-month data of EUR/PLN
transactions (no dates given): the Hawkes model is a much better t of
the empirical data than the Poisson model.
Figure: Quantile plots of integrated intensities for the Hawkes model (left) and a
Poisson model (right) on EUR/PLN buy and sell data. Reproduced from
(Hewlett 2006).
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 36 / 60
A simple model for buy and sell intensities
Numerical results
The numerical values obtained are :

0
= 0.0033,
cross
= 0,
self
= 0.0169,
self
= 0.0286. (32)
In other words,
the occurrence of a buy (resp. sell) order has an exciting eect on the
stream of buy (resp. sell) orders, with a typical half-life of
ln 2

self
24
seconds;
the zero value of
cross
tends to indicate that there is no inuence of
buy orders on sell orders, and conversely.
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 37 / 60
A simple model for buy and sell intensities
Test on our own data (I)
We perform the t of a bivariate Hawkes model on buy/sell market orders
on the following data : BNPP.PA, Feb. 1st 2010 to Feb. 23rd, 2010 (14
trading days), 10am-12am without symmetry constraints. Numerical
results are :

B
0
= 0.080,
BB
= 3.230,
BB
= 13.304,
BS
= 0.276,
BS
= 6.193

B
0
= 0.086,
SB
= 0.515,
SB
= 13.451,
SS
= 3.789,
SS
= 14.151
Conrmation of the very limited cross-excitation eect.
Change of magnitude of parameters : dierence in precision of data
(second, millisecond)
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 38 / 60
A simple model for buy and sell intensities
Test on our own data (II)
0
2
4
6
8
10
12
14
0 1 2 3 4 5 6 7
Day 0
Day 1
Day 2
Day 3
Day 4
Day 5
Day 6
Day 7
Day 8
Day 9
Day 10
Day 11
Day 12
0
2
4
6
8
10
12
14
0 1 2 3 4 5 6 7
Day 0
Day 1
Day 2
Day 3
Day 4
Day 5
Day 6
Day 7
Day 8
Day 9
Day 10
Day 11
Day 12
Figure: Quantile plots of integrated intensities for a bivariate Hawkes model on
buy/sell market orders tted on 13 trading days of the stock BNPP.PA (from
Feb. 1st 2010 to Feb. 22nd, 2010), 10am-12am each day.
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 39 / 60
Some statistical ndings about the order ows
Table of contents
1
Introduction : Modeling with Point processes
2
Self- and mutually exciting Hawkes processes
Denition and stationarity condition
Simulation of a multivariate Hawkes process
Maximum-likelihood estimation
Goodness of t
3
A simple model for buy and sell intensities
4
Some statistical ndings about the order ows
5
An order book model with Hawkes processes
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 40 / 60
Some statistical ndings about the order ows
Classifying orders according to their aggressiveness
Large (2007) models streams of orders by Hawkes processes, extending the
model by Hewlett (2006) using a much ner description of orders.
Following classical typologies used in microstructure, events occurring in
an order book are classied in ten categories :
Type Description Aggressiveness
1 Market order that moves the ask Yes
2 Market order that moves the bid Yes
3 Limit order that moves the ask Yes
4 Limit order that moves the bid Yes
5 Market order that doesnt move the ask No
6 Market order that doesnt move the bid No
7 Limit order that doesnt move the ask No
8 Limit order that doesnt move the bid No
9 Cancellation at ask No
10 Cancellation at bid No
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 41 / 60
Some statistical ndings about the order ows
A 10-variate Hawkes model for aggressive orders
Events of type 1 to 4 are Hawkes processes whose intensities depend on
the 10 dierent sorts of events, i.e. can be written for m = 1, . . . , 4:

m
(t) =
0
(t) +
10

n=1
_
t
0

mn
e

m
n(tu)
dN
n
u
. (33)
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 42 / 60
Some statistical ndings about the order ows
Hawkes parameters for aggressive limit orders
Figure: Representation of the inuences on aggressive limit orders measured by
the tting of a Hawkes model on the Barclays order book on January 2002.
mn
are in abscissas,
mn
are in ordinates, the size of the discs are proportional to the
number of observed events. Reproduced from (Large 2007).
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 43 / 60
Some statistical ndings about the order ows
Hawkes parameters for aggressive market orders
Figure: Representation of the inuences on aggressive market orders measured by
the tting of a Hawkes model on the Barclays order book on January 2002.
mn
are in abscissas,
mn
are in ordinates, the size of the discs are proportional to the
number of observed events. Reproduced from (Large 2007).
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 44 / 60
Some statistical ndings about the order ows
Aggressive market orders on 2010 CAC40 data
0.02 0.05 0.10 0.20 0.50 1.00 2.00 5.00
0
.
0
0
.
5
1
.
0
1
.
5
2
.
0
2
.
5
Hawkes Parameters For Aggressive Market Orders
Halflives
I
n
t
e
n
s
i
t
y

i
n
c
r
e
a
s
e
AMAM
AMAL
AMPM
AMPL
AMAM
AMAL
AMPM
AMPL
AMAM
AMAL
AMPM
AMPL
AMAM
AMAL
AMPM
AMPL
AMAM
AMAL
AMPM
AMPL
AMAM
AMAL
AMPM AMPL
AMAM
AMAL
AMPM
AMPL
AMAM
AMAL
AMPM
AMPL
AMAM
AMAL
AMPM AMPL
AMAM
AMAL
AMPM
AMPL
AMAM
AMPM
AMPL
AMAM
AMAL
AMPM AMPL
BNPP.PA
UBIP.PA
LAGA.PA
ALSO.PA
AXAF.PA
BOUY.PA
CARR.PA
PEUP.PA
AIRP.PA
MICP.PA
SASY.PA
SGEF.PA
Figure: Hawkes parameters for aggressive market orders for various CAC40
stocks. These values are computed using median-MLE estimation on 14 days of
trading (Feb.1st-Feb.23rd 2010), 10am-12pm.
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 45 / 60
Some statistical ndings about the order ows
Aggressive limit orders on 2010 CAC40 data
0.02 0.05 0.10 0.20 0.50 1.00 2.00 5.00
0
1
2
3
4
5
Hawkes Parameters For Aggressive Limit Orders
Halflives
I
n
t
e
n
s
i
t
y

i
n
c
r
e
a
s
e
ALAL
ALPM
ALPL
ALAM
ALAL
ALPM
ALPL
ALAM
ALAL
ALPM
ALPL
ALAL
ALPM
ALPL
ALAM
ALAL
ALPM
ALPL
ALAM
ALAL
ALPM
ALPL
ALAM
ALAL
ALPM
ALPL
ALAM
ALAL
ALPM
ALPL
ALAM
ALAL
ALPM
ALPL
ALAM
ALAL
ALPM
ALPL
ALAL
ALPM
ALPL
ALAM
ALAL
ALPM
ALPL
BNPP.PA
UBIP.PA
LAGA.PA
ALSO.PA
AXAF.PA
BOUY.PA
CARR.PA
PEUP.PA
AIRP.PA
MICP.PA
SASY.PA
SGEF.PA
Figure: Hawkes parameters for aggressive limit orders for various CAC40 stocks.
These values are computed using median-MLE estimation on 14 days of trading
(Feb.1st-Feb.23rd 2010), 10am-12pm.
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 46 / 60
Some statistical ndings about the order ows
Passive market orders on 2010 CAC40 data
0.02 0.05 0.10 0.20 0.50 1.00
0
1
2
3
4
5
Hawkes Parameters For Passive Market Orders
Halflives
I
n
t
e
n
s
i
t
y

i
n
c
r
e
a
s
e
PMAM
PMAL
PMPM
PMPL
PMAM
PMAL
PMPM
PMPL
PMAM
PMAL
PMPM
PMPL
PMAM
PMAL
PMPM
PMPL
PMAM
PMPM
PMPL
PMAM
PMAL
PMPM
PMPL
PMAM
PMAL
PMPM
PMPL
PMAM
PMAL
PMPL
PMAM
PMAL
PMPM
PMPL
PMAM
PMAL
PMPM
PMPL
PMAM
PMPM
PMPL
PMAM
PMAL
PMPM
PMPL
BNPP.PA
UBIP.PA
LAGA.PA
ALSO.PA
AXAF.PA
BOUY.PA
CARR.PA
PEUP.PA
AIRP.PA
MICP.PA
SASY.PA
SGEF.PA
Figure: Hawkes parameters for passive market orders for various CAC40 stocks.
These values are computed using median-MLE estimation on 14 days of trading
(Feb.1st-Feb.23rd 2010), 10am-12pm.
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 47 / 60
Some statistical ndings about the order ows
Empirical conclusions
Previous gures can be used to draw some conclusions on the way order
book events inuence each other. The main ndings are the followings:
passive limit orders can be seen as background noise ;
aggressive LO are rstly inuenced by aggressive MO (resiliency) ;
aggressive LO are secondly inuenced by passive MO ;
aggressive LO are thirdly inuenced by aggressive LO ;
aggressive MO are rstly inuenced by passive MO ;
aggressive MO are secondly inuenced by aggressive MO ;
aggressive MO are thirdly inuenced by aggressive LO (rush to
liquidity) ;
passive MO are inuenced by passive and aggressive market orders,
but not by LO.
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 48 / 60
An order book model with Hawkes processes
Table of contents
1
Introduction : Modeling with Point processes
2
Self- and mutually exciting Hawkes processes
Denition and stationarity condition
Simulation of a multivariate Hawkes process
Maximum-likelihood estimation
Goodness of t
3
A simple model for buy and sell intensities
4
Some statistical ndings about the order ows
5
An order book model with Hawkes processes
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 49 / 60
An order book model with Hawkes processes
The basic Zero-Intelligence Poisson model (HP)
Liquidity provider
1
arrival of new limit orders: homogeneous Poisson process N
L
(
L
)
2
arrival of cancellation of orders: homogeneous Poisson process
N
C
(
C
)
3
new limit orders placement: Students distribution with parameters
(
P
1
, m
P
1
, s
P
1
) around the same side best quote
4
volume of new limit orders: exponential distribution E(1/m
V
1
);
5
in case of a cancellation, orders are deleted with probability
Noise trader (liquidity taker)
1
arrival of market orders: homogeneous Poisson process N
M
()
2
volume of market orders: exponential distribution with mean
E(1/m
V
2
).
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 50 / 60
An order book model with Hawkes processes
Need for physical time in order book models
0
0.05
0.1
0.15
0.2
0.25
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 0.22
Event time spread
Calendar time
10
-6
10
-5
10
-4
10
-3
10
-2
10
-1
10
0
0 0.05 0.1 0.15 0.2
Figure: Empirical density function of the distribution of the bid-ask spread in
event time and in physical time.
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 51 / 60
An order book model with Hawkes processes
Measures of inter arrival times
(red) Inter arrival times of the counting process of all orders (limit
orders and market orders mixed), i.e. the time step between any order
book event (other than cancellation)
(green) Interval time between a market order and immediately
following limit order
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 52 / 60
An order book model with Hawkes processes
Empirical evidence of market making
0
0.1
0.2
0.3
0.4
0.5
0.6
0 0.1 0.2 0.3 0.4 0.5
AllOrders
MarketNextLimit
10
-4
10
-3
10
-2
10
-1
10
0
0.01 0.1 1 10
Figure: Empirical density function of the distribution of the time steps between
two consecutive orders (any type, market or limit) and empirical density function
of the distribution of the time steps between a market order and the immediately
following limit order. X-axis is scaled in seconds. In insets, same data using a
semi-log scale. Studied assets : BNPP.PA (left). Reproduced from (Muni
Toke 2011).
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 53 / 60
An order book model with Hawkes processes
Adding dependance between order ows (I)
Liquidity provider
1
arrival of new limit orders: Hawkes process N
L
(
L
)
2
arrival of cancellation of orders: homogeneous Poisson process
N
C
(
C
)
3
new limit orders placement: Students distribution with parameters
(
P
1
, m
P
1
, s
P
1
) around the same side best quote
4
volume of new limit orders: exponential distribution E(1/m
V
1
);
5
in case of a cancellation, orders are deleted with probability
Noise trader (liquidity taker)
1
arrival of market orders: Hawkes process N
M
()
2
volume of market orders: exponential distribution with mean
E(1/m
V
2
).
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 54 / 60
An order book model with Hawkes processes
Adding dependence between order ows (II)
Hawkes processes N
L
and N
M
_

_
(t) =
0
+
_
t
0

MM
e

MM
(ts)
dN
M
s

L
(t) =
L
0
+
_
t
0

LM
e

LM
(ts)
dN
M
s
+
_
t
0

LL
e

LL
(ts)
dN
L
s
(34)
MM and LL eect for clustering of orders
LM eect as observed on data
no ML eect
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 55 / 60
An order book model with Hawkes processes
Impact on arrival times (I)
0
0.05
0.1
0.15
0.2
0.25
0 0.5 1 1.5 2
Empirical BNPP
Homogeneous Poisson
Hawkes MM
10
-4
10
-3
10
-2
10
-1
10
0
2 4 6 8 10 12 14 16 18 20
0
0.1
0.2
0.3
0.4
0.5
0 0.5 1 1.5 2
Empirical BNPP
Homogeneous Poisson
Hawkes LL
10
-5
10
-4
10
-3
10
-2
10
-1
10
0
2 4 6 8 10 12 14 16 18 20
Figure: Empirical density function of the distribution of the interarrival times of
market orders (left) and limit orders (right) for three simulations, namely HP,
MM, LL, compared to empirical measures. In inset, same data using a semi-log
scale. Reproduced from (Muni Toke 2011).
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 56 / 60
An order book model with Hawkes processes
Impact on arrival times (II)
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0 0.2 0.4 0.6 0.8 1 1.2
Empirical BNPP
Homogeneous Poisson
Hawkes MM
Hawkes MM LL
Hawkes MM LL LM
10
-4
10
-3
10
-2
10
-1
10
0
1 2 3 4 5 6 7 8 9 10
Figure: Empirical density function of the distribution of the interval times
between a market order and the following limit order for three simulations, namely
HP, MM+LL, MM+LL+LM, compared to empirical measures. In inset, same
data using a semi-log scale. Reproduced from (Muni Toke 2011).
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 57 / 60
An order book model with Hawkes processes
Impact on the bid-ask spread (I)
0
0.05
0.1
0.15
0.2
0.25
0.3
0 0.05 0.1 0.15 0.2 0.25 0.3
Empirical BNPP.PA
Homogeneous Poisson
Hawkes MM
Hawkes MM+LM
10
-6
10
-5
10
-4
10
-3
10
-2
10
-1
10
0
0 0.05 0.1 0.15 0.2
Figure: Empirical density function of the distribution of the bid-ask spread for
three simulations, namely HP, MM, MM+LM, compared to empirical measures.
In inset, same data using a semi-log scale. X-axis is scaled in euro (1 tick is 0.01
euro). Reproduced from (Muni Toke 2011).
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 58 / 60
An order book model with Hawkes processes
Impact on the bid-ask spread (II)
0
0.05
0.1
0.15
0.2
0.25
0.3
0 0.05 0.1 0.15 0.2
Empirical BNPP.PA
Homogeneous Poisson
Hawkes MM+LL
Hawkes MM+LL+LM
10
-6
10
-5
10
-4
10
-3
10
-2
10
-1
10
0
0 0.05 0.1 0.15 0.2
Figure: Empirical density function of the distribution of bid-ask spread for three
simulations, namely HP, MM+LL, MM+LL+LM. In inset, same data using a
semi-log scale. X-axis is scaled in euro (1 tick is 0.01 euro). Reproduced from
(Muni Toke 2011).
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 59 / 60
Conclusion
Conclusion
Self- and mutually exciting processes (epidemic,
earthquakes,. . . nance)
Exponential kernel allows easy manipulation (simulation, estimation)
Quite good t on tested data (buy/sell, market/limit)
See (Bowsher 2007) for a generalized econometric framework
Lots of possible models/strategies to be imagined
See (Bacry, Delattre, Homann & Muzy 2011) for a microstructure
toy model addressing stylized facts
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 60 / 60
References
Bacry, E., Delattre, S., Homann, M. & Muzy, J. F. (2011), Modeling
microstructure noise with mutually exciting point processes,
arXiv:1101.3422v1 .
Bowsher, C. G. (2007), Modelling security market events in continuous
time: Intensity based, multivariate point process models, Journal of
Econometrics 141(2), 876912.
Bremaud, P. (1996), Stability of nonlinear Hawkes processes, The Annals
of Probability 24(3), 15631588.
Engle, R. F. (2000), The econometrics of Ultra-High-Frequency data,
Econometrica 68(1), 122.
Engle, R. F. & Russell, J. R. (1997), Forecasting the frequency of changes
in quoted foreign exchange prices with the autoregressive conditional
duration model, Journal of Empirical Finance 4(2-3), 187212.
Hewlett, P. (2006), Clustering of order arrivals, price impact and trade
path optimisation, in Workshop on Financial Modeling with Jump
processes, Ecole Polytechnique.
Large, J. (2007), Measuring the resiliency of an electronic limit order
book, Journal of Financial Markets 10(1), 125.
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 60 / 60
References
Lewis, P. A. W. & Shedler, G. S. (1979), Simulation of nonhomogeneous
poisson processes by thinning, Naval Research Logistics Quarterly
26(3), 403413.
Muni Toke, I. (2011), Market making in an order book model and its
impact on the bid-ask spread, in F. Abergel, B. Chakrabarti,
A. Chakraborti & M. Mitra, eds, Econophysics of Order-Driven
Markets, New Economic Windows, Springer-Verlag Milan, pp. 4964.
Ogata, Y. (1978), The asymptotic behaviour of maximum likelihood
estimators for stationary point processes, Annals of the Institute of
Statistical Mathematics 30(1), 243261.
Ogata, Y. (1981), On Lewis simulation method for point processes,
IEEE Transactions on Information Theory 27(1), 2331.
Ioane Muni Toke (ECP) Hawkes Processes in Finance February 23rd, 2011 60 / 60

You might also like