Price Impact Without Averaging

ABSTRACT We present a method to estimate price impact in order-driven markets that does not require averaging over executions or scenarios. Given order book data associated with one single execution of a sell metaorder, we estimate its contribution to price decrease during the trade. We do so by modelling the limit order book using a state-dependent Hawkes process, and by defining the price impact profile of the execution as a function of the compensator of the state-dependent Hawkes process. We apply our method to a dataset from NASDAQ, and we conclude that the scheduling of sell child orders has a bigger impact on price than their sizes.


Introduction
Price impact is the phenomenon whereby trade executions affect the price of the asset being traded.The price is affected in a way that is unfavourable to the trade, i.e., it decreases as a consequence of sell orders and it increases as a consequence of buy orders.Hence, price impact is often regarded as a hidden transaction cost, and price impact detection is considered a branch of transaction cost analysis.
Recently, Capponi and Cont (2019) have however suggested that the empirical findings on price impact laws may be indistinguishable from the ubiquitous scaling of price variation, i.e., volatility, as a square root of time.Thus, they venture to question the existence of price impact altogether.
However, as observed in Bouchaud (2017), price impact can be regarded as an embodiment of the basic economic law of supply and demand, and it must play a role in price formation.This is to say that, despite the acknowledged entanglement between executioninduced price moves and volatility, the phenomenon of price impact must exist in a market with price mechanism.The consensus among these authors is that, in order to detect price impact, one has to average across several executions and scenarios to attenuate the impact of volatility -see Bucci et al. (2019).
In this paper, we present a measurement of price impact in order-driven markets that does not require averaging over executions and scenarios.Given the order book data associated with one single execution of a sell metaorder (subdivided into smaller child orders distributed in time), we measure its contribution to price decrease during the trade.
Our motivation is twofold.On the one hand, the economic argument by which price impact must exist applies scenario-by-scenario and to every execution, other things being equal.Therefore, it makes sense to ask whether price impact is detectable without averaging.In other words, is averaging the only practical way to disentangle price impact from volatility?On the other hand, and from a more practical point of view, investors and traders might in fact be more interested in a trade-by-trade assessment of price impact rather than on statistics obtained by extensive averaging.This was pointed out in the aforementioned article by Capponi and Cont (2019), who argue that for institutional investors who execute infrequent but large trades, 'the observed impact may deviate significantly from such an average'.
Our method to measure price impact is based on a granular model of order book dynamics.Our model extends that of Bacry and Muzy (2014), where a four-dimensional Hawkes process was used to describe arrivals of market orders into a limit order book and price changes.We increase the granularity of the model by describing price changes via a state variable that evolves in time, and by tracking not only market orders but also limit orders.The Hawkes process and state variable are modelled using a class of hybrid marked point processes introduced in Morariu-Patrichi and Pakkanen (2018), more specifically, state-dependent Hawkes processes.
The so-increased granularity allows us to: (i) have a snapshot-by-snapshot proxy for outstanding volume on every level of the order book, and (ii) assess the impact that a particular trader has on the market without assuming that their orders walk the book with the same frequency as the orders from other market participants -as assumed in Bacry and Muzy (2014).
For an averaged measure of price impact, one fixes a trade direction for order executions and assesses price movements across several scenarios.Since in these scenarios the signs of all other market variables on average cancel out, an average price movement emerging during these executions represents the impact sought.If we instead eschew averaged measures of price impact, we cannot count on this average cancellation of all market fluctuation other than the trade direction of the considered execution.This poses the counterfactual of what would have happened if the trade under consideration had not been executed.In other words, the execution-induced price movement during the single observed scenario has to be disentangled from the price movement induced by all the surrounding market noise.We do so by formalizing our notion of price impact without averaging around the concept of compensator of a counting process.This allows us to focus on a single realization of the process and yet factor out its volatility.The idea of using compensators of Hawkes processes is reminiscent of existing approaches in the literature, for example in Jusselin and Rosenbaum (2020) and Rosenbaum and Tomas (2021).
We demonstrate our approach by assessing price impact on NASDAQ data for the ticker INTC.Since the identities of market participants behind the observed market events are not disclosed, we cannot directly measure the impact of a chosen execution among those in the raw data.Instead, we calibrate our market model on the provided data, and then we simulate a liquidation in the calibrated model.By so doing, we illustrate the usefulness of the class of market simulators to which our model belongs.
More precisely, we fix the size of the metaorder to be executed, and we examine how the price impact of such an execution varies with (i) the size of the child orders (whether they are likely to consume all available liquidity on the first price level of the limit order book or not), and (ii) the scheduling of the child orders (whether they cluster around particular times or are evenly distributed during the execution).Empirically, we find that the clustering of child orders has a bigger impact on the price than their sizes.
The paper is organized as follows.Section 2 gives some background about order-driven markets and limit order books.Section 3 recalls basic notions from the theory of counting processes and establishes the notation used in the paper.Section 4 describes our model for order-driven markets based on state-dependent Hawkes processes.Section 5 defines price impact in our model, and describes how we quantify it.Section 6 presents applications of our modelling framework to a dataset from NASDAQ, and provides some insights on the main drivers of price impact in this dataset.Section 7 concludes.

