Point Process Models for Multivariate High-Frequency Irregularly

Similar documents
Generalized Semi- Markov Processes (GSMP)

A statistical method to determine sample size to estimate characteristic value of soil parameters

The Poisson Process *

Exponential Families and Bayesian Inference

Confidence interval for the two-parameter exponentiated Gumbel distribution based on record values

EECS564 Estimation, Filtering, and Detection Hwk 2 Solns. Winter p θ (z) = (2θz + 1 θ), 0 z 1

1 Introduction to reducing variance in Monte Carlo simulations

Double Stage Shrinkage Estimator of Two Parameters. Generalized Exponential Distribution

CEE 522 Autumn Uncertainty Concepts for Geotechnical Engineering

ECONOMETRIC THEORY. MODULE XIII Lecture - 34 Asymptotic Theory and Stochastic Regressors


STAT331. Example of Martingale CLT with Cox s Model

Recurrence Relations

Problem Set 4 Due Oct, 12

Lecture 19: Convergence

MA Advanced Econometrics: Properties of Least Squares Estimators

Kolmogorov-Smirnov type Tests for Local Gaussianity in High-Frequency Data

Let us give one more example of MLE. Example 3. The uniform distribution U[0, θ] on the interval [0, θ] has p.d.f.

Properties and Hypothesis Testing

Probability, Expectation Value and Uncertainty

1 Inferential Methods for Correlation and Regression Analysis

EXAMINATIONS OF THE ROYAL STATISTICAL SOCIETY

EE / EEE SAMPLE STUDY MATERIAL. GATE, IES & PSUs Signal System. Electrical Engineering. Postal Correspondence Course

Kernel density estimator

3. Z Transform. Recall that the Fourier transform (FT) of a DT signal xn [ ] is ( ) [ ] = In order for the FT to exist in the finite magnitude sense,

