Not an implementation claim. A fitted Hawkes process describes how past events in one venue and one era clustered. It does not identify who is informed, and its parameters are as venue- and period-specific as any microstructure estimate. This guide covers the objects (intensity, decayed imbalance, branching ratios, markouts) so you can build features and read the literature critically. A modelled intensity is not a quoting engine.
Definition. The conditional intensity of an event stream is the instantaneous arrival rate given everything observed so far,
$$ \lambda(t \mid \mathcal{F}_t) \;=\; \lim_{dt \to 0} \frac{\mathbb{P}\big(N(t+dt) - N(t) = 1 \mid \mathcal{F}_t\big)}{dt}, $$where \(N(t)\) counts events (trades, buy market orders, cancellations) up to \(t\). A Poisson process has constant intensity. Order flow does not: one trade raises the probability of the next, through order splitting, herding, liquidity reactions and matching-engine mechanics. Every short-horizon feature built on trades is an estimator of this intensity, whether its author calls it that or not.
The ghost drop-off: why fixed windows lie
The most common order-flow feature is a trailing-window statistic: trade count \(N(t) - N(t-w)\), or signed volume \(\sum_{t-w < t_i \le t} \epsilon_i v_i\) with \(\epsilon_i = \pm 1\) the aggressor side. It weights every event inside the window equally and every event outside it at zero, which is a boxcar kernel. The defect is easy to state. A 500-lot buy at time \(s\) contributes fully to the feature until \(s + w\) and then disappears. The feature jumps at \(s + w\), when nothing happened in the market. Every large print creates a second, phantom event exactly one window-length later. A model trained on the feature learns to react to those ghosts, and the ghosts are perfectly predictable, which also makes them look like signal in a backtest.
Count-based windows (the last \(n\) trades) avoid the calendar ghost but replace it with a variable clock. In a busy market the last 20 trades span 300 milliseconds. In a quiet one they span four minutes, so the “same” feature measures different horizons in different regimes. That is the sampling-clock problem again, at the feature level.
The fix is to make the weight a smooth, monotone function of age, so that no event ever drops off all at once. The exponential kernel is the only choice that also stays memoryless, which is what makes it cheap to compute.
Exponentially decayed trade imbalance
Define the decayed imbalance with a concave volume weight:
$$ \mathrm{TI}_{\gamma}(t) \;=\; \sum_{t_i \le t} \epsilon_i \, v_i^{\alpha} \, e^{-\gamma (t - t_i)}, \qquad \alpha \in [0, 1], \quad h_{1/2} = \frac{\ln 2}{\gamma}. $$The recursion. Because \(e^{-\gamma(t - t_i)}\) factorizes, the sum never needs to be recomputed. On each event \(n\):
$$ \Lambda_{n} \;=\; \Lambda_{n-1}\, e^{-\gamma (t_n - t_{n-1})} \;+\; \epsilon_n v_n^{\alpha}, \qquad \mathrm{TI}_\gamma(t) = \Lambda_{n}\, e^{-\gamma (t - t_n)} \ \text{ for } t \ge t_n. $$This is one multiply and one add per event, with \(O(1)\) state. The second clause is where most implementations go wrong: the decay has to be applied at query time as well. A feature read as “the last updated \(\Lambda\)” freezes during quiet periods. That is a ghost in the opposite direction, where an old burst looks current because nothing has arrived to decay it.
Normalization. A bounded version divides by decayed gross volume. Both sums follow the same recursion:
$$ \widetilde{\mathrm{TI}}_\gamma(t) = \frac{\Lambda^{+}(t) - \Lambda^{-}(t)}{\Lambda^{+}(t) + \Lambda^{-}(t) + c}, \qquad c > 0. $$The pseudo-count \(c\) matters. Without it, a single small trade after a quiet minute sets the ratio to \(\pm 1\), the strongest possible reading, on the weakest evidence the market can produce.
Why \(\alpha = 0.5\). The empirical square-root law says the price impact of a metaorder of size \(Q\) scales as \(I(Q) \approx Y\sigma\sqrt{Q/V}\), with \(V\) daily volume and \(Y\) of order one. If the feature is meant to proxy accumulated price pressure, a trade should contribute in proportion to its expected impact, not its size. \(\alpha = 1\) lets one block print dominate the feature for several half-lives. \(\alpha = 0\) (pure counts) ignores size and is dominated by fragmentation. \(\alpha = 0.5\) borrows the curvature of the impact law and is a heuristic, not a derivation. The square-root law describes metaorders, the sum of many child orders, and per-print impact is usually even more concave. The square-root / order-imbalance reconciliation literature is the place to see how these scales fit together.
There is a consequence that is easy to miss. With \(\alpha < 1\), print aggregation is no longer optional. The square root is subadditive. A single 100-lot sweep reported as 25 prints of 4 lots contributes \(25 \times \sqrt 4 = 50\) units instead of \(\sqrt{100} = 10\), a fivefold overstatement that grows with how finely the venue fragments fills. Aggregate prints by aggressor order (or by identical exchange timestamp and side) before applying \(v^\alpha\).
Choosing \(\gamma\). Order-sign autocorrelation decays roughly as a power law, \(C(\tau) \propto \tau^{-\beta}\) with \(\beta < 1\). This is the long memory usually attributed to metaorder splitting, and its identification from public data is an active question. One exponential cannot fit a power law, but a small bank can: half-lives of 0.5 s, 5 s, 60 s and 10 min, fed jointly to the model, approximate the power law by a sum of exponentials at four state variables’ cost. Choosing a single “best” half-life by backtest is a parameter search like any other.
Hawkes processes: self- and cross-excitation
The Hawkes process makes the clustering explicit. For a single stream with an exponential kernel,
$$ \lambda(t) = \mu + \sum_{t_i < t} a\, e^{-\beta (t - t_i)}, \qquad n = \frac{a}{\beta} < 1, \qquad \bar\lambda = \frac{\mu}{1 - n}. $$Here \(\mu\) is the exogenous baseline and \(n\) the branching ratio: the expected number of events directly triggered by one event. A cluster seeded by one exogenous event has expected size \(1/(1-n)\), and a fraction \(n\) of all events is endogenous. Estimates of \(n\) close to 1 across many markets started the “markets are near-critical” literature. Treat them with care. A constant \(\mu\) fitted across an intraday U-shaped activity profile pushes \(n\) toward 1, because the model can only explain the open’s activity burst through excitation. Coarse timestamps and latent common drivers do the same, as the analysis of spurious cross-excitation from common signals shows.
The bivariate model. Split events into buy and sell market orders, \(m, n \in \{\mathrm{b}, \mathrm{s}\}\):
$$ \lambda_m(t) = \mu_m + \sum_{n \in \{\mathrm{b},\mathrm{s}\}} \int_0^t a_{mn}\, e^{-\beta_{mn}(t-s)}\, dN_n(s), \qquad \boldsymbol{\Gamma} = \left[\frac{a_{mn}}{\beta_{mn}}\right]_{m,n}. $$\(\boldsymbol\Gamma\) is the branching matrix, and \(\Gamma_{mn}\) is the expected number of type-\(m\) events triggered by one type-\(n\) event. The process is stationary if and only if the spectral radius \(\rho(\boldsymbol\Gamma) < 1\), in which case the mean intensities are \(\bar{\boldsymbol\lambda} = (\mathbf I - \boldsymbol\Gamma)^{-1}\boldsymbol\mu\).
What the entries separate. \(\Gamma_{\mathrm{bb}}\) (buys triggering buys) is where meta-order splitting lives: child orders of one parent arriving in sequence, plus herding and momentum ignition. \(\Gamma_{\mathrm{sb}}\) (buys triggering sells) is the reactive opposite side: market makers and arbitrageurs leaning against a move, stale-quote arbitrage across venues, stop and liquidation reversals. With limit-order events in the model as well (a four-dimensional process over buy MO, sell MO, bid LO and ask LO), liquidity replenishment appears directly as the excitation of ask-side limit orders by buy market orders. The two mechanisms also work on different clocks. Splitting is slow and persistent (seconds to hours, with power-law memory), while reaction is fast (milliseconds to seconds). A single shared \(\beta\) forces them onto one timescale and blurs them together, so use separate \(\beta_{mn}\), sums of exponentials, or the non-parametric calibration approach.
The decomposition that matters for impact. Take the symmetric case \(\boldsymbol\Gamma = \begin{bmatrix} a & c \\ c & a \end{bmatrix}\). Its eigenvectors are total activity \((1, 1)\) with eigenvalue \(a + c\), and imbalance \((1, -1)\) with eigenvalue \(a - c\). Stationarity is governed by \(a + c\). Persistence of signed flow, which is what moves prices, is governed by \(a - c\): one extra buy triggers an expected cumulative net imbalance of \(1/(1 - (a - c))\). A market can be near-critical in activity (\(a + c \approx 1\)) while its imbalance mean-reverts quickly (\(c \approx a\)). The headline branching ratio does not tell you which. Report both modes. Models that separate core orders from reaction flow push this decomposition into a joint account of order flow, impact and volatility.
Estimation, briefly. The exponential-kernel log-likelihood \(\ell = \sum_i \log\lambda(t_i) - \int_0^T \lambda(s)\,ds\) is also \(O(N)\) via the recursion \(R_i = e^{-\beta(t_i - t_{i-1})}(1 + R_{i-1})\). Goodness of fit has a clean test: under a correct model, the compensator increments \(\int_{t_{i-1}}^{t_i}\lambda(s)\,ds\) are i.i.d. Exp(1) (the time-rescaling theorem). A QQ plot of those residuals is the minimum diagnostic for any Hawkes paper. Extensions worth knowing are state-dependent kernels (spread-dependent excitation) and exact phase-type representations that make measurement and prediction the same computation.
Mechanical and informational excitation
As with book imbalance, measured excitation mixes plumbing with information, and the two have different economic meaning.
Mechanical. One sweep printed as 30 trades with microsecond spacing shows up as enormous self-excitation at near-zero lag. Exchange batching and millisecond timestamp truncation create artificial ties. Clock skew between feed handlers creates artificial lead–lag across venues, and queue depletion at one price produces bursts with no new information behind them. All of this inflates \(\Gamma_{\mathrm{bb}}\) and \(\Gamma_{\mathrm{ss}}\) at the shortest lags and dominates naive fits.
Informational. Persistent same-side flow at seconds-to-minutes lags (splitting by someone who knows something, or simply needs to trade a lot) is the component that predicts drift, and it is the one you pay for as a liquidity provider. Separating the two in practice: aggregate prints first, discard or model sub-millisecond structure separately, then read \(\Gamma_{\mathrm{bb}}\) and its kernel shape at economically meaningful lags.
Avellaneda–Stoikov’s \(\kappa\) and where it breaks
The Avellaneda–Stoikov framework assumes fills on a quote at distance \(\delta\) from the reference price arrive as a Poisson process with intensity
$$ \lambda(\delta) = A\, e^{-\kappa \delta}, $$and gives a total optimal spread of \(\gamma\sigma^2 (T - t) + \tfrac{2}{\gamma}\ln\!\left(1 + \tfrac{\gamma}{\kappa}\right)\) around an inventory-skewed reservation price. \(\kappa\) is usually fitted by regressing the log of trade volume reaching each depth on that depth. A large \(\kappa\) means flow concentrates near the touch, and a small \(\kappa\) means market orders routinely walk the book. Two practical problems are well known. The fit needs far more data than one quoting interval provides, and noise in \(\hat\kappa\) feeds straight into the spread. Learning \(\kappa\) online has a regret cost even in the idealized model.
The deeper problem is structural. A–S models fill probability and leaves out post-fill drift. In practice \(A\) and \(\kappa\) are state variables: \(A(t)\) scales with the market-order intensity \(\lambda_{\mathrm{b}}(t) + \lambda_{\mathrm{s}}(t)\), and fills at large \(\delta\) occur preferentially during sweeps, which are exactly the toxic events. A \(\kappa\) pooled across calm and burst states treats deep fills as routine revenue when they actually arrive together with the adverse move. The repair is to price the drift in directly. Quote at depth \(\delta\) only when
$$ \delta \;>\; \mathbb{E}\big[\,\text{adverse move over } \tau \mid \text{fill at } \delta,\ \lambda(t)\,\big] + f_{\text{maker}}, $$which means estimating the conditional markout below rather than the unconditional fill curve. Papers that embed quoting in a Hawkes-driven book, or that predict toxicity directly, are attempts at this repair.
Markouts: what the intensity costs you
For a fill at time \(t_f\), price \(p_f\), with \(s_f = +1\) if you bought and \(-1\) if you sold, and mid-price \(m(\cdot)\):
$$ M(\tau) = \frac{s_f\big(m(t_f + \tau) - p_f\big)}{p_f}\times 10^4 \ \text{bps} = \underbrace{\frac{s_f\big(m(t_f) - p_f\big)}{p_f}}_{\text{spread captured}} + \underbrace{\frac{s_f\big(m(t_f+\tau) - m(t_f)\big)}{p_f}}_{\text{adverse drift}}, \quad \tau \in [100\,\text{ms},\, 60\,\text{s}]. $$Plot the median and trimmed mean of \(M(\tau)\) on a log-spaced grid (100 ms, 300 ms, 1 s, 3 s, 10 s, 30 s, 60 s), with day-block bootstrap bands, because markouts are heavy-tailed. A maker’s curve starts near the captured half-spread at \(\tau = 0\) and decays. The level it settles at is the net edge before fees. A curve that crosses zero inside your reaction time means the flow is toxic at speeds you cannot respond to.
The diagnostic that ties this guide together is markouts bucketed by intensity state at the fill: quintiles of \(\lambda(t_f)/\bar\lambda\), or of \(\lvert\widetilde{\mathrm{TI}}_\gamma(t_f)\rvert\). Add buckets for fill depth, aggressor size and sweep versus single-level aggression. Toxicity is not uniform, and an unconditional markout curve averages the state you want to quote in with the state you should be out of. The same machinery measures taker entries: a signal’s markout curve, read from your realistic arrival time, shows how much of the predicted move was left when you got there.
The fee wall, in basis points
Maker side. Take an illustrative mid-cap perpetual: quoted spread 4 bps (half-spread captured 2 bps), maker fee 0.5 bps. Suppose 80% of fills arrive in the calm state with a 5-second markout drift of −0.8 bps, and 20% arrive in the top intensity quintile at −6 bps. The pooled drift is \(0.8(-0.8) + 0.2(-6) = -1.84\) bps, so the net per fill is \(2 - 1.84 - 0.5 = -0.34\) bps. The strategy loses money. Pull quotes in the burst state and the calm fills net \(2 - 0.8 - 0.5 = +0.7\) bps. The intensity model has turned a losing book into a profitable one without improving any price forecast. The catch is detection. The burst is announced by the fills that hit you, so the first fill of every cluster is unavoidable. With branching ratio \(n\), clusters average \(1/(1-n)\) events. At \(n = 0.8\) that is 5, so reacting after the first event avoids at most 80% of the toxic fills, and only if your cancel reaches the matching engine before the second one. Latency puts a ceiling on how much of the model’s value you can capture.
Taker side. Suppose decayed imbalance predicts a 1-second mid move of 1.5 bps in the signalled direction. A non-VIP taker pays about \(2 \times 2.5\) bps in fees plus 1 bp of spread round trip, around 6 bps, before latency. Latency costs more on top: if the predicted move accrues as \(g(\tau) = G\,(1 - e^{-\tau/h})\) and your decision-to-fill latency is \(\ell\), you capture only \(e^{-\ell/h} - e^{-\tau/h}\) of \(G\). With \(h = 200\) ms and \(\ell = 50\) ms, 22% of the move is gone before you arrive. Standalone, the signal is several times short of break-even. Its value is in conditioning things you were doing anyway: quote skew, child-order timing, pausing passive orders. The transaction-cost break-even calculator shows the horizon-versus-cost trade-off with your own numbers, and the transaction-cost guide gives priors by asset class.
Production failure modes
- Stale state across feed gaps. After a reconnect, \(\Lambda\) and every Hawkes intensity are wrong, and a gap looks exactly like a quiet market. Decay across the gap, flag it, and suppress quoting until the state has warmed back up.
- Spurious criticality. A constant baseline fitted over a session with strong seasonality reports \(n \to 1\). Use time-varying \(\mu(t)\) or fit within activity-homogeneous windows.
- Unaggregated prints. Self-excitation at microsecond lags and \(\sqrt{v}\) inflation both come from counting matching-engine fills as decisions.
- Your own orders in the stream. Your fills and cancels excite the intensity you are reading. At any meaningful size the model starts measuring you. Tag and exclude your own events, or model them explicitly.
- Live re-fitting of \(\kappa\). Refit on short windows and spreads oscillate with estimation noise. Fit offline, condition on state live.
- Numerical shortcuts. The unnormalized trick of accumulating \(e^{+\gamma t_i}\) overflows within hours at sub-second half-lives. Always use the decaying recursion.
- Cross-venue lead–lag. Intensity on a lagging venue is a delayed copy of the leading venue’s. Non-synchronous lead–lag estimation is a prerequisite before trusting cross-venue excitation.
Questions to ask a paper (or backtest)
- What is an event: a print, an aggressor order, or a book update? What is the timestamp resolution, and how were ties handled?
- Kernel family and baseline: exponential or power-law, constant or seasonal \(\mu\)? Is the branching ratio robust to both choices?
- Is there an out-of-sample likelihood or time-rescaling residual test, or only in-sample fit?
- Are markouts reported at several horizons, and conditional on intensity state?
- For market-making results: does the fill model include post-fill drift, and is queue position simulated?
- What are the round-trip cost and latency at the prediction horizon, and does the edge clear both?
What our scoring captures
Hawkes papers range from pure theory, which lands in the Lab Rats quadrant by design, to calibrated empirical work with goodness-of-fit diagnostics. Our rigor axis rewards the second kind, with extra weight on out-of-sample likelihood and on markout or cost-aware evaluation. The modelling machinery sits in the stochastic calculus and econophysics & complexity method hubs. Applied work concentrates in market microstructure and HFT & execution.
Run your numbers: transaction-cost break-even calculator → · capacity estimator → · The forces underneath: market-making mechanics → · LOB imbalance → · impact and costs → · The clock question: information-driven bars → · The field: market-making research map →
Background: Hawkes (1971); Bacry, Mastromatteo and Muzy (2015) for the finance survey; Avellaneda and Stoikov (2008); Lillo, Mike and Farmer (2005) on order splitting. Practitioner treatments that informed this synthesis include VertoxQuant on point processes and toxicity, HangukQuant Research on decayed imbalance and intensity fitting, and The Quant Stack on execution. Browse the flowchart library, the rest of the guides, and the tools.