Background on Order-Driven Markets and Limit Order Books
Order-driven markets are trading venues organized around limit orders.A limit order is the fundamental action that market participants in order-driven markets can perform.It is represented by a 4-tuple (t, q, p, d), where t denotes time, q denotes size, p denotes price and d denotes direction.We say that a market participant posts a limit order (t, q, p, d) if at time t they submit to the exchange their commitment to buy (d = 1) or sell (d = −1) the amount q at the price p.The price p is interpreted as the highest price at which they are committed to buy if d = 1, or the lowest price at which they are committed to sell if d = −1.By regulation, the price p must be an integer multiple of some fixed ψ > 0 known as the tick size.Market participants have also the possibility to withdraw their commitments to trade, by cancelling a previously submitted limit order.
A trading epoch in an order-driven market is the collection of all the limit orders submitted by market participants within some time interval.Limit orders cannot be submitted simultaneously, so that a limit order is identified by its time stamp t.We express this mathematically by saying that a trading epoch is the graph of a function from a subset of the positive half-line to the space {(q, p, d) : When a market participant submits a limit order (t, q, p, d), a matching algorithm run by the trading platform looks for possible counterparts to their order: if other participants' commitments to trade exist to (partially) fulfil the order (at a price not worse than p from the submitter's point of view), then their order is (partially) cleared.The fraction of their order that is cleared disappears from the market, and it is said to be executed; the fraction that could not be fulfilled is recorded in the limit order book, waiting for counterparts to trade with.
A limit order (t, q, p, d) in a trading epoch is said to be active (or outstanding) at time u if t ≤ u and by time u the order has neither been executed nor been cancelled.
The search for possible trading counterparts for the matching of the incoming order (t, q, p, d) happens among the active orders with time stamp s < t and opposite direction −d.We say that the active order (s, ρ, π , −d) matches the incoming order (t, q, p, d) if π d ≤ pd; in this case, the two orders are executed one against the other, and ρ ∧ q units of shares are transacted at the price π per unit of share.After the match, the matched orders are replaced with the orders (s, ρ, π , −d) and (t, q, p, d), where ρ = ρ − ρ ∧ q and q = q − ρ ∧ q.At least one of them has null size.If ρ = 0, i.e., q ≥ ρ, the order with time stamp s ceases to be active and it is deleted from its queue.If q = 0, i.e., q ≤ ρ, then the order with time stamp t (i.e., the incoming order) is fully executed, and the search for possible matching counterparts stops.If instead q > 0, i.e., q > ρ, then the search continues among active orders with opposite direction −d.
Definition 2.1: Let E be a trading epoch in an order-driven market.The ask order queue A t at time t is defined as Similarly, the bid order queue B t at time t is defined as ) is active at time t}.
A limit order book is a grid of equally spaced prices at which active limit orders sit.The space between consecutive grid nodes is called the tick size of the LOB, which we denote by ψ.All orders submitted to the exchange must have prices that are integer multiples of the tick size.Prices are increasing from left to right.At every node of the grid, outstanding limit orders to buy or sell at the corresponding price are collected; these limit orders are also said to be queuing there.Spontaneously -i.e., by market forces -such orders organize in a way that buy offers will be displaced on the left (the so-called bid side) and sell offers will be on the right (the so-called ask side).Indeed, if there were a buy (resp., sell) limit order to the right (resp., left) of some sell (resp., buy) limit orders, or at the same node, then the matching algorithm would have matched them, clearing them out from the order book.Therefore, the whole configuration of a limit order book at time t is given when the following variables are specified: (i) the best ask price P a t , i.e., the lowest price at which one can find sell offers active at time t; (ii) the best bid price P b t , i.e., the highest price at which one can find buy offers active at time t; (iii) the volume V a,i t of ask offers at price P a,i t = P a t + (i − 1)ψ, for i = 1, 2, . .., i.e., the quantity where the sum is over all the active sell limit orders submitted by time t for a price of P a t + (i − 1)ψ; (iv) the volume V b,i t of bid offers at price P b,i t = P b t − (i − 1)ψ, for i = 1, 2, . .., i.e., the quantity where the sum is over all the active buy limit orders submitted by time t for a price of P b t − (i − 1)ψ.
The whole configuration of a limit order book at time t is described by the variables Apart from these variables, other derived quantities are useful to assess the properties of an order book.These are the spread, the mid-price and the volume imbalance (or queue imbalance).
The spread at time t is the distance |P a t − P b t | between best ask price and best bid price, which we denote by φ t .The mid-price at time t is the mid point in between P b t and P a t , which we denote by P m t , and is given by P m t = (P a t + P b t )/2.Finally, the n-levels volume imbalance (or queue imbalance) at time t, denoted I n t , is the normalized excess of limit orders on the first n levels of the bid side compared to the limit orders on the first n levels of the ask side, namely where i≤n V b,i t (resp., i≤n V a,i t ) is the cumulative volumes on the first n bid (resp., ask) levels.The queue imbalance I n is widely accepted as a reliable signal for the next mid-price move (see Cartea, Donnelly, and Jaimungal 2018): when it is close to −1 the mid-price will likely decrease, and when it is close to +1 it will likely increase.
The arrival of a limit order to the market triggers two events: one is the consumption of the liquidity capable to (partially) service the limit order, the other is the addition of the non-executed part of the limit order to the appropriate queue in the order book.Proposition 2.2 states the terms of this decomposition.Proposition 2.2: Given the configuration (P a t− , P b t− , {(V a,i t− , V b,i t− ) : i = 1, 2, . ..}) of the limit order book immediately before time t, processing the sell limit order (t, q, p, −1) is equivalent to processing the pair of orders [(t, q − M , 0, −1), (t, q − q − M , p, −1)], with the former having priority over the latter, and where Similarly, processing the buy limit order (t, q, p, +1) is equivalent to processing the pair of orders [(t, q + M , ∞, +1), (t, q − q + M , p, +1)], where From this point forward, given a limit order (t, q, p, d), we let q M = q + M if d = +1, and q M = q − M if d = −1.The first component (t, q M , 0, −1) in the decomposition [(t, q M , 0, −1), (t, q − q M , p, −1)] of the sell limit order (t, q, p, −1) is called sell market order.Notice that in the 4-tuple (t, q M , 0, −1), the price p is set to zero, and this guarantees immediate execution: the sale of the amount q M is instantaneously matched with outstanding buy limit orders on the bid side, and no fraction of q M is put into the queue.On the contrary, the second component (t, q − q M , p, −1) specifies exactly that part of (t, q, p, −1) which will be queued.Similarly, (t, q M , ∞, +1) represents the market order component of the buy limit order (t, q, p, +1), and it is referred to as buy market order.The price p = ∞ is a way to express the fact that a counterpart for the purchase of the amount q M will instantaneously be found on the ask side of the order book.In the following, the term 'market order' (either buy or sell) will be referring to the first component in the decomposition of a limit order with non-zero market order size q M > 0. 1 A sell market order (t, q M , 0, −1) is said to 'walk the book' if q M > V b,1 t .Similarly, a buy market order walks the book if its size is larger than the volume of offers on the first ask level.
Given a time window [0, T], the evolution in time of the limit order book {(P a t , P b t , {(V a,i t , V b,i t ) : i = 1, 2, . ..}) : 0 ≤ t ≤ T} results from the history of all limit order submissions, cancellations and executions that happened in [0, T].If every limit order in {(t, q, p, d) : 0 ≤ t ≤ T} is decomposed as per in Proposition 2.2, then the sellerinitiated trades that happened in [0, T] are {(t, q M , 0, −1) : q M > 0, 0 ≤ t ≤ T}, and the buyer-initiated trades that happened in [0, T] are {(t, q M , ∞, +1) : q M > 0, 0 ≤ t ≤ T}.Hence, in the following we will identify trades with market orders of non-zero size q M > 0.