Resampling Methods. X (1/2), i.e., Pr (X i m) = 1/2. We order the data: X (1) X (2) X (n). Define the sample median: ( n.

Problems from 9th edition of Probability and Statistical Inference by Hogg, Tanis and Zimmerman:

Lecture 7: October 18, 2017

THE KALMAN FILTER RAUL ROJAS

Random Variables, Sampling and Estimation

A New Solution Method for the Finite-Horizon Discrete-Time EOQ Problem

Discrete Mathematics for CS Spring 2008 David Wagner Note 22

Mathematical Modeling of Optimum 3 Step Stress Accelerated Life Testing for Generalized Pareto Distribution

Statistical Pattern Recognition

6.3 Testing Series With Positive Terms

The target reliability and design working life

Last time: Moments of the Poisson distribution from its generating function. Example: Using telescope to measure intensity of an object

6. Sufficient, Complete, and Ancillary Statistics

This exam contains 19 pages (including this cover page) and 10 questions. A Formulae sheet is provided with the exam.

MAS275 Probability Modelling

Limit Theorems. Convergence in Probability. Let X be the number of heads observed in n tosses. Then, E[X] = np and Var[X] = np(1-p).

Study the bias (due to the nite dimensional approximation) and variance of the estimators

Goodness-Of-Fit For The Generalized Exponential Distribution. Abstract

ECE 8527: Introduction to Machine Learning and Pattern Recognition Midterm # 1. Vaishali Amin Fall, 2015

Math 155 (Lecture 3)

Approximations and more PMFs and PDFs

Discrete-Time Systems, LTI Systems, and Discrete-Time Convolution

Infinite Sequences and Series

On Random Line Segments in the Unit Square

Slide Set 13 Linear Model with Endogenous Regressors and the GMM estimator

A Note on Box-Cox Quantile Regression Estimation of the Parameters of the Generalized Pareto Distribution

Chapter 6 Principles of Data Reduction

ADVANCED SOFTWARE ENGINEERING

MATH 320: Probability and Statistics 9. Estimation and Testing of Parameters. Readings: Pruim, Chapter 4

SINGLE-CHANNEL QUEUING PROBLEMS APPROACH

Estimation for Complete Data

Linear Regression Demystified

On an Application of Bayesian Estimation

Mathematical Statistics - MS

First Year Quantitative Comp Exam Spring, Part I - 203A. f X (x) = 0 otherwise

1.3 Convergence Theorems of Fourier Series. k k k k. N N k 1. With this in mind, we state (without proof) the convergence of Fourier series.

Random Walks on Discrete and Continuous Circles. by Jeffrey S. Rosenthal School of Mathematics, University of Minnesota, Minneapolis, MN, U.S.A.

Chandrasekhar Type Algorithms. for the Riccati Equation of Lainiotis Filter

ECE-S352 Introduction to Digital Signal Processing Lecture 3A Direct Solution of Difference Equations

The Method of Least Squares. To understand least squares fitting of data.

Comparison of Minimum Initial Capital with Investment and Non-investment Discrete Time Surplus Processes

Statistical Inference Based on Extremum Estimators

Sample Size Estimation in the Proportional Hazards Model for K-sample or Regression Settings Scott S. Emerson, M.D., Ph.D.

Stochastic Simulation

Goodness-of-Fit Tests and Categorical Data Analysis (Devore Chapter Fourteen)

Session 5. (1) Principal component analysis and Karhunen-Loève transformation

R. van Zyl 1, A.J. van der Merwe 2. Quintiles International, University of the Free State

Vector Quantization: a Limiting Case of EM

Appendix: The Laplace Transform

Subject: Differential Equations & Mathematical Modeling-III

Modeling and Performance Analysis with Discrete-Event Simulation

Bayesian and E- Bayesian Method of Estimation of Parameter of Rayleigh Distribution- A Bayesian Approach under Linex Loss Function

Lecture 2: Monte Carlo Simulation

Lecture 33: Bootstrap

Basics of Probability Theory (for Theory of Computation courses)

J. Stat. Appl. Pro. Lett. 2, No. 1, (2015) 15

Economics 241B Relation to Method of Moments and Maximum Likelihood OLSE as a Maximum Likelihood Estimator

STA6938-Logistic Regression Model

Problem Set 2 Solutions

Statistical Inference (Chapter 10) Statistical inference = learn about a population based on the information provided by a sample.

Approximate Confidence Interval for the Reciprocal of a Normal Mean with a Known Coefficient of Variation

ECE 901 Lecture 12: Complexity Regularization and the Squared Loss

Notes on iteration and Newton s method. Iteration

11 Correlation and Regression

5. Likelihood Ratio Tests

An Introduction to Randomized Algorithms

Recursive Algorithms. Recurrences. Recursive Algorithms Analysis

(b) What is the probability that a particle reaches the upper boundary n before the lower boundary m?

CHAPTER 8 FUNDAMENTAL SAMPLING DISTRIBUTIONS AND DATA DESCRIPTIONS. 8.1 Random Sampling. 8.2 Some Important Statistics

Direction: This test is worth 250 points. You are required to complete this test within 50 minutes.

Optimization Methods MIT 2.098/6.255/ Final exam

The Sample Variance Formula: A Detailed Study of an Old Controversy

AAEC/ECON 5126 FINAL EXAM: SOLUTIONS

5.1 A mutual information bound based on metric entropy

Convergence of random variables. (telegram style notes) P.J.C. Spreij

Transcription:

oit rocess Models for Multivariate High-Frequecy Irregularly Spaced Data 12-31-212 Stephe Crowley stephe.crowley@hushmail.com Abstract. Defiitios from the theory of poit processes are recalled. Models of itesity fuctio parametrizatio ad maximum likelihood estimatio from data are explored. Closed-form log-likelihood expressios are give for the Hawkes uivariate ad multivariate)process, Autoregressive Coditioal DuratioACD), with both expoetial ad Weibull distributed errors, ad a hybrid model combiig the ACD ad the Hawkes models. Diural, or daily, adjustmet of the determiistic predictable part of the itesity variatio via piecewise polyomial splies is discussed. Data from the symbol SY o three differet electroic markets is used to estimate model parameters ad geerate illustrative plots. The parameters were estimated without diural adjustmets, a repeat of the aalysis with adjustmets is due i a future versio of this article. The coectio of the Hawkes process to quatum theory is briefly metioed. The Hawkess process with a Weibull kerel is also briefly metioed ad will be explored more i the future. Table of cotets 1. Defitios.................................................. 1 1.1. oit rocesses ad Itesities................................... 1 1.1.1. Stochastic Itegrals....................................... 3 1.2. The Expoetial Autoregressive Coditioal DuratioEACD) Model.......... 3 1.2.1. The Weibull-ACD Model................................... 5 1.3. The Hawkes rocess......................................... 5 1.3.1. Liear Self-Excitig rocesses................................ 6 1.3.2. The Hawkes1) Model..................................... 7 1.3.3. Maximum Likelihood Estimatio.............................. 8 1.3.4. The Hawkes rocess i Quatum Theory......................... 8 1.4. The Hawkes rocess Havig a Weibull Kerel......................... 9 1.5. Combiig the ACD ad Hawkes Models............................ 9 1.6. Multivariate Hawkes Models................................... 1 1.6.1. The Compesator....................................... 12 1.6.2. Log-Likelihood......................................... 12 2. Numerical Methods.......................................... 13 2.1. The Nelder-Mead Algorithm................................... 13 2.1.1. Startig oits for Optimizig the Hawkes rocess of Order.......... 13 3. Examples................................................. 13 3.1. Millisecod Resolutio Trade Sequeces............................ 13 3.1.1. Adjustig for the Determiistic Daily Itesity Variatio............. 13 3.1.2. Uivarate Hawkes model fit to SY SDR S& 5 ETF Trust)........ 14 3.1.3. Multivariate SY Data for 212-8-14......................... 2 3.1.4. Multivariate SY Data for 212-11-19......................... 21 Bibliography................................................. 22 1.1. oit rocesses ad Itesities. 1. Defitios 1

2 oit rocess Models for Multivariate High-Frequecy Irregularly Spaced Data Cosider a K dimesioal multivariate poit process. Let N k t deote the coutig process associated with the k-th poit process which is simply the umber of evets which have occured by time t. Let F t deote the filtratio of the pooled process N t of K poit processes cosistig of the set t k <t k 1 <t k 2 < <t k i < deotig the history of arrival times of each evet type associated with the k=1 K poit processes. At time t, the most recet arrival time will be deoted t k k Nt. A process is said to be simple if o poits occur at the same time, thas, there are o zero-legth duratios. The coutig process ca be represeted as a sum of Heaviside step fuctios θt)= { t< 1 t N t k = ti k t θt k ) 1) The coditioal itesity fuctio gives the coditioal probability per uit time that a evet of type k occurs i the exstat. For small values of t we have λ k t F t )= lim t k rn t+ t N k t > F t ) t 2) so that λ k k t F t ) t=en t+ t N k t F t )+o t) 3) k EN t+ t N k t ) λ k t F t ) t)=o t) 4) ad 4) will be ucorrelated with the past of F t as t. Next cosider lim t s 1 s ) t k Ns+j t = lim N s k N s1 t =N k s N k s1 ) k ) s ) k N s +j 1) t λ k s +j t F t ) t s 1 s ) t s 1 λ k t F t )dt λ k j t F t ) t 5) which will be ucorrelated with F s, thas s 1 E λ k t F t )dt) =N k k s N s1 6) s The itegrated itesity fuctio is kow as the compesator, or more precisely, the F t -compesator ad will be deoted by Λ k s 1 s,s 1 )= λ k t F t )dt 7) s Let x k = t k k i 1 deote the time iterval, or duratio, betwee the i-th ad i 1)-th arrival times. The F t -coditioal survivor fuctio for the k-th process is give by Let S k x i k )= k k >x i k F ti 1+τ) 8) Ẽ k i = λ k t F t )dt=λ k 1, ) 1 the provided the survivor fuctio is absolutely cotiuous with respect to Lebesgue measurewhich is a assumptio that eeds to be verified, usually by graphical tests) we have S k x k i )=e t λ k t F t )dt k i 1 =e Ẽ i 9)

