High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes...

25
HEC Lausanne High-frequency data modelling using Hawkes processes ValΒ΄ erie Chavez-Demoulin 1 joint work J.A McGill 1 Faculty of Business and Economics, University of Lausanne, Switzerland Boulder, April 2016 Boulder, April 2016 1 / 25

Transcript of High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes...

Page 1: High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes processes Val erie Chavez-Demoulin1 joint work J.A McGill 1Faculty of Business and Economics,

HEC Lausanne

High-frequency data modelling using Hawkes processes

Valerie Chavez-Demoulin1

joint work J.A McGill

1Faculty of Business and Economics,University of Lausanne, Switzerland

Boulder, April 2016

Boulder, April 2016 1 / 25

Page 2: High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes processes Val erie Chavez-Demoulin1 joint work J.A McGill 1Faculty of Business and Economics,

HEC LausanneHigh frequency financial data

The availability of high frequency data on transactions, quotes andorder flow has revolutionized data processing and has led to statisticalmodeling challenges

At the same time, the frequency of submission of orders has increasedand the time to execution of market orders has dropped from morethan 25 milliseconds in 2000 to less than a millisecond in 2014.

Average number Number of priceof orders in 10s changes (June 26, 2008)

Citigroup 4469 12499General Electric 2356 7862General Motors 1275 9016

Table: Taken from R.Cont, 2011, http://ssrn.com/abstract=1748022

Boulder, April 2016 2 / 25

Page 3: High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes processes Val erie Chavez-Demoulin1 joint work J.A McGill 1Faculty of Business and Economics,

HEC LausanneTrade database structure

SYMBOL DATE TIME PRICE SIZE G127 CORR CONDNVDA 20060901 9:30:04 28.67 264600 0 0 -NVDA 20060901 9:30:04 28.67 264509 0 2 -NVDA 20060901 9:30:05 28.65 100 0 0 -NVDA 20060901 9:30:05 28.65 200 0 0 -

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

36.5

37.0

37.5

38.0

38.5

Pric

e

09:30:03 10:15:19 11:35:30 13:54:00 15:02:55 15:45:54

Presence of erroneous trades: moving average filteringIrregularly spaced in time: linear interpolation

Boulder, April 2016 3 / 25

Page 4: High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes processes Val erie Chavez-Demoulin1 joint work J.A McGill 1Faculty of Business and Economics,

HEC LausanneNVDA negative log-returns from 2006 to 2008(15-minutes linearly interpolated)

βˆ’0.

10.

00.

10.

20.

3

Time(15min intervals)

Neg

ativ

e lo

g re

turn

s

2006βˆ’01βˆ’03 2007βˆ’01βˆ’03 2008βˆ’01βˆ’02 2008βˆ’12βˆ’31

NVDA, July to December 2008 negative returns exceedances :

0.02

0.04

0.06

0.08

Time(15min intervals)

Neg

ativ

e lo

g re

turn

s

2008βˆ’07βˆ’24 2008βˆ’09βˆ’03 2008βˆ’10βˆ’13 2008βˆ’11βˆ’20 2008βˆ’12βˆ’31

Boulder, April 2016 4 / 25

Page 5: High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes processes Val erie Chavez-Demoulin1 joint work J.A McGill 1Faculty of Business and Economics,

HEC LausanneExtreme Value Theory:Classical Peaks-Over-Threshold (iid case)

0 20 40 60 80 100

2040

6080

Time

x

The number of exceedances over u has a Poisson distribution withmean Ξ»

Conditional on n exceedances, their sizes Wj = Zj βˆ’ u are a randomsample of size n from the generalized Pareto distribution (GPD)

GΞΎ,Οƒ(w) =