Counting Processes
In this section we introduce our notation for counting processes, and we review basic concepts from the theory of such processes.Our main reference is Daley and Vere-Jones (2008, Chapter 14).
Let d E be a positive integer.For each e ranging from 1 to d E , let T e j , j = 1, 2, . .., be a strictly increasing sequence of positive random times, and assume that T e j = T e j if (e, j) = (e , j ).Then, is a non-decreasing right-continuous process; we call N e the counting process associated with the sequence (T e j ) j .Notice that (T e j ) j can be retrieved from N e by T e j = inf t > 0 : N e (t) ≥ j ; hence, there is a one-to-one correspondence between N e and (T e j ) j .For t > 0 we define δN e (t) := lim (N e (t) − N e (t − h)) , and we notice that δN e (t) = 1 if and only if t = T e j for some j, otherwise δN e (t) = 0.
be the ordered sequence of random times stemming from the union {T e j : j = 1, 2, . . .; e = 1, . . ., d E }.By defining for n = 1, 2, . .., we have that the pair (T n , E n ) equivalently characterizes the multivariate counting process, because The minimal filtration to which a multivariate counting process N is adapted -and such that it satisfies the usual conditions of completeness and right-continuity -is called the internal history of N. Any other filtration to which N is adapted is called a history of N, and it must be a superset of the internal history.Definition 3.2: Let ( , F = (F t ) t , P) be a filtered probability space where the multivariate counting process N is defined, and assume that F is a history of N. We say that the Given the counting process N and a history F, the F-compensator is unique up to an evanescent set, and it is equivalently characterized as the F-predictable projection of N, namely as the F-predictable non-decreasing process such that
If is absolutely continuous, we write for some F-predictable process λ = (λ 1 , . . ., λ d E ), which is called intensity of the counting process N. Combining this with Equation (3), one obtains the formula which allows to interpret λ e (t) as a measure of the 'instantaneous risk' of a jump at time t in the eth component of the counting process N. Notice that this 'risk' evolves in time and it varies depending on the information available up to time s.Compensators are crucial in the following time-change result, which will be used to perform goodness-of-fit diagnostics (see Section 6.2).For a proof of Theorem 3.3, see Brown and Nair (1988).

Multidimensional Hawkes Processes
In this section, we recall the basics of the theory of state-dependent Hawkes processes from Morariu-Patrichi andPakkanen (2018, 2022).

Definition 3.4:
A d E -dimensional counting process N is called a Hawkes process if it admits an absolutely continuous compensator with intensities for some non-negative base rates ν e ≥ 0, and some non-negative locally integrable functions κ e , e ≥ 0 that are supported on the non-negative half line.
The matrix-valued function t → [κ e , e (t)] e,e =1,...,d E is referred to as the kernel of the Hawkes process N. If all the kernel functions are integrable, the spectral radius ρ of the d E × d E -matrix of L 1 norms κ e , e 1 is called radius of the Hawkes kernel; if some of the kernel functions are not integrable, the spectral radius is set to +∞.
A d E -dimensional Hawkes process is asymptotically stationary if the radius of its kernel is smaller than 1; in this case the intensity process λ is asymptotically stationary.
Let S be a finite state space.We can label its elements as x = 1, . . ., d S , where d S is the number of possible states of the system.A state-dependent counting process is a pair (N, X), where for all t, N(t) records the number of events occurred by time t as per formula (2), and X(t) records the state of the system at time t.More specifically, we have: Definition 3.5 (Morariu-Patrichi and Pakkanen 2022, Definition 2.1): Let N be a d Edimensional counting process.Let X be a continuous-time piecewise-constant process in the finite state space S of cardinality d S .Let F be the minimal complete right-continuous filtration generated by the pair (N, X).Then, we say that (N, X) is a state-dependent Hawkes process if (i) N admits an absolutely continuous F-compensator with intensities for some d E non-negative base rates ν e ≥ 0, e = 1, . . ., d E , and some d 2 E measurable functions κ e , e : R + × S → R + , e, e = 1, . . ., d E , such that κ e , e (•, x) is locally integrable for all x in S; (ii) X jumps only at arrival times T n of N, and there exist d E transition matrices φ e (•, •), e = 1, . . ., d E , defined on S such that for all n where X(T n −) = lim t↑T n X(t) is the state of the system immediately before the nth event E n , and F T n − = >0 F T n − represents the information available immediately before this event.
Given a state-dependent Hawkes process (N, X), let T n and E n be the sequences of arrival times and events that equivalently describe the counting process component N of the pair (N, X), as per Equation (2).Let X n be the sequence of states is called the hybrid-MPP counterpart of (N, X).We have that the jth jump time T e j of the eth component of N is the jth order statistic of {T e,x k : k = 1, 2, . . .
The (e, x)th component Ñe,x of the hybrid-MPP counterpart of (N, X) admits a continuous compensator with density given by λe,x (t) = φ e (X(t), x) where φ e is the transition matrix associated with event type e, and κ e , e , for e, e = 1, . . ., d E , are the Hawkes kernels of N.

State-Dependent Hawkes Model
We consider four streams of random times: the stream (T 1 j ) j of times when limit orders are executed on the bid side (equivalently identified with the arrival times of sell market orders); the stream (T 2 j ) j of times when limit orders are executed on the ask side (equivalently identified with arrival times of buy market orders); the stream (T 3 j ) j of times when either an ask limit order is inserted inside the spread, or the cancellation of a bid limit order depletes the liquidity available at the first bid level; the stream (T 4 j ) j of times when either a bid limit order is inserted inside the spread, or the cancellation of an ask limit order depletes the liquidity available at the first ask level.
The four sequences of random times give rise to a four-dimensional counting process N = (N 1 , . . ., N 4 ) with the following interpretation of its components: (i) N 1 (t) denotes the number of seller-initiated trades that happened before or at time t (identified with the number of market orders arrived on the bid side of the order book by time t); (ii) N 2 (t) denotes the number of buyer-initiated trades that happened before or at time t (identified with the number of market orders arrived on the ask side of the order book by time t); (iii) N 3 (t) denotes the number of decreases in the mid-price caused by a limit order insertion or cancellation that happened before or at time t; (iv) N 4 (t) denotes the number of increases in the mid-price caused by a limit order insertion or cancellation that happened before or at time t.
The counting process N is paired with the state variable X.At time t, the state variable X(t) summarizes the configuration (P b t , P a t , {(V b,i t , V a,i t ) : i = 1, 2, . ..}) of the limit order book at time t, by recording a proxy for the n-levels volume imbalance, and the variation of the mid-price compared to time t−.More precisely, where δP m (t) = lim ↓0 (P m (t) − P m (t − )), T(t) = sup{T e j ≤ t : e = 1, . . ., 4; j = 1, . ..}, and I n t is defined in (1).The first component X 1 of the state variable X can take the values −1, 0, +1, respectively denoting downward jump in the mid-price, unchanged mid-price and upward jump in the mid-price.The second component X 2 of the state variable X is a discretisation of the nlevels queue imbalance I n t , and -assuming that K is odd -it takes integer values from −(K − 1)/2 to (K − 1)/2, spanning the full range of possible values of I n from −1 to +1.
It follows from the definition of X 2 that if at time t we have that X 2 (t) = x 2 , then the n-levels queue imbalance I n t at time t must be in the half-open interval [(2x 2 − K − 1)/2K, (2x 2 + 1)/K).Notice that X 2 depends on the two additional parameters n and K: the former is the number n of levels of the limit order books taken into account in the computation of the queue imbalance I n ; the latter is the number K of points in the partition of the interval [−1, 1] used for the discretisation of I n .
The pair (N, X) is modelled as a state-dependent Hawkes process, hence we assume that there are base rates ν e , Hawkes kernels κ e , e = κ e , e (t, x ) and transition matrices φ e such that Definition 3.5 is satisfied.The number of event types is d E = 4 and the number of states is d S = 3K.
When a new event occurs, i.e., when one of the components N e of N jumps, the state variable X is updated as per in Equation ( 7).The update models the mechanism whereby trades on either side of the limit order book can trigger changes in the mid-price and in the queue imbalance.Indeed, assume that a sell (resp., buy) market order arrives at time T 1 j (resp., T 2 j ), and that X(T . Then, the mid-price jumps downward (resp., upward) with probability p − := )), and it remains unchanged with probability p 2 This jump of the state variable happens exactly at the arrival time T 1 j (resp., T 2 j ) of the sell (resp., buy) market order, and it naturally captures the mechanism responsible for the market-order-induced price change: p − (resp., p + ) represents the probability that a sell (resp., buy) market order walks the book given its submission, and p 0 represents the probability that it does not.Notice that p − (resp., p + ) and p 0 depend on the state of the limit order book immediately before the arrival of the sell (resp., buy) market order, and in particular they depend on x 2 .This is a granular description of the order book mechanism, and it accounts for the fact that it is less likely that a sell (resp., buy) market order walks the book when the volumes on the bid (resp., ask) side are high, namely The first component X 1 of the state variable X enables to write the following proxy for the mid-price: where ψ is the tick size of the limit order book and Remark 4.1: Our model can be compared to that of Bacry and Muzy (2014).In their model, four streams of random times are considered: the stream (T 1 j ) j of times when limit orders are executed on the bid side (equivalently identified with the arrival times of sell market orders); the stream (T 2 j ) j of times when limit orders are executed on the ask side (equivalently identified with arrival times of buy market orders); the stream (T 3 j ) j of times when the mid-price decreases; the stream (T 4 j ) j of times when the mid-price increases.T 1 and T 2 are as in our model, whereas T 3 and T 4 represent what in our model we represent through the state variable X 1 .In Bacry and Muzy (2014), the fourdimensional counting process N = N(t) associated with T 1 , T 2 , T 3 and T 4 is assumed to be a four-dimensional ordinary Hawkes process.In their model, a buy (resp., sell) market order coming into the exchange and walking the book at time t would be represented by the equation δN 2 (t) = δN 4 (t) = 1 (resp., δN 1 (t) = δN 3 (t) = 1).However, the components of a multidimensional Hawkes process jump simultaneously with probability zero.In other words, if {(T e j ) j : e = 1, . . . ., 4} are the arrival times associated with a 4-dimensional Hawkes process, it holds P(T e j = T e j , for some j, j ≥ 1, and e = e ) = 0. Since the direction of the causality is unambiguous (a market order originates first and as a result of its execution the mid-price jumps), Bacry and Muzy (2014) propose to add to the Hawkes kernels κ 1,3 and κ 2,4 an atomic component.This is the defining feature of the 'impulsive impact kernel' -see Bacry and Muzy (2014, Section 2.1.3).In our paper, the usage of the state variable X 1 circumvents the need of these atomic components and naturally accommodates mid-price changes triggered by market orders walking the book.
The second component X 2 of the state variable X reproduces the state variable of the queue-imbalance model in Morariu-Patrichi and Pakkanen (2022).It is conceived as the main indicator of the regime in which limit and market orders will arrive to the exchange: in high-frequency markets trading algorithms send their orders in response to observable quantities of the limit order book configuration, and a prominent one is indeed the queue imbalance.It is therefore expected that when X 2 is positive (resp., negative), the intensities of events of types e = 2 (resp., e = 1) will be higher, because market participants following the queue imbalance signal will expect the price to increase (resp., decrease).After the price change, the volumes of deeper queues on the ask (resp., bid) side enter the computation of the queue imbalance, and this will likely reset the signal.As noted in Morariu-Patrichi and Pakkanen (2022), this interaction can be deemed responsible for the mean-reverting behaviour of price dynamics in high-frequency markets.
Moreover, we use X 2 to reproduce the update of the limit order book configuration that happens when a labelled agent submits their market orders.Indeed, we consider normalized volumes up to level n, namely we assume that n i=1 (V b,i t + V a,i t ) ≡ 1, and we assume that the 2n-tuple + that depends on the state variable at time t.
Given the time evolution of the limit order book in the time window [0, T], an estimator for γ (x), with x ranging from 1 to 3K, can be obtained by maximum likelihood estimation.Once γ is known, the order book mechanics can be reproduced by drawing from the conditional distribution Dir γ (X(t)) (•|X 2 (t)).This is the Dirichlet distribution of the 2n-tuple Algorithm 4.1 describes how to reproduce the order book update in the case of the arrival of a sell market order (t, q M , 0, −1).The case of buy market orders is analogous.Line 4 in Algorithm 4.1 says that the bid price (and consequently the mid-price) decreases if the size of the sell market order is larger than the available liquidity sitting on the first bid level.Lines 6:10 cancel (from the bid queues) the orders whose execution has been triggered by the arrival of (t, q M , 0, −1).On line 7 we used the notation min + (a, b) = max(0, min(a, b)) for a and b real numbers.