,, 3 ad Ẽ Nt) is a i.i.d. expoetial radom variable with uit mea ad variace. Sice E Ẽ Nt) ) =1 the radom variable k E Nt) =1 Ẽ Nt) 1) has zero mea ad uit variace. ositive values of E Nt) idicate that the path of coditioal itesity fuctio λ k t F t ) uder-predicted the umber of evets i the time iterval ad egative values of E Nt) idicate that λ k t F t ) over-predicted the umber of evets i the iterval. I this way, 8) ca be iterpreated as a geeralized residual. The backwards recurrece time give by icreases liearly with jumps back to at each ew poit. U k) t)=t t N k t) 11) 1.1.1. Stochastic Itegrals. The stochastic Stieltjes itegral[1, 2.1][8, 2.2] of a measurable process, havig either locally bouded or oegative sample paths, Xt) with respect to N k exists ad for each t we have Xs)dN k s = θt t k i )Xt k i ) 12),t] i 1 1.2. The Expoetial Autoregressive Coditioal DuratioEACD) Model. Lettig p i be the family of coditioal probability desity fuctios for arrival time, the log likelihood of the expoetial) ACD model ca be expressed i terms of the coditioal desities or itesities as [11] ll{ } i= ) = logp i t,, 1 ) i= ) t = logλ i 1,t,, 1 ) λu,t,,t Nu )du i=1 = i=1 = i=1 logλ i 1,t,, 1 ) λu,t,,t Nu )du 1 ) logλ i 1,t,, 1 ) Ẽ i t = lλt)dnt t t t λt)dt We will see that λ ca be parameterized i terms of t ) 13) λt N t,t 1,,t Nt )=ω+ i=1 N t π i t Nt+1 i t Nt i) 14) so that the impact of a duratio betwee successive evets depeds upo the umber of iterveig evets. Let x i = 1 be the iterval betwee cosecutive arrival times; the x i is a sequece of duratios or waitig times. The coditioal desity of x i give its pass the give directly by Ex i x i 1,,x 1 )=ψ i x i 1,,x 1 ;θ)=ψ i 15) The the ACD models are those that cosist of the assumptio x i =ψ i ε i 16) where ε i is idepedetly ad idetically distributed with desity pε; φ) where θ ad φ are variatio free. ACD processes are limited to the uivariate settig but later we will see that this model ca be combied with a Hawkes process i a multivariate framework. [6] The coditioal itesity of a ACD model ca be expressed i geeral as λt N t,t 1,,t Nt )=λ t tnt ψ Nt+1 ) 1 ψ Nt+1 17)

4 oit rocess Models for Multivariate High-Frequecy Irregularly Spaced Data where λ t) is a determiistic baselie hazard, so that the past history iflueces the coditioal itesity by both a multiplicative effect ad a shif the baselie hazard. This is called a accelerated failure time model sice pasformatio iflueces the rate at which time passes. The simplest model is the expoetial ACD which assumes that the duratios are coditioally expoetial so that the baselie hazard λ t)=1 ad the coditioal itesity is λt x Nt,,x 1 )= 1 ψ Nt +1 18) The compesator for cosecutive evets of the ACD model i the case of costat baselie itesity λ t)=1 is simply Ẽ i =Λ k 1, ) = λt x i,,x 1 )dt t i 1 1 = dt 1 ψ Nt +1 1 = dt ψ i 1 = 1 ψ i = x i ψ i where x i = 1. A geeral model without limited memory is referred to as ACDm,q) where m ad q refer to the order of the lags so that there are m+q+1) parameters. m ψ i =ω+ q α j x i j + 19) ψ i j 2) ω 1 q j=q where ω,α j, ad ψ i = for i=1 maxm,q) so the coditioal itesity is the writte 1 λt x Nt,,x 1 )= ω+ m α j x q 21) Nt+1 j+ ψ Nt+1 j The log-likelihood for the ACDm,q) model is the writte i terms of the duratios x i = 1 ) ll{x i } i=1,, ) = lλ i 1,t,, 1 ) Ẽ i i=1 = ) Sxi ) l ψ i i=1 ) e Ẽi ψ i = l i=1 = i=1 = i=1 l e xi ψ i ψ i 1 l ψ i ) x i ψ i 22) A ACD process is statioary if m α j + q i=1 i=1 <1 23)

,, 5 i which case the ucoditioal mea exists ad is give by ω µ=e[x i ]= 1 m i=1 α j + q i=1 ) 24) The goodess of fit ca be checked by testig that residuals Ẽ i have mea ad variace equal to 1 ad o autocorrelatio. 1.2.1. The Weibull-ACD Model. The WACDWeibull-ACD) model exteds the EACD model by assumig a Weibull distributio for the residuals ε i i 16) istead of a expoetial. We have the itesity give by ad log-likelihood by 1+ λt x Nt,,x 1 )= Γ 1 γ ψ Nt+1 ) ) ll{x i } i=1,, ) = ) γ 1+ l +γl Γ 1 γ x i ψ i i=1 γ t t Nt ) γ 1 γ 25) x i ) 1+ Γ 1 γ ψ i x i γ 26) The goodess of fit ca be checked by testig that the mea of Ẽ i is equal to 1 ad graphically checkig whas kow as a weibull plot. If is a good fit, the empirical curve will be ear the straight lie. I the example show below, the weibull does better tha the expoetial bus still ot a great fit..999.99.96.9.75.5.25 Weibull robability lot.1 robability.5.2.1.3.1 1 3 1 2 1 1 1 1 1 Data Figure 1. Weibull plot for WACD1,1) model fit to SY INET o 212-11-3 1.3. The Hawkes rocess.