{1βˆ’ (1 + ΞΎw/Οƒ)

βˆ’1/ΞΎ+ , ΞΎ 6= 0,

1βˆ’ exp(βˆ’w/Οƒ), ΞΎ = 0.

Boulder, April 2016 5 / 25

Page 6: High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes processes Val erie Chavez-Demoulin1 joint work J.A McGill 1Faculty of Business and Economics,

HEC LausanneNVDA log-returns from 2006 to 2008 (15-minutesinterpolated) time differences between exceedances overhigh threshold

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●

●●●●●●●

●●●●●●●●●●●●●●●●●

●●●●● ●●

● ●●

●●●●●●●

●●●●●

●●●●●●

● ● ●

●●

● ●

●

●

●

0 20 40 60 80 100 120

010

020

030

0

Exponential

Diff

eren

ce in

tim

e

does not seem exponentially distributedhigher than expected frequencies for short distance between extremes

Boulder, April 2016 6 / 25

Page 7: High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes processes Val erie Chavez-Demoulin1 joint work J.A McGill 1Faculty of Business and Economics,

HEC LausanneHigh-frequency financial data features

Returns not iid

Absolute returns highly correlated

Volatility appears to change randomly with time

Returns are leptokurtic or heavy–tailed

Extremes appear in clusters

Boulder, April 2016 7 / 25

Page 8: High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes processes Val erie Chavez-Demoulin1 joint work J.A McGill 1Faculty of Business and Economics,

HEC LausanneDeclustering methods exist:An example for daily returns

0.04

0.08

0.12

Original dataR

etur

ns in

%

1975 1980 1985 1990 1995

0.04

0.08

0.12

Declustered data

Ret

urns

in %

1975 1980 1985 1990 1995Boulder, April 2016 8 / 25

Page 9: High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes processes Val erie Chavez-Demoulin1 joint work J.A McGill 1Faculty of Business and Economics,

HEC LausanneIdea

the classical Peaks-Over-Thresholds (POT) model of EVT assumes anhomogeneous Poisson process

the inter-event times would be independent exponential randomvariables

the Figures above contradict the classical model

Aim: Treats the negative log-returns above a high threshold u as arealization of a marked point process:

Using a first model that combines a self-exciting process for thethreshold exceedance times with Generalized Pareto model for thethreshold excess sizes (mark sizes)

Using a second model that considers a self-exciting POT model

Boulder, April 2016 9 / 25

Page 10: High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes processes Val erie Chavez-Demoulin1 joint work J.A McGill 1Faculty of Business and Economics,

HEC LausanneOverall loglikelihood (POT method)

Since number and mark size for the threshold exceedances are assumedindependent

l(Ξ», Οƒ, ΞΎ) = log

P(Nu = n)n∏

j=1

gΞΎ,Οƒ(wj)

.

= n log Ξ»βˆ’ Ξ»βˆ’ n log Οƒ βˆ’ (1 + 1/ΞΎ)nβˆ‘

j=1

log(1 + ΞΎwj/Οƒ)+

so inference can be performed separately for the frequency of exceedancesand their sizes.

Boulder, April 2016 10 / 25

Page 11: High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes processes Val erie Chavez-Demoulin1 joint work J.A McGill 1Faculty of Business and Economics,

HEC LausanneMarked Point Processes (1)

consider an event process (Ti ,Wi ), i ∈ Zobserved over the period (0; t0] gives data (t1,w1), . . . , (tn,wn)

let Ht , entire history of process up to time t

the joint density of the data seen over (0, t0] can be written

n∏i=1

fTi ,Wi |Htiβˆ’1(ti ,wi |Htiβˆ’1)P(Tn+1 > t0|Htn)

Boulder, April 2016 11 / 25

Page 12: High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes processes Val erie Chavez-Demoulin1 joint work J.A McGill 1Faculty of Business and Economics,

HEC LausanneMarked Point Processes (2)

Assuming independence of times Ti and marks Wi the conditional densityfunction is

fTi ,Wi |Htiβˆ’1(ti ,wi |Htiβˆ’1) = fTi |Htiβˆ’1

(ti |Htiβˆ’1) Β· fWi |Htiβˆ’1(wi |Htiβˆ’1)

leading to the log-likelihood

` =

{nβˆ‘

i=1

log fTi |Hiβˆ’1(ti ) + logP(Tn+1 > t0|Htn)

}A

+

{nβˆ‘

i=1

log fWi |Htiβˆ’1(wi |Htiβˆ’1)

}B

Boulder, April 2016 12 / 25

Page 13: High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes processes Val erie Chavez-Demoulin1 joint work J.A McGill 1Faculty of Business and Economics,

HEC LausanneHawkes process

Combining separately a Hawkes process for the counting process of thetimes (part A) and a GPD model for the contributions from the marks(part B), the likelihood becomes

` = log

{n∏

i=1

Ξ»(ti |Hti ) exp

(βˆ’βˆ« t0

0Ξ»(u|Hu)du

)}

βˆ’n log Οƒ βˆ’ (1 + 1/ΞΎ)nβˆ‘

i=1

log(1 + ΞΎwi/Οƒ)

with Ξ»(t|Ht) being the conditional intensity

Boulder, April 2016 13 / 25

Page 14: High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes processes Val erie Chavez-Demoulin1 joint work J.A McGill 1Faculty of Business and Economics,

HEC LausanneSelf-exciting process

We chose the following general form with a constant loading Β΅0

Ξ»(t|Ht) = Β΅0 +βˆ‘j :tj<t

Ο‰(t βˆ’ tj ;w j),

where Β΅0 > 0 and the self-exciting function Ο‰(s) has to be positive whens β‰₯ 0 and 0 elsewhere. For example, the conditional intensity modelproposed by Ogata (1988) is

Ξ»(t|Ht) = Β΅0 + Οˆβˆ‘j :tj<t

eΞ΄wj

(t βˆ’ tj + Ξ³)1+ρETAS

where ¡0, ψ, δ, γ, ρ > 0.

Boulder, April 2016 14 / 25

Page 15: High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes processes Val erie Chavez-Demoulin1 joint work J.A McGill 1Faculty of Business and Economics,

HEC LausanneApplications to high-frequency data:15-minutes linearly interpolated NVDA 2008 negativelog-returns

βˆ’0.

100.

05

Time(15min intervals)

Neg

ativ

e lo

g re

turn

s

2008βˆ’01βˆ’02 2008βˆ’04βˆ’03 2008βˆ’07βˆ’02 2008βˆ’10βˆ’01 2008βˆ’12βˆ’31

0.00

0.06

0.12

Est

imat

ed in

tens

ity

2008βˆ’01βˆ’02 2008βˆ’04βˆ’03 2008βˆ’07βˆ’02 2008βˆ’10βˆ’01 2008βˆ’12βˆ’31

Boulder, April 2016 15 / 25

Page 16: High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes processes Val erie Chavez-Demoulin1 joint work J.A McGill 1Faculty of Business and Economics,

HEC LausanneEstimated cumulative events numberΞ›Ht (t) =

∫ t0 λ(u|Hu)du and two-sided 95% and 99% confidence limits

based on the Kolmogorov-Smirnov statistic

0 50 100 150 200 250 300 350

050

100

150

200

250

300

350

Transformed time

Cum

ulat

ive

num

ber

of e

xtre

me

loss

es

Boulder, April 2016 16 / 25

Page 17: High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes processes Val erie Chavez-Demoulin1 joint work J.A McGill 1Faculty of Business and Economics,

HEC LausanneAlternative models (1)

Hawkes process with exponential decay

Ξ»(t|Ht) = Β΅0 + Οˆβˆ‘j :tj<t

exp{Ξ΄wj βˆ’ Ξ³(t βˆ’ tj)}.

First order Markov chain for the marks

Wi |Wiβˆ’1 = wi ∼ GPD(ΞΎ, Οƒi = exp(a + bwiβˆ’1))

whose parameters a, b and ΞΎ can be estimated by maximising

n∏i=2

fWi |Wiβˆ’1(wi | wiβˆ’1)fw1(w1)

Diagnostic for the marginal distribution based on the residuals

Rj = ΞΎβˆ’1 log (1 + ΞΎwj/Οƒj), j = 1, . . . , n

approximately independent unit exponential variables

Boulder, April 2016 17 / 25

Page 18: High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes processes Val erie Chavez-Demoulin1 joint work J.A McGill 1Faculty of Business and Economics,

HEC LausanneAlternative models (2):A self-exciting POT modelA model with predictable marks

Ξ»?(t,w) =Ο„ + Ξ±1Ξ½(t)

Οƒ + Ξ±2Ξ½(t)

(1 + ΞΎ

w βˆ’ u

Οƒ + Ξ±2Ξ½(t)

)βˆ’1/ΞΎβˆ’1Where Ξ½(t) =

βˆ‘j :tj<t Ο‰(t βˆ’ tj) uses a self-exciting function Ο‰. This uses

the two-dimensional re-parametrisation of the POT:

Homogeneous Poisson process for the exceedances of the level u with

intensity Ο„ = βˆ’ lnH(u;Β΅, Ξ², ΞΎ) = {1 + ΞΎ(u βˆ’ Β΅)/Ξ²}βˆ’1/ΞΎ+ , whereH(y ;Β΅, Ξ², ΞΎ) is the GEV distribution and Οƒ = Ξ² + ΞΎ(u βˆ’ Β΅)

Inhomogeneous Poisson process for their sizes with intensity

Ξ»(t,w) = Ξ»(w) =1

Οƒ

(1 + ΞΎ

w βˆ’ u

Οƒ

)βˆ’1/ΞΎβˆ’1Boulder, April 2016 18 / 25

Page 19: High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes processes Val erie Chavez-Demoulin1 joint work J.A McGill 1Faculty of Business and Economics,

HEC LausanneEstimated intensity of exceeding the threshold fromself-exciting POT model for NVDA with Ogata function

0 1000 2000 3000 4000 5000 6000 7000

24

68

10

Time (15 min intervals)Mar

ks a

mpl

itude

in p

erce

nt

0 1000 2000 3000 4000 5000 6000 7000

0.1

0.3

Time (15 min intervals)

Inte

nsity

0 1000 2000 3000 4000 5000 6000 7000

0.8

1.0

1.2

1.4

Time (15 min intervals)

mea

n of

the

GP

D

Boulder, April 2016 19 / 25

Page 20: High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes processes Val erie Chavez-Demoulin1 joint work J.A McGill 1Faculty of Business and Economics,

HEC LausanneConditional risk measures

The conditional approach models the intraday clustering of extremesand is used to calculate instantaneous conditional p =95% or 99%VaR over the next period

z t+1p = Fβˆ’1Zt+1|Ht

(p),

FZt+1|Ht(z) = P(Zt+1 > z |Ht) which is

P(Zt+1 βˆ’ u > z |Zt+1 > u,Ht)Γ— P(Zt+1 > u|Ht).

P(Zt+1 > u|Ht) represents the conditional probability of an event in(t, t + 1) that is:

1βˆ’ P{N(t, t + 1) = 0|Ht} = 1βˆ’ exp

(βˆ’βˆ« t+1

tΞ»(u|Hu)du

)P(ZT+1 βˆ’ u > z |Zt+1 > u,Ht) is estimated using the GPD modelwith parameters Οƒ and ΞΎ.

Boulder, April 2016 20 / 25

Page 21: High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes processes Val erie Chavez-Demoulin1 joint work J.A McGill 1Faculty of Business and Economics,

HEC LausanneConditional VaR and Expected Shortfall

The VaR z t+1p is then the solution of the equation

P(ZT+1 > z t+1p |Ht) = 1βˆ’ p,

Using the self-exciting POT model the condition VaR is

z t+1p = u +

Οƒ + Ξ±2Ξ½(t+)

ΞΎ

{(1βˆ’ p

Ο„ + Ξ±1Ξ½(t+)

)βˆ’ΞΎβˆ’ 1

}

From the estimated conditional VaR it is straightforward to get anestimation of the conditional Expected Shortfall (ES)

ESt+1p =

zt+1p

1βˆ’ ΞΎ+Οƒ βˆ’ ΞΎu1βˆ’ ΞΎ

.

with parameters replaced by their maximum likelihood estimates

Boulder, April 2016 21 / 25

Page 22: High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes processes Val erie Chavez-Demoulin1 joint work J.A McGill 1Faculty of Business and Economics,

HEC Lausanne15-minutes 95%VaR (red) and 95%ES (blue)estimates for NVDA negative log-returns using self-excitingPOT models and 95%VaR using classical POT (green)

βˆ’0.

10βˆ’

0.05

0.00

0.05

Times (15 min intervals)

Neg

ativ

e lo

g re

turn

s

2008βˆ’07βˆ’24 2008βˆ’09βˆ’03 2008βˆ’10βˆ’13 2008βˆ’11βˆ’20 2008βˆ’12βˆ’31

Boulder, April 2016 22 / 25

Page 23: High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes processes Val erie Chavez-Demoulin1 joint work J.A McGill 1Faculty of Business and Economics,

HEC Lausanne15-minutes 95%VaR and 95%ES estimates forNVDA negative log-returns using a competitor model(Chavez-Demoulin et al. (2014))

βˆ’0.

10βˆ’

0.05

0.00

0.05

Time

Neg

ativ

e lo

g re

turn

s

2008βˆ’07βˆ’24 2008βˆ’09βˆ’03 2008βˆ’10βˆ’13 2008βˆ’11βˆ’20 2008βˆ’12βˆ’31

Boulder, April 2016 23 / 25

Page 24: High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes processes Val erie Chavez-Demoulin1 joint work J.A McGill 1Faculty of Business and Economics,

HEC LausanneBacktesting results

0.95 QuantileExpected 25

POT 59 (0)ETAS ρ = 0 21 (0.24)ETAS ρ 6= 0 22 (0.31)

ETAS? ρ = 0 24 (0.47)ETAS? ρ 6= 0 23 (0.39)

exp? 25 (0.55)NPOT 26 (0.39)

0.99 QuantileExpected 5

POT 14 (0)ETAS ρ = 0 6 (0.39)

exp 6 (0.39)ETAS? ρ = 0 6 (0.39)

exp? 7 (0.24)NPOT 9 (0.11)

0.999 QuantileExpected 5

POT 14 (0)H1 ρ = 0 6 (0.39)H2 ρ 6= 0 6 (0.39)

H3 6 (0.39)H1? 6 (0.39)H2? 6 (0.39)H3? 7 (0.24)

NPOT 9 (0.11)

Boulder, April 2016 24 / 25

Page 25: High-frequency data modelling using Hawkes processesHigh-frequency data modelling using Hawkes processes Val erie Chavez-Demoulin1 joint work J.A McGill 1Faculty of Business and Economics,

HEC LausanneReferences

A.G. Hawkes, 1971, Point spectra of some mutually exciting pointprocesses, Biometrika.

Y. Ogata, 1988, Statistical models for earthquake Occurrences andresiduals analysis for point processes, JASA.

E. Errais, K. Giesecke and L.R. Goldberg, 2010, Affine point processesand portfolio credit risk, SIAM J. Financial Math.

Y. AIt-Sahalia, J. Cacho-Diaz, and R. J. A. Laeven, 2010, Modelingfinancial contagion using mutually exciting jump processes, TheReview of Financial Studies.

V. Chavez-Demoulin, A.C. Davison, A.J. McNeil, 2005, A pointprocess approach to Value-at-Risk estimation, Quantitative Finance.

V. Chavez-Demoulin, P. Embrechts, S.Sardy, 2014 Extreme-quantiletracking for financial time series Journal of Econometrics.

Boulder, April 2016 25 / 25