Price Impact Profiles
Measuring price impact requires two things.The first is to modify the model (N, X) of Section 4 in a way to account for a labelled agent, whose impact we wish to measure.The second is to extrapolate to which extent the labelled agent is responsible for the evolution Algorithm 4.1 State update via order book mechanics (sell market order) Require: X(t−), (t, q M , 0, −1) t− ; 0 otherwise 5: initialize q := 0 for i in 1, . . ., n do of the price dynamics that emerge from the state process (X(t)) t .Section 5.1 describes the former; Section 5.2 describes the latter.

Labelled Agent
We account for a labelled agent in the market, and we aim to measure their impact on the dynamics of the order book.We take the perspective of a liquidation, namely we consider our agent (also referred to as liquidator) to be selling the amount Q 0 of asset.The case of acquisition is mutatis mutandis the same.
We let [0, T] represent the time window of the liquidation.The quantity Q 0 is referred to as the size of the liquidator's metaorder, or their initial inventory, and we normalize it with respect to the overall volume n i=1 (V a,i 0 + V b,i 0 ) of offers sitting on the first n levels of the order book at the start of the liquidation window.
We assume that the liquidator intervenes in the market only by sending sell market orders; they will never place a limit order to queue on the ask side, but they will initiate trades with existing offers on the bid side.
Hence, the liquidation is described by the sequence {(T 0 j , q M,j , 0, −1) : j = 1, 2, . ..} of sell market orders sent by the liquidator.For every j, T 0 j is the time stamp of the liquidator's jth child market order, and q M,j is its size.
We suppose that the stream of random times T 0 1 < T 0 2 < . . . is restricted to [0, T].We assume non-explosiveness, so that the number of liquidator's market orders is finite if the time horizon T of the execution window is not +∞.Moreover, we let t 0 = T 0 1 represent the time at which the liquidator begins their intervention in the market, and we let τ := sup{T 0 j ≤ T : j = 1, 2, . ..} be the time at which the liquidation stops.
Assumption 5.1: Let Q 0 be the size of the liquidator's metaorder, and for j in N, let z j = q M,1 + • • • + q M,j be the sum of all liquidity-normalized sizes of the first j child market orders sent by the liquidator.Then, the termination time τ of the liquidation is assumed to coincide with the smallest time stamp T 0 j among the liquidator's market orders such that z j ≥ Q 0 , namely We introduce the liquidator's presence in the model described in Section 4 by expanding the dimension of the counting process N: we let the zero-th component N 0 (t) count the liquidator's market orders sent to the exchange by time t.In other words, from the overall sequence (T 1 j ) j of arrival times of market orders described in Section 4, we extract those sent by the liquidator and we label them as (T 0 j ) j ; we then let count the number of trades initiated by the liquidator that happened before or at time t.Notice that the map t → N 0 (t) represents how the liquidator is splitting in time the execution of their metaorder.In other words, this is the liquidator's execution schedule.The pair (N, X) is a state-dependent Hawkes process where the counting process component N is five-dimensional, and the state process X is as in Equation ( 10).The event types will be labelled e = 0, 1, . . ., 4 and the states will be labelled x = 1, . . ., 3K or x = (x 1 , x 2 ) with x 1 = −1, 0, +1 and x 2 = −(K − 1)/2, . . ., +(K + 1)/2.The following assumption is in place on the intensities.