6 oit rocess Models for Multivariate High-Frequecy Irregularly Spaced Data 1.3.1. Liear Self-Excitig rocesses. A uivariate) liear self-excitig coutig) process N s oe that ca be expressed as [15][7][14][3] t λt) =λ t)κ+ νt s)dn s =λ t)κ+ 27) νt ) <t where λ t) is a determiistic base itesity, see 77), ν: R + R + expresses the positive ifluece of past evets o the curret value of the itesity process, ad κ takes the place of the λ costa the refereced papers. The expoetial) Hawkes process of order is a liear selfexcitig process defied by the expoetial kerel so that the itesity is writte as νt)= α j e βjt 28) λt) =λ t)κ+ t N t 1 α j e βjt s) dn s =λ t)κ+ α j e βjt ti) i= =λ t)κ+ N t 1 α j e βjt ti) =λ t)κ+ =λ t)κ+ i= N t 1 α j e βjt tk) i= α j B j N t ) 29) where B j i) is give recursively by i 1 A uivariate Hawkes process is statioary if B j i) = 3) k= =1+B j i 1))e βjt ti) e βjt tk) αj If a Hawkes process is statioary the the ucoditioal mea is <1 31) λ µ=e[λt)] = 1 νt)dt = λ 1 λ = 1 α j α j e βjt dt 32)

,, 7 For cosecutive evets, we have the compesator 7) Λ 1, ) = λt)dt 1 = λ t)+ α j B j N t ) dt 1 = λ s)ds+ i 1 αj e 1 t k) e βjti tk)) 1 k= = λ s)ds+ αj ) 1 e 1) A j i 1) 1 where there is the recursio A j i) = e βjti tk) t k i 1 e βjti tk) = k= 33) 34) =1+e βjti ti 1) A j i 1) with A j )=. If λ t)=λ the 33) simplifies to Λ 1, ) = 1 )λ + k= = 1 )λ + i 1 αj αj e 1 t k) e βjti tk)) 1 e 1) ) A j i 1) 35) Similiarly, aother parameterizatio is give by Λ 1, ) = κλ s)ds+ αj ) 1 e 1) A j i 1) 1 =κ λ s)ds+ αj ) 1 e 1) A j i 1) 1 36) =κλ 1, )+ αj 1 e 1) ) A j i 1) where κ scales the predetermied baselie itesity λ s). I this parameterizatio the itesity is also scaled by κ λt) =κλ t)+ α j B j N t ) 37) this allows to precompute the determiistic part of the compesator Λ 1, )= 1 λ s)ds. 1.3.2. The Hawkes1) Model. The simplest case occurs whe the baselie itesity λ t) is costat ad =1 where we have λt)=λ + αe βt ti) 38) <t

8 oit rocess Models for Multivariate High-Frequecy Irregularly Spaced Data which has the ucoditioal mea E[λt)]= λ 1 α β 39) 1.3.3. Maximum Likelihood Estimatio. The log-likelihood of a simple poit process is writte as T llnt) t [,T] ) = =T 1 λs))ds+ T λs)ds + T T lλs)dn s lλs)dn s 4) which i the case of the Hawkes model of order ca be explicitly writte [13] as ll{ } i=1 ) =T Λ,T)+ i=1 =T + i=1 lλ ) lλ ) Λ 1, ) =T Λ,T)+ lλ ) i=1 =T Λ,T)+ l κλ )+ i=1 =T Λ,T)+ i=1 i 1 k=1 l κλ )+ α j R j i) α j e βjti tk) 41) =T + i=1 T κλ s)ds αj i=1 l κλ )+ α j R j i) ) 1 e t ) where T =t ad we have the recursio[12] i 1 e βjti tk) R j i) = k=1 =e βjti ti 1) 1+R j i 1)) 42) If we have costat baselie itesity λ t)=1 the the log-likelihood ca be writte ll{ } i=1 ) =T κt i=1 + i=1 αj l λ + α j R j i) ) 1 e t ) 43) Note that was ecessary to shift each by t 1 so that t 1 = ad t =T. Also ote that T is just a additive costat which does ot vary with the parameters so for the purposes of estimatio ca be removed from the equatio. 1.3.4. The Hawkes rocess i Quatum Theory.

,, 9 The Hawkes process arises i quatum theory by cosiderig feedback via cotiuous measuremets where the quatum aalog of a self-excitig poit process is a source of irreversibility whose stregth is cotrolled by the rate of detectios from that source. [16]. 1.4. The Hawkes rocess Havig a Weibull Kerel. The expoetial kerel of the Hawkes process ca be replaced with that of a Weibull kerel. [1, 6.3] Recall that the itesity is defied by 27) t λt) =λ t)κ+ νt s)dn s =λ t)κ+ νt ) <t 44) where the expoetial kerel νt)= so the Weibull-Hawkes itesity is writte is λt) =λ t)κ+ α j e βjs replaced by the Weibull kerel νt)= ) ) ) κj κj t κj 1 t ω α j e j 45) ω j ω j =λ t)κ+ i= t N t 1 α j κj ω j α j κj ω j ) t s ω j ) t ti ω j ) ) κj κj 1 e βj t s ω j dn s ) κj 1 e t ω j ) κj 46) 1.5. Combiig the ACD ad Hawkes Models. The ACD ad Hawkes models ca be combied to provide a model for itraday volatility. [2] Let λt) =λ t)+ 1 t + νt s)dn s 47) ψ Nt where λ t) is the determistic baselie itesity77) ad where the ACD2) pars m ψ i =ω+ q α j x i j + ψ i j 48) ad the Hawkes part has the expoetial kerel28) νt)= γ j e ϕjt 49) so that t νt s)dn s = t γ j e ϕjt s) dn s N t νt t k ) = k= N t = k= = N t γ j k= = γ j B j N t ) γ j e ϕjt tk) e ϕjt tk) 5)