Assumption 5.2:
For all e = 1, . . ., 4, the Hawkes kernel κ 0,e coincides with κ 1,e .Assumption 5.2 guarantees consistency in the effect that trades have on the order book dynamics.It says that the rates of arrival of market orders to the exchange are modified by the liquidator's interventions in the same way as they are by other participants' sell market orders.More precisely, for e = 1, . . ., 4 it holds The liquidator's execution schedule admits an absolutely continuous compensator 0 with density For j = 1, 2, . . .let (T 0 j , q M,j , 0, −1) be the liquidator's child market orders, as denoted above.The liquidator's order scheduling depends on the Hawkes parameters ν 0 , and κ e ,0 , which modulate the sequence of arrival times T 0 j .Additionally, the liquidation depends on the size q M,j of the jth child market order, for j = 1, 2, . . . 3 The evolution of the limit order book is simulated by combining Algorithms 3.1 and 4.1, as detailed in Algorithm 5.1.Algorithm 5.1 Simulation of order book in the presence of liquidator Require: Remark 5.3: In Bacry and Muzy (2014) (see Remark 4.1), a labelled agent is accounted for by considering the following intensities of the four-dimensional counting process N.For e = 1, . . ., 4 and t > 0 they set where t → A(t) is the liquidator's execution schedule, t → θ 1 (t) (resp., t → θ 2 (t)) represents the impact of the liquidator's market orders on the arrival of other participants' sell (resp., buy) market orders, and t → θ 3 (t) (resp., t → θ 4 (t)) represents the impact of the liquidator's market orders on downward (resp., upward) jumps of the mid-price.In their model, to have consistency between the liquidator and other market participants one needs to impose θ 3 (t) = κ 1,3 (t) and θ 4 (t) = κ 1,4 (t) for t ≥ 0. Practically, this implies that the atomic components in the Hawkes kernel are passed to the integrands θ 3 and θ 4 , which means that the liquidator walks the book at an average rate equal to the overall proportion of markets orders walking the book.The consequence that the liquidator walks the book in this way can be a potentially undesirable feature. 4In our model, there is no need for this to be assumed.We are able to test executions without this assumption, and still maintain consistency between the liquidator and other market participants.
Remark 5.4: The liquidator's interventions in the market have been modelled by expanding one component of the Hawkes process introduced in Section 4. The justification for this modelling choice is twofold.First, this guarantees consistency between executions of sell market orders sent by the liquidator and executions of sell market orders sent by other market participants.Given our interest in understanding the liquidator's impact, any other stochastic model would raise questions of granting the liquidator with a privileged order scheduling.Second, expanding the dimensions of N allows us to give a natural justification to Bacry and Muzy (2014)'s formula for the intensity ( 14) -κ 0,e takes the role of θ e and dN 0 takes the role of dA.Hence, our modelling choice resonates with existing models in the literature, and it is grounded in our phenomenological point of view.A future work could adopt the point of view of optimal execution, and optimize the liquidator's scheduling in a set of admissible liquidation strategies aimed at minimizing their price impact.

Definition of Price Impact
We partition the state space S according to the values of the first component X 1 of the state variable X = (X 1 , X 2 ).We define We refer to states x in S + (resp., in S − ) as inflationary (resp., deflationary) states.
The jump times for the mid-price consequently give rise to the counting processes where T n is the nth jump time of the ground process.The difference N + (t) − N − (t) is a proxy for the mid-price in the order book.Indeed, we can rewrite the integral quantity in Equation ( 11) as κ e , e (t − s, X(s)dN e (s).
Remark 5.7: The condition in Proposition 5.6(i) captures the idea that, given the current state y, transitions to inflationary states and transitions to deflationary states are equally likely.The conditions in Proposition 5.6(iii) capture the idea that, given the current state y, every event-state pair (e , x ) excites an event-state pair (e, x) with inflationary state x ∈ S + the same way as it excites an event-state pair (σ E (e), σ S (x)) with deflationary state σ S (x) ∈ S − ; in other words, the offspring from every event-state pair (e , x ) are equally likely to be associated with inflationary states or with deflationary states.
Definition 5.8: Let t 0 be the time when the liquidator becomes active in the market.Then, the price impact profile of the execution schedule N 0 is the primitive of t → Dir(t) + Indir(t) pinned at 0 in t 0 , where where τ is the termination time of the liquidation, and The map t → Dir(t) + Indir(t) is referred to as intensity of the price impact profile.
Remark 5.9: In Definition 5.8 we defined price impact as the time integral of intensities of counting processes.These counting processes count the increases and the decreases of the mid-price.The tick size is set by the trading venue to 0.01 USD, and so the minimum change in the mid-price is 0.005 USD.Therefore, in the examples below, the physical dimension of price impact is 0.005 USD.
Remark 5.10: The intensity of the price impact profile is decomposed in two components, namely Dir(t) and Indir(t).Both are null if N 0 (t) ≡ 0. The former is referred to as 'direct' impact and stems from those summands of the execution schedule's intensity λ 0 (t) = 3K x=1 λ0,x (t) that are associated with deflationary states, namely Dir(t) = x∈S − λ0,x (t).Notice that Dir(t) ≥ 0 for all t > 0 and Dir(t) = 0 for all t > τ.On the contrary, the second term Indir(t) stems from events originated by participants other than the liquidator but in response to the liquidator's interventions, hence the name of 'indirect' impact.It can have either sign and it is in general non-zero even beyond the termination time; for this reason it is linked to the transient impact.More precisely, for t > τ it holds x), and the transient price impact profile is the map t → t 0 Indir(s)ds, restricted to the interval t ≥ τ .
In a price-symmetric state-dependent Hawkes model, if N 0 ≡ 0, then N − − N + is a martingale, and its compensator is identically null.Instead, when the liquidator is active in the market, the symmetry is disrupted, and we map this disruption to our measure of the price impact.
Hence, Definition 5.8 is vindicated by the following proposition.
Proposition 5.11: If (N, X) is price-symmetric, then the price impact profile of N 0 is the F-compensator of N − − N + , where F is the minimal complete right-continuous filtration to which (N, X) is adapted.
The direct impact component Dir(t) of the intensity (λ − − λ + )(t) encompasses the transition matrix φ 0 associated with the state update that occurs when liquidator's orders are executed.For x and x in S, φ 0 (x , x) is estimated according to Equation ( 17); hence it summarizes the state transitions that stem from Algorithm 4.1 during the simulation of the execution.This disentangles the effects of liquidator's orders (whose sizes q M,j are set by the liquidator) from the effects of other market orders, i.e., φ 0 = φ 1 in general, allowing to investigate the impact of different execution strategies.
In particular, the liquidator might choose to send market orders with sizes that never exceed the available liquidity on the first bid level; this would cause φ 0 (x , x) = 0 for all x in S and all deflationary x in S − , and thus Dir(t) ≡ 0. Nonetheless, the overall impact would not be null, because of the indirect term Indir(t).Indeed, even without ever walking the book, the liquidator's orders would modify (i) the arrival of orders submitted by other market participants who react to the liquidator's executions; (ii) the volumes in the order book.
As far as (i) is concerned, if the dynamics of order submission is such that deflationary events trigger other events with deflationary effects on the price, then the price may plunge as an indirect consequence of the liquidation.
As far as (ii) is concerned, despite the fact that they do not walk the book, liquidator's executions consume liquidity on the bid side, pushing the state trajectory t → X(t) to dwell in states {y = (y 1 , y 2 ) ∈ S : y 2 < 0} for longer.The probability of transitioning from these states to deflationary states is higher than the probability of transitioning to inflationary states, hence making the term ( x∈S − − x∈S + )φ e (X(t), x) positive, and contributing to the impact via the indirect term Indir(t).Notice that this form of impact would not be captured by a less granular model where the update of the volumes in the limit order book is not reproduced as we do in Algorithm 4.1, and where the liquidator's child orders are assumed to walk the book at an average rate equal to the overall proportion of market orders that do so -see Remark 5.3.
In Section 6, we will see that, after calibrating our model on empirical data from NAS-DAQ, the indirect component of the price impact is actually the main driver of price impact during liquidation.