1 oit rocess Models for Multivariate High-Frequecy Irregularly Spaced Data where we have replaced α=γ ad β=ϕ i the Hawkes part so that the parameter ames do ot coflict with the ACD part where α ad β are also used as parameter ames. The Hawkes part of the itesity has a recursive structure similiar to that of the compesator. Let where B j )=. The we have i 1 B j i) = 51) k= =1+B j i 1))e ϕjt ti) e ϕjt tk) 1 λt) =λ t)+ ω+ m α j x q + γ j B j N t ) 52) Nt j+ ψ Nt j The log-likelihood for this hybrid model ca be writte as ll{ } i=1,.., ) = i=1 lλ ) 1 ) λt)dt = lλ ) Λ 1, )) i=1 53) = i=1 lλti ) Ẽ i ) By direct calculatio, combiig 19) ad 33), ad lettig x i = 1 we have the compesator Ẽ i =Λ 1, ) = λt)dt t i 1 = λ t)+ 1 1 ψ Nt +1 = x i + λ t)+ ψ i 1 ti = λ t)dt+ x i + ψ ti 1 i k= = 1 + t t νt s)dn s )dt νt s)dn s )dt i 1 γj e ϕjti 1 tk) e ϕjti tk)) ϕ j λ t)dt+ x i + γj 1 e ϕjxi )A j i 1) ψ i ϕ j 54) where ψ i is defied by 48) ad is give by 34) so that 53) ca be wriitte as A j i)=1+e ϕjxi A j i 1) 55) ll{ } i=,.., ) = lλ ) Ẽ i ) i=1 = lλti ) x i + γj 1 e ϕjxi )A j i 1) ψ i ϕ j i=1 = l 1 i 1 + γ ψ j e ϕjti tk) x i + γj 1 e ϕjxi )A i ψ i ϕ j i 1) j i=1 k= = l 1 + γ ψ j B j i) x i + γj 1 e ϕjxi )A i ψ i ϕ j i 1) j i=1 1.6. Multivariate Hawkes Models. Let M N ad { m )} m=1,,m be a M-dimesioal poit process. The associated coutig process will be deoted N t =N t 1,,N t M ). A multivariate Hawkes process[7][5][9] is defied with 56)

,, 11 itesities λ m t),m=1 M give by M λ m t) =λ m t)κ m + =1 =λ m t)κ m + =1 =λ m t)κ m + =1 =λ m t)κ m + =1 =λ m t)κ m + =1 =λ m t)κ m + =1 t M t k <t M M M M α m, j e β m, j t s) dn s α j m, α m, j e β m, j t t k ) t k <t α j m, t k <t N t 1 α j m, k= α j m, B j m, N t ) e β m, j t t k ) e β m, j t t k ) e β m, j t t k ) where i this parameterizatio κ is a vector which scales the baselie itesities, i this case, specified by piecewise polyomial splies 77). We ca write B j m, i) recursively 57) B j m, i) = i 1 k= e β m, j t t k ) =1+B j m, i 1))e m, t ) I the simplest versio with =1 ad λ m t)=1 costat we have λ m t) =κ m + =1 =κ m + =1 M t M M =κ m + =1 N t 1 α m, e βm, t s) dn s α m, e βm, t t k ) k= N t 1 e βm, t t k ) α m, k= 58) 59) M =κ m + =1 Rewritig 59) i vectorial otio, we have λt)=κ+ where α m, B 1 m, N t ) t Gt s)dn s 6) Gt)=α m, e βm, t s) ) m,=1 M 61) Assumig statioarity gives E[λt)] = µ a costat vector ad thus κ µ = I Gu)du κ = I αm, ) β m, = κ I Γ A sufficiet coditio for a multivariate Hawkes process to be statioary is that the spectral radius of the brachig matrix Γ= Gs)ds= αm, β m, 63) 62)

12 oit rocess Models for Multivariate High-Frequecy Irregularly Spaced Data be strictly less tha 1. The spectral radius of the matrix G is defied as where SG) deotes the set of eigevalues of G. ρg)= max a 64) a SG) 1.6.1. The Compesator. The compesator of the m-th coordiate of a multivariate Hawkes process betwee two cosecutive evets t m i 1 ad t m i of type m is give by Λ m t m i 1,t m i ) = m m 1 M + =1 M + =1 λ m s)ds t m k < 1 t m i 1 t m k < m, α j β m,[e β m, j t m i 1 t ) k e β m, j t m i t ) k ] j m, α j β m,[1 e β m, j t m i t ) k ] j To save a cosiderable amout of computatioal complexity, ote that we have the recursio A m, j i) = e β m, j t m i t k ) t m k < =e β m, j t m i 1 m ) A j m, i 1)+ t m i 1 t m k < 65) e β 66) m, j t m i t k ) ad rewrite 65) as Λ m t m i 1,t m i ) =κ m ti m λ s)ds+ m m m 1 1 =κ m ti m λ m s)ds m 1 M m, α j m, β j m + =1 =κ m + =1 tm i 1 M [ λ m s)ds ti m M =1 t k <s α j m, e m, s tk ) ds 1 e β m, j ti m ti 1 m ) ) A m, j i 1)+ m, αj m, β 1 e β m, j m ti ti 1 m ) ) j t k <tm i 1 e β m, j m ti 1 t k ) + t m i 1 t m k < t m i 1 t k <tm i ] 1 e βjm, ti m ) tk ) 1 e m, m ti t ) k ) 67) where we have the iitial coditios A j m, )=. 1.6.2. Log-Likelihood. The log-likelihood of the multivariate Hawkes process ca be computed as the sum of the loglikelihoods for each coordiate. Let where each term is defied by ll m { })= M ll{ } i=1,,nt )= m=1 which i this case ca be writte as ll m { }) =T Λ m,t)+ N T z m i l m λ )κ m + i=1 =1 N T m =T Λ m,t)+ i=1 T ll m { }) 68) 1 λ m T s))ds+ lλ m m s)dn s 69) l m λ t m i )κ m + =1 M α m, j e βjm, t k ) t k < M t m k < α j m, e m, m t k ) 7)

,, 13 where agai t NT =T ad ad { z m 1 evetti of typem i = otherwise 71) Λ m T,T)= λ m t)dt= m N T Λ m t m i 1,t m i ) 72) i=1 where Λ m t m i 1,t m i ) is give by 67). Similiar to to the oe-dimesioal case, we have the recursio R m, j i) = t k <t j m = e β m, j t m i t k ) e β m, j t m i t m i 1 ) R m, j i 1)+ t m i 1 t m k <t e β m, j t m i t k ) i e β m, j t m i t m i 1 ) 1+R m, j i 1)) ifm ifm= 73) so that 7) ca be rewritte as ll m { }) =T κ m T λ m t)dt i=1 m N T M N T m + i=1 =1 m, αj m, β 1 e β m, j ti m ti 1 m ) ) A m, i 1)+ j j l m λ t m i )κ m + =1 M t m i 1 t m k < α m, j R m, j i) 1 e βjm, ti m t ) k ) + 74) with iitial coditios R j m, ) = ad A j m, ) = where T = t N where N is the umber of observatios, M is the umber of dimesios, ad is the order of the model. Agai, T ca be dropped from the equatio for the purposes of optimizatio. 2. Numerical Methods 2.1. The Nelder-Mead Algorithm. The Nelder-Mead simplex algorithm[4] was used to optimize the likelihood expressios give above. 2.1.1. Startig oits for Optimizig the Hawkes rocess of Order. A startig poit for the optimizatio of a Hawkes process of order with a exact ucoditioal itesity was chose as the most reasoable startig poit, bus by o meas claimed to be the best. Letx i = 1 be the iterval betwee cosecutive arrival times as i the ACD model 16). The set the iitial value of λ to.5 E[x i], α 1 = 1 ad β 1 =2. This gives a ucoditioal mea of E[x i ] for these parameters used as a startig poit for the Nelder-Mead algorithm. 3. Examples 3.1. Millisecod Resolutio Trade Sequeces. The source data has resolutio of millisecods but the data is trasformed prior to estimatio by dividig each time by 1 so that the uit of time is secods. Also, trades occurig at the same price withi 2ms of each other are dropped from the aalysis. Further work will be doe to fid the optimal level of time aggregatio, ideally the data would be timestamped with aosecod resolutio ad this will be doe i the future. 3.1.1. Adjustig for the Determiistic Daily Itesity Variatio. Is a well kow fact that arrival ratesad the closely related volatility) have daily seasoal or diural patters where tradig activity peaks after ope ad before close ad has a low aroud the middle of the day kow as the luchtime effect. I order to accout for this we will fit a cubic splie with 14 kot poits spaced every 3 miutes, icludig the opeig ad closig times of t= ad t=6.5 6 6=234 respectively sice t has uits of secods. Let the adjusted duratios be defied x i=φ )x i 75)

14 oit rocess Models for Multivariate High-Frequecy Irregularly Spaced Data where x i = 1 is the uadjusted duratio ad φ ) is a piecewise polyomial) cubic splie with kot poits at tzj) with values give by j 1 j = N tzj)+w N tzj) w ) N tzj)+w i=n tzj) w 1 xi forj= 13 76) where z= 6 3=18 is the umber of secods i a half-hour ad j= 6.5 2). The first ad last kots have a widow of 3-miutes whereas the iterior kot poits have a widow of 1 hour lookig forward ad backward i time 3-miutes, the first kot poit oly looks forward ad the last kot poit oly looks backward. This gives us the determiistic baselie itesity which is a piecewise polyomial cubic splie fuctio whose exact form is ot metioed here sice is ot the focus of the paper. λ t)=ft,,, j ) 77) The followig figure shows the determiistic part of the itesity estimated for SY o 212-11- 3 for INET, BATS, ad ARCA. 2 φt) 1.8 INET BATS ARCA 1.6 1.4 1.2 1.8.6.4 1 2 3 4 5 6 7 Figure 2. Iterpolatig splie φt) for SY o 212-11-3 3.1.2. Uivarate Hawkes model fit to SY SDR S& 5 ETF Trust). Cosider these parameter estimates for the uivariate) Hawkes model of various orders fitted to data geerated by trades of the symbol SY traded o the NASDAQ o Nov 3th, 212. The ucoditioal sample mea itesity for this symbol o this day o this exchage was.888249115965832 trades per secod where the umber of samples is = 2787. The data preseted here has ot bee deseasoalized, the aalysis with determiistic diural variatio accouted for will be preseted i the ext sectio. As ca be see, = 6 provides the best likelihood but a more rigorous method to choose would be to use some iformatio criterio like Bayes or Akaike to decide the order. Error bars are ot provided, but presumably they could be estimated with derivative iformatio. Note that the closer E[λt)] to.888249115965832 ad E[Λ] ad Var[Λ] to 1. the better, sice Λ should be expoetially distributed with mea