Description of the Dataset and Model Specifications
We study order book data provided by LOBSTER. 5 LOBSTER is a provider of high-quality limit order book data that is reconstructed from NASDAQ's Historical TotalView-ITCH 6 files with detailed event information.The reconstruction methodology is described in Huang and Polak (2011).
For every NASDAQ ticker and every active trading day, LOBSTER provides two files in .csvformat: a 'message file' and an 'orderbook' file.The former is an event-by-event Table 1.LOBSTER labels of order book events. 1: Submission of a new limit order 2: Cancellation (partial deletion of a limit order) 3: Deletion (total deletion of a limit order) 4: Execution of a visible limit order 5: Execution of a hidden limit order 6: Indicates a cross trade, e.g., auction trade 7: Trading halt indicator Table 2. Mapping of LOBSTER labels to event types.
LOBSTER event label Bid/Ask Event type history of messages sent to the exchange that provoked an update in the configuration of the order book.The latter is an event-by-event snapshot of the order book, where the nth row corresponds to the configuration resulting from the nth message reported in the message file.
Prices are reported in 10 −4 USD; hence the tick size, imposed by regulation 7 and equal for all shares with price above 1USD, is set to 100.Time stamps are reported in seconds after midnight with resolution at the nanosecond scale.In the plots that follow prices are always reported in 10 −4 USD and times are reported in seconds.Events happening in the trading venue are labelled according to Table 1. 8  Table 2 shows how we map LOBSTER order book labels to the sequences of arrival times described in Section 4.
In the analysis that follows, we study order book data for the ticker INTC trading on 25 January 2019.First, we calibrate our state-dependent Hawkes model on the dataset of 25 January 2019; then, we simulate liquidations of a large number of shares using Algorithm 5.1; and finally we assess the price impact of such simulated liquidations as per Definition 5.8.At the end of the section we make remarks about the sensitivity of our results with respect to calibrated parameters, and we provide insights on the implementation for other dates and tickers.