,, 15 1 by desig ad for a oisso process the mea ad variace are equal. The ext thig to check is that the Λ series is ot autocorrelated. κ α 1 β 1 ll{ }) E[λt)] E[Λ] Var[Λ] 1.52711246 19.66948678 45.3158324 354.24543.8882661.999999 1.8638729 23.818619 61.789217 2.179395347 1288.3557.8948931.9999972 1.188598.995941.243158578 3.179558266 4.178874698 5.15372454 6.1325453.8621919.22766134 28.5616786.9893214.1848159 11.356 12.598362 8.17991269.5 18.28544127 1.6159658.6456987.532479235.3437343 13.495378 4.2859917 7.9279453 2.291178834.219242 45.23233626 55.8775415.241418546 5.5981731 66.99771955 57.5863369 68.6891767 79.55782766 83.46583667 14.4523585.151551338 4.1896954.9293459 84.8627394 81.71142685 67.233519 56.2297618 1586.782 1.99153298 1.114384 1.24678422 1283.7624.88938728.99874524 1.18714 151.97938.99747221 1.16753 1.1616527 991.14436.966986 1.667 1.12981528 Table 1. arameters ad statistics for model fitted to data without diural adjustmets κ α 1 β 1 ll{ }) E[λt)] E[Λ] Var[Λ] 1.579642853 2.7816869 49.181292797 2565.16186 1.59 1.64713115 24.3363987 63.37994 2.2972951255 1147.38872 1.278 1.15682329.1366737439.426958321 3.3158518 4.5627834858 5.556638255 6.5362685399 29.62527375.11.12815585.264 6.4766935751 14.656872968 1.8317154168.725319843.57855259 6.8528913938 15.32951777 2.99368921 12.459351335 8.2747228669.21 2.7582137937.41661767 1.98219294 58.78427931 32.16156796.45484625 4.6219533 49.166182 6.475526 21.39853548 26.8647956 81.58572968 81.58572968 6.25583954 17.329734 77.72815398 69.1934786 53.7486971 47.94942161 42.4283927 13.7257194 1422.551267 1.18843464 1.23286963 2364.699597 1.224718 1.59177967 2152.462512 1.11487836 1.53515842 1997.33698 1.164567 1.48646 Table 2. arameters ad statistics for model fitted to data with diural adjustmets

16 oit rocess Models for Multivariate High-Frequecy Irregularly Spaced Data Autocorrelatio of Λ for =1 Autocorrelatio of Λ for =2.8.8 Sample Autocorrelatio.6.4.2 Sample Autocorrelatio.6.4.2.2 2 4 6 8 1 12 14 16 18 2.2 2 4 6 8 1 12 14 16 18 2 Autocorrelatio of Λ for =3 Autocorrelatio of Λ for =4.8.8 Sample Autocorrelatio.6.4.2 Sample Autocorrelatio.6.4.2.2 2 4 6 8 1 12 14 16 18 2.2 2 4 6 8 1 12 14 16 18 2 Autocorrelatio of Λ for =5 Autocorrelatio of Λ for =6.8.8 Sample Autocorrelatio.6.4.2 Sample Autocorrelatio.6.4.2.2 2 4 6 8 1 12 14 16 18 2.2 2 4 6 8 1 12 14 16 18 2 Figure 3. Autocorrelatios of Λ 1, ) for =1 6 without diural adjustmets

,, 17 Autocorrelatio of Λ for =1 Autocorrelatio of Λ for =2.8.8 Sample Autocorrelatio.6.4.2 Sample Autocorrelatio.6.4.2.2 2 4 6 8 1 12 14 16 18 2.2 2 4 6 8 1 12 14 16 18 2 Autocorrelatio of Λ for =3 Autocorrelatio of Λ for =4.8.8 Sample Autocorrelatio.6.4.2 Sample Autocorrelatio.6.4.2.2 2 4 6 8 1 12 14 16 18 2.2 2 4 6 8 1 12 14 16 18 2 Autocorrelatio of Λ for =5 Autocorrelatio of Λ for =6.8.8 Sample Autocorrelatio.6.4.2 Sample Autocorrelatio.6.4.2.2 2 4 6 8 1 12 14 16 18 2.2 2 4 6 8 1 12 14 16 18 2 Figure 4. Autocorrelatios of Λ 1, ) for =1 6 with diural adjustmets As ca be see by visually ispectig the autocorrelatios, all of the residual series are prettymuch acceptable *without* diural adjustmets except for = 1 with still had sigificat leftover autocorrelatio. Stragely, it seems thaclusio of the diural adjustmet sigificatly worses the model fi early all cases. I am tempted to suspect somethig wrog with the code.

18 oit rocess Models for Multivariate High-Frequecy Irregularly Spaced Data 143.8 143.6 143.4 143.2 143 142.8 142.6 142.4 142.2.5 1 1.5 2 2.5 x 1 4 Figure 5. rice history for SY traded o INET o Oct 22d, 212 5 45 4 35 3 25 2 15 1 5 2 4 6 8 1 12 14 16 18 Figure 6. x i = 1 i blue ad {Λ 1, ): =1} i gree

,, 19 5 45 4 35 3 25 2 15 1 5 2 4 6 8 1 12 14 16 18 Figure 7. x i = 1 i blue ad {Λ 1, ): =6} i gree

2 oit rocess Models for Multivariate High-Frequecy Irregularly Spaced Data 2 18 16 14 12 1 8 6 4 2 1.18 1.19 1.2 1.21 1.22 1.23 x 1 4 Figure 8. Zoomed i view of x i = 1 i blue ad {Λ 1, ): =6} i gree 3.1.3. Multivariate SY Data for 212-8-14. Cosider a 5-dimesioal multivariate Hawkes model of order =1 fit to data for SY from 3 exchages, INET, BATS, ad ARCA o 212-8-14. Both INET ad BATS distiguish buys from sells whereas ARCA does ot, hece 5 dimesioal, 2 dimesios each for INET ad BATS ad 1 dimesio for ARCA which will aturally have twice as high a rate as that for buys ad sells cosidered seperately. The 5 dimesios are orgaized as follows: BATS Buys BATS Sells INET Buys INET Sells ARCA Trades 78)

,, 21 4 35 SY Trades o 212 8 14 BATS Buys Λ BATS Sells Λ INET Buys Λ INET Sells Λ ARCA Trades Λ 3 25 2 15 1 5.5 1 1.5 2 2.5 x 1 4 Figure 9. We say trades for ARCA because the type set from the data broker is Ukow, idiciatig thas ukow whether is a buyer or seller iitiated trade. We have the followig parameter estimates where large values of α >.1) are highlighted i bold. α= λ=.2538789517348.269289236349466.221292886522613.158954542395839.371572853723448 4.3514 1 9.11879.2648 1.917 1 8.1771.21881 2.6164 1 8 2.5725 1 8.24946.25138.2992.51715 1.1254 1 8.29919.467.41449.52852.1877 3.2535 1 9.237.2151.71358 1.954.15264 4.1222 1 9 β= 1.954 1.83 16.665 2.188 9.659 5.6238 11.558 16.721 18.34 7.916 7.8125 15.299 16.431 14.72 6.6458 8.383 15.758 17.749 12.953 3.1621 9.4264 16.369 19.33 11.71 2.832 79) 8) 81) with a log-likelihood score of 39714.1497. 3.1.4. Multivariate SY Data for 212-11-19.

22 oit rocess Models for Multivariate High-Frequecy Irregularly Spaced Data Cosider the same symbol, SY, as a 5-dimesioal Hawkes process as i 3.1.3, for a differet day, o 212-11-19, estimated with order = 2 for a total of 15 parameters. α j coefficiets that are >.1 are highlighted i bold. The parameters listed below resulted i a log-likelihood value of 36543.8529. A iterestig patter emerges i the β coefficiets where it takes o some approximate stair-step patter ragig from 2 to 22. This might be idicitative of some fixedfrequecy algorithms operatig across the differet exchages at approximate 1-secod itervals. λ=.11337192848621531.11669526955243113.12148846567112.14864383337674315.23637243964866722.45239.7432434828.737632425721.2354252925593.149949319.8363647254.4887752871.99831972928.36913254181.334942234 α 1=.765727383.8293393618634.346485386433.5527915746563.33324666473.5129296.4421894435554.165858723488658.2898699267899.1241188377.34363367497.19728251272.2266421945711.288323885464.2187148763.247169438667.45938324942878493.5235195378729.15976654768.219865625857849.13695283.96185142824.586375215814.1715938847.1956826269151 α 2=.619247685514.56842895898976.419433711.913278822.16155464515489.7338612563.376898786954499.789959167169.97135822.2227127943.378666335.8648532461379836.96939577784123.2399856627.1318796171 2.2691486662775 4.58853278669795 9.2151665399168 14.239223554899 17.723984432818 2.322899848878 5.781514279449 9.759298132451 15.47495693597 17.164776964259771 β 1 = 2.7136844613891 6.97399625272 1.91122242193 16.3935149252 17.3817212548269 3.18861359927744 6.937228199757 12.26186231254 17.522887635459 17.887629698455644 3.952627996493 7.7615554173819 13.539942724633 17.3549525971848 18.737873333966 19.6811983441165 2.56326127197891 18.534485327666 11.1183435325997 5.95528768738747 2.2253366591 21.39514712658 16.97184115533537 9.548598696946248 5.45976123875715 β 2 = 2.228259457254 22.2743748698 17.8898995276187 8.72487367131993 4.21532773261564 19.7356631996375 21.673338963866 15.76838788843381 7.534795651931 3.517163899772246 2.2972345574 19.6667927692781 13.19618799557176 6.81294373872132 2.825437512911523 Bibliography 82) 83) 84) [1] C.G. Bowsher. Modellig security market evets i cotiuous time: itesity based, multivariate poit process models. Joural of Ecoometrics, 1412):876 912, 27. [2] Y. Cai, B. Kim, M. Leduc, K. Szczegot, Y. Yixiao ad M. Zamfir. A model for itraday volatility.,, 27. [3] V. Chavez-Demouli ad JA McGill. High-frequecy fiacial data modelig usig hawkes processes. Joural of Bakig & Fiace,, 212. [4] JE Deis ad D.J. Woods. Optimizatio o microcomputers: the elder-mead simplex algorithm. New Computig Eviromets: Microcomputers i Large-Scale Computig, :116 122, 1987. [5]. Embrechts, T. Liiger ad L. Li. Multivariate hawkes processes: a applicatio to fiacial data. Joural of Applied robability, 48:367 378, 211. [6] R.F. Egle ad J.R. Russell. Autoregressive coditioal duratio: a ew model for irregularly spaced trasactio data. Ecoometrica, :1127 1162, 1998. [7] A.G. Hawkes. Spectra of some self-excitig ad mutually excitig poit processes. Biometrika, 581):83 9, 1971. [8] A. Karr. oit processes ad their statistical iferece, volume 7. CRC, 1991. [9] T.J. Liiger. Multivariate Hawkes rocesses. hd thesis, Swiss Federal Istitute Of Techology Zurich, 29. [1] F. Loreze. Aalysis of Order Clusterig Usig High Frequecy Data: A oit rocess Approach. hd thesis, Tilburg School of Ecoomics ad Maagemet, Fiace Departmet, August 212. [11] Y. Ogata. The asymptotic behaviour of maximum likelihood estimators for statioary poit processes. Aals of the Istitute of Statistical Mathematics, 31):243 261, 1978. [12] Y. Ogata. O lewis simulatio method for poit processes. Iformatio Theory, IEEE Trasactios o, 271):23 31, 1981. [13] T. Ozaki. Maximum likelihood estimatio of hawkes self-excitig poit processes. Aals of the Istitute of Statistical Mathematics, 311):145 155, 1979. [14] H. Shek. Modelig high frequecy market order dyamics usig self-excited poit process. Available at SSRN 166816,, 21. 85) 86)

,, 23 [15] Ioae Mui Toke. A itroductio to hawkes processes with applicatios to fiace., http://fiquat.mas.ecp.fr/ioae_files/hawkescourseslides.pdf. [16] HM Wisema. Quatum theory of cotiuous feedback. hysical Review A, 493):2133, 1994.