Calibration
After filtering for the arrival times (T e j ) j , e = 1, . . ., 4, and defining the state variable X = (X 1 , X 2 ) as per Equation ( 10) with n = 2 and K = 3, the data sets of message file and order book for INTC on 25 January 2019 are as in Table 3.
Starting from these data sets we perform maximum likelihood estimation of our statedependent Hawkes model.We show the first level of the limit order book for ease of exposition.
Transition probabilities are straightforwardly estimated from empirical frequencies.For every event e = 1, . . ., 4, we estimate a 9 × 9-transition matrix φ e that describes the law of the state-update in Equation ( 7).In Table 4, we show the result of this estimation focussing on events of type either 1 or 2, i.e., execution on either the bid or the ask side.Assumption 6.1: Hawkes kernels are assumed in the parametric form κ e , e (t, x ) = α e , x , e (t + 1) −β e , x , e , ( for some non-negative coefficients α e , x , e ≥ 0 and β e , x , e > 1. Remark 6.2: Assumption 6.1 is grounded in the stylized fact that power-law kernels better fit real world data than exponential kernels do, albeit being more computational expensive.This assumption also builds on Bacry and Muzy (2014)'s findings.In the aforementioned paper, the authors devise a non-parametric estimation for Hawkes kernels.Once this non-parametric estimation has converged, they compare the estimated kernels Probabilities of mid-price movements X 1 (T) ∈ {−1, 0, +1} when event of type either 1 or 2 occurs at time T and queue imbalance X 2 (T−) is negative (−1), neutral (0) or positive (+1): ) when an execution happens on the bid side at time T. with parametric ones, and confirm that indeed the decay of the kernels is of power-law type.
We estimate the parameters ν e , α e , x , e , and β e , x , e using a gradient-descent algorithm.In Table 5, we present the result of this estimation by reporting the four dimensional vector ν, and both, α e , x , e and β e , x , e for when X 2 = 0 and X 1 = 0 -the other cases are not presented in the interest of space.
Figure 1 shows QQ plots for goodness-of-fit diagnostics; we note that the fit is adequate for our purposes although there is some deviation in the tail part of the plots -perfecting the fit tends to be difficult with the amount of data we employ (e.g., for INTC on 25 January 2019 we employ 1,563,582 datapoints).
Finally, Figure 2 compares the trajectory of the mid-price as reported in LOBSTER, as reconstructed from Equation (11), and as simulated in the calibrated model (one sample); we plot two different time-scales.

Price Impact Assessment
We simulate liquidations in our state-dependent Hawkes model for an order book calibrated on LOBSTER data for the ticker INTC on 25 January 2019, and we assess the price impact of such liquidations using Definition 5.8.
We investigate two aspects of the liquidation schedule: The rate with which liquidator's orders walk the book (captured by the transition matrix φ 0 ), and the clustering of the liquidator's orders in response to events happening in the limit order book.We modulate these two aspects through the parameters reported in Table 6.
We run simulations for different values of these parameters and we find out that the clustering of liquidator's orders has a bigger price impact than the rate with which they walk the book.This suggests that the dynamic evolution of the order book plays a bigger role in price formation than the instantaneous states of the queues.
Figures 3, 6 and 7 present three simulations representative of our findings.More precisely, Figure 3 shows a liquidation in which there is no clustering of market orders (i.e., α e ,x,0 = 0), and the execution schedule follows a Poisson process with rate ν 0 = 0.03, namely approximately 75% of the base rate of all other sell market orders.All liquidator's orders have size equal to 7.5% of the volumes of bid offers queuing on the first n levels of the bid side at the moment of the order submission.This entails that liquidator's orders will walk the book only when the aggregate size of level 1 is less than 7.5% of the overall bid volume.As a result, the estimated transition matrix φ 0 = φ 0 (x , x) concentrates the mass on those states x = (x 1 , x 2 ) such that x 2 = 0.The more positive the queue inbalance at the moment of the order submission is, the more this concentration holds.
The liquidation takes approximately 9250 s to complete.The price impact score, defined as the maximum of the price impact profile divided by the duration, is 3.46%.
The line charts in Figure 3 (top left plot) present visualizations of the liquidation schedule (the red dots represent executions on the bid side triggered by one of liquidator's sell market orders), and its intensity (see Equation ( 13)), which in this case is simply λ 0 (t) = ν 0 1 [0,τ ) (t).This panel also depicts the impact profile trajectory (green line in top left plot) that we used to compute the price impact score.Moreover, the trajectories of liquidator's inventory and of the mid-price during execution are plotted (see bottom left plot).The latter can be compared to the mid-price simulated when the liquidator was not present in the market (see Figure 2), and it provides a graphical representation of price impact.
We remark that the stylized features one observes in the impact profile trajectory are consistent across simulations.In Figure 4 we show the impact profile trajectories for one hundred simulations.Remark 6.3: Taking the mean across simulations provides a bridge from our scenariodependent impact profiles to the average impact profiles studied in the literature.Since our model is rich enough to comprise all market variables appearing in the stylized facts of price impact, one can hold all model parameters fixed except for one variable of interest, and study average price impact scores as a function of the variable of interest.This opens the door to investigating whether a specific model adheres to the stylized facts in the literature, as those reviewed in Zarinelli et al. (2015).In Figure 5 below, we study two experiments where we stress the order size parameter c and the base rate parameter ν 0 .
The left panel of Figure 5 shows the average increase in the price impact profile at time τ as a function of the order size parameter c; the right panel shows the price impact score as a function of the base rate parameter ν 0 -see Table 6 for the definition of c and ν 0 .The remaining model parameters are those in Figure 3.
Figure 6 shows a liquidation in which the execution schedule is as in Figure 3, namely no clustering and same base rate.However, in this case liquidator's orders have a much bigger size.They have size equal to 50% of the volumes of bid offers queuing on the first n levels of the bid side at the moment of the order submission.This entails that liquidator's orders  will likely walk the book.Indeed, they walk the book whenever the aggregate size of level 1 is less than 50% of the overall bid volume.As a result, the estimated transition matrix φ 0 = φ 0 (x , x) concentrates the mass on those states x = (x 1 , x 2 ) such that x 2 = −1.The more negative the queue imbalance at the moment of the order submission is, the more this concentration holds.
The liquidation takes approximately 1061 s to complete.This is considerably shorter than in the previous simulation because every order executes more of the liquidator's inventory.The price impact score, is 4.26%.The plotted mid-price trajectory shows a sharper plunge during execution.
Hence, Figures 3 and 6 show how our model captures the consequence that order sizing has on price impact.Order sizing however is not the main driver of price impact.We demonstrate this in Figure 7.
Figure 7 shows a liquidation in which the intensity of the execution schedule has zero base rate, namely there is no exogenous cause for the liquidator to submit their orders.Instead, they submit their orders in response to orders submitted by other market participants.We set the liquidator's response to be proportional to the response that other market participants make when scheduling their sell market orders.That is, we set α e ,x,0 = a • α e ,x,1 , for some coefficient a ≥ 0. In the simulation of Figure 7 this coefficient is a = 0.25.
Recall that α e ,x,1 was estimated by maximum likelihood estimation from the LOB-STER data set -see Table 5 where the L 1 -norms α e ,x,e /(β e ,x,e − 1) are reported.The estimation revealed that seller-initiated executions are more likely to excite other events with deflationary pressure on the mid-price, i.e., events of type e = 1 or e = 3, whereas buyer-initiated executions are more likely to excite other events with inflationary pressure on the mid-price, i.e., events of type e = 2 or e = 4.As a consequence, when α e ,x,0 is proportional to α e ,x,1 deflationary events will tend to cluster, potentially triggering abrupt price changes.The line charts in Figure 7 give visual representations of this.We deliberately focussed on a short time horizon of 300 s, so that the phenomenon described is more apparent to the eye.
We set the order sizes to be very small, at 1.5% of the volumes available on the first n levels of the bid side.This has the purpose to isolate the phenomenon of indirectly induced price changes versus price changes induced by walking the book.Indeed, the estimated transition probabilities φ 0 on this simulation assign negligible probabilities to transitioning to a state X(T) with X 1 (T) = −1 when an event of type 0 occurs at time T.
Nonetheless, because of the clustering effect of deflationary events, the price impact score is the highest, at 99.9%.
The results presented in this section are robust to misspecification of model parameters.When we stress the base rates {ν e } e , together with the coefficients {α e ,x ,e } e ,x ,e and {β e ,x ,e } e ,x ,e with shocks between −5% and +5%, we observe that the average price impact scores across one hundred simulations get affected by less than 10% of the average unstressed values.For example, if we consider the experiment in Figure 3, and we repeat the profiling with the modified parameters νe = 1.05 ν e , αe ,x ,e = 1.05 α e ,x ,e and βe ,x ,e = 1.05 β e ,x ,e for all {e , x, e}, we find that the average price impact scores changes from 0.037 (with 0.006 standard deviation) to 0.041 (with 0.006 standard deviation), which represents an average increase of 8.2%.Similarly, in that same scenario of Figure 3, when we consider the modified parameters νe = 0.95 ν e , αe ,x ,e = 0.95 α e ,x ,e and βe ,x ,e = 0.95 β e ,x ,e for all {e , x, e}, we find that the average price impact scores decrease to 0.036 (with 0.005 standard deviation), which represents an average decrease of 3.7%.The other two scenarios we consider in Figures 6 and 7 show a similar behaviour when stressing the calibrated parameters.This means that the results shown are indeed robust to calibration errors.
Finally, we repeat the above analysis employing the tickers AAPL and INTC for a range of dates during January 2019.We report that no further insights are derived from considering other dates or other tickers.For example, it was always the case that the highest price impact scores were achieved under the scenario we consider in Figure 7, i.e., where the clustering effect plays a key role in the price impact profile.Thus, we conclude that the intuition derived from the analysis in Figures 3, 6, and 7 remains valid for other dates and similar tickers.
In limit order books of small tick-size stocks (e.g., GOOG or TSLA), orders are posted and cancelled in adjacent price queues more frequently than for medium-size or large-size stocks.In other words, the mid-price of a small tick-size stock has far smaller constant traits.This is because, relative to the stock price, a one-tick change in the best bid or best ask is not as significant as for larger tick-size stocks.When studying small tick-size stocks with our model, such a reduced importance of single-tick changes can be accounted for by letting N 3 and N 4 jump only when the mid-price changes by two or more ticks, defacto renormalizing the parameters of the limit order book (doubling or tripling the tick size and merging adjacent queues of orders).In our experiments, this led to a more robust calibration and prevented overfitting.

Discussion
Modelling price impact, direct and indirect, is an important challenge in market microstructure.In this paper we proposed a methodology for modelling both components (direct and indirect) separately on a path-by-path basis.Our definition of price impact assumes that price movements are driven by state-dependent Hawkes processes.Specifically, the (i) seller/buyer-initiated trades, and the (ii) decreases/increases in mid-price by limit order insertions or cancellations, follow a state-dependent Hawkes process.We conducted a goodness-of-fit analysis and concluded that the model fits the data adequately.We studied the average behaviour of the price impact score as a function the base rate of the execution and found evidence of a concave relationship between these variables; future work will explore alternative calibration or modelling assumptions that exhibit a better fit on the data together with further studies of the average behaviour of the price impact profiles we define.Additional avenues for future work include exploring the behaviour of the price impact profile after the executions are completed and use our model to solve control problems of optimal execution of large orders and liquidity provision.

Notes
1.In some trading venues, traders can actually submit market orders, i.e., buy or sell orders that are executed without price constraints, at least as long as offers with the opposite direction exist.
Even in such cases, we keep our convention of referring to the fraction of a limit order that is executed upon submission as market order.2. There is no chance that a sell (buy) market order can cause an increase (decrease, respectively) in the mid-price.3. Every q M,j satisfies the measurability constraint q M,j ∈ F T 0 j − = >0 F T 0 j − , where F is a history of (N, X). 4. To see why this can be a potentially undesirable feature, consider a liquidator that trades with child orders whose sizes are significantly different from the average market orders arriving in the market.5. See https://lobsterdata.com/.6. See http://nasdaqtrader.com/Trader.aspx?id=ITCH.7. See rule 4701(k) at https://listingcenter.nasdaq.com/rulebook/nasdaq/rules/nasdaq-4000.8. See https://lobsterdata.com/info/DataStructure.php.

Disclosure statement
This work reflects the analysis and views of the authors Claudio Bellani, Damiano Brigo, Leandro Sánchez-Betancourt, and Mikko Pakkanen.No reader should interpret this work to present the views of any third party.Assumptions, opinions, views and estimates constitute the authors' judgment as of the date given and are subject to change without notice and without duty to update.

Appendix. Proofs
Proof of Proposition 2.2: Let (t, q, p, −1) be a sell limit order.Let N v := inf{n ≥ 0 : q < n i=1 V b,i t− }.Let N p := inf{n ≥ 1 : P b,n t− < p}.Let Let N M v , N M p and q i M be the corresponding quantities for the order (t, q M , 0, −1).Notice that N M v = N M v ∧ N M p .Processing (t, q M , 0, −1) does not affect the ask side because q ∞ M = 0; moreover the effects on the bid side of processing (t, q M , 0, −1) are the same as those of (t, q, p, −1), because inf{n ≥ 0 : q M < n i=1 V b,i t− } = N v ∧ N p and q k+N−1 − q k+N = q . Therefore, after (t, q M , 0, −1) has been processed, the bid side is the same as the bid side after the processing of (t, q, p, −1).
Processing (t, q − q M , p, −1) after (t, q M , 0, −1) does not alter the bid side because either P b t−1 < p or q − q M = 0.Moreover, (t, q − q M , p, −1) has the same effects on the ask side as those of (t, q, p, −1) because q − q M = q ∞ .The proof of the decomposition of a buy limit order is mutatis mutandis the same.
Proof of Proposition 5.6: Let (T n , E n , X n ) be the sequence of arrival times, events and states.Then, we can compute To this purpose, we compute λ − (resp., of λ + ) as the sum of the intensities of Ñe,x for e = 0, . . ., 4 and x in S − (resp., in S + ).From Equations ( 9) and ( 12 h↓0

Definition 5. 5 :
The state-dependent Hawkes model (N, X) is said price-symmetric if for all t

Figure 1 .
Figure 1.Goodness-of-fit diagnostics for the model calibrated on INTC as of 25 January 2019.We test that the time-changed inter-arrival times of Equation (4) are i.i.d.samples from a unit rate exponential distribution.Empirical quantiles of the time-changed inter-arrival times on the y-axis and theoretical quantiles of unit-rate exponential distribution on the x-axis.

Figure 2 .
Figure 2. Mid-price trajectories on two time scales.Origin of time is set at 9.55am 25 January 2019.Time is measured in seconds.Prices are in 10 −4 USD.

Figure 3 .
Figure 3. impact with low rate of walking the book and no clustering.Initial inventory Q 0 = 10, base rate ν 0 = 0.03, clustering rate a = 0, order size c = 0.075, start time t 0 = 0, termination time τ = 9250.2,and price impact score is 0.0346.

Figure 4 .
Figure 4. Simulated trajectories of the intensity of the price impact profile, i.e., the map t → Dir(t) + Indir(t) (see Definition 5.8) for the scenario considered in Figure3.The black solid line is the median trajectory of the impact profile across simulations and the red dotted lines are the 25% and 75% quantile trajectories.

Figure 5 .
Figure 5. Left panel: box plots of the distribution of Dir(τ ) + Indir(τ ) when stressing the order size parameter c.Right panel: box plots of the distribution of the price impact score as a function of the base rate ν 0 .

Figure 6 .
Figure 6.Price impact with high rate of walking the book and no clustering.Initial inventory Q 0 = 10.0, base rate ν 0 = 0.03, clustering rate a = 0, order size c = 0.5, start time t 0 = 0, termination time τ = 1060.7,and price impact score is 0.0426.

Figure 7 .
Figure 7. Price impact with clustering of liquidator's orders and low rate of walking the book.We show the first 300 s.Initial inventory Q 0 = 10.0, base rate ν 0 = 0, clustering rate a = 0.25, order size c = 0.015, start time t 0 = 0, termination time τ = 722.3,and price impact score is 0.999.

Example 3.1 (Poisson process): Let τ
for all t > 0 and all e = 1, . .., d E .We can interpret this construction by saying that the index e labels d E types of events that occur in time, and N e (t) counts the number of events of type e that have occurred by time t.
g of N is such that for every t, N g (t) ∼ Pois(λ 1 t + • • • + λ d E t).

Table 3 .
Ten time stamps from the filtered message file and order book file.

Table 4 .
Transition probabilities φ e calibrated on INTC as of 25 January 2019.
Full transition probability from X

Table 6 .
Parameters of the liquidation schedule.