Hawkes Self-Exciting Point Processes¶
Part of Statistical Methods — MORIE’s statistical-methods reference.
MORIE implements both the classical Markovian Hawkes process (constant baseline, exponential excitation kernel) and the non-stationary, non-Markovian generalisation of Kwan-Chen-Dunsmuir (2024).
Modules¶
morie.tps_stochastic.hawkes_temporal_fit— classical Markovian Hawkes fit (one-parameter family, \(O(n)\) recursive intensity).morie.tps_hawkes_advanced.fit_hawkes_general— MLE for the general (kernel, baseline) pair: projected BFGS on the analytic gradient in morie’s compiled core (L-BFGS-B without it).methodpicks how the likelihood is evaluated:"exact"(Ozaki’s \(O(n)\) recursion for the exponential kernel; the Weibull and gamma double sums stop where the kernel underflows to 0),"soe"(Lomax and gamma as a sum of exponentials, Beylkin & Monzón 2010, relative erroreps),"truncate"(lags whose kernel tail mass exceedseps),"em"(Veen & Schoenberg 2008) or"inar"(Kirchner 2017, binned counts, constant baseline);"auto"is exact for the exponential kernel, truncate for Weibull and soe for Lomax and gamma.morie.tps_hawkes_advanced.compare_hawkes_kernels— fits all eight (kernel times baseline) combinations and ranks by AIC and time-rescaling-residual Kolmogorov-Smirnov goodness-of-fit.morie.tps_hawkes_advanced.hawkes_markovian_vs_nonmarkovian— focused 2-way comparison: Markovian classical vs Gamma + sinusoidal.
Mathematical content¶
For a simple point process \(N\) on \([0, T]\) with conditional intensity
the four supported excitation kernels \(g(u) = \eta\, \tilde g(u; \psi)\) (with branching ratio \(\eta \in (0, 1)\)) are:
Exponential: \(\tilde g_{\mathrm{exp}}(u; \beta) = \beta\, e^{-\beta u}\) — the classical Markovian case.
Gamma: \(\tilde g_{\mathrm{gam}}(u; \alpha, \beta) = \beta^{\alpha}\, u^{\alpha - 1}\, e^{-\beta u} / \Gamma(\alpha)\).
Weibull: \(\tilde g_{\mathrm{wb}}(u; \alpha, \lambda) = (\alpha / \lambda)\, (u / \lambda)^{\alpha - 1}\, e^{-(u / \lambda)^{\alpha}}\).
Lomax (power-law): \(\tilde g_{\mathrm{lmx}}(u; \alpha, c) = (\alpha - 1)\, c^{\alpha - 1}\, (u + c)^{-\alpha}\) for \(\alpha > 1\).
The baseline takes the log-link form
Inference is by maximum likelihood (the fit returns the estimates, log-likelihood, AIC and BIC; standard errors are not computed). Goodness-of-fit by the Daley-Vere-Jones / Brown-Frank-Mitra time-rescaling theorem: the Kolmogorov-Smirnov statistic of the rescaled inter-event times.
Asymptotic theory¶
Strong consistency and asymptotic normality of the MLE follow from Kwan-Chen-Dunsmuir (2024). Under regularity conditions on \(\nu(\cdot)\) and \(\tilde g(\cdot)\) (continuity, bounded moments, \(\eta < 1\)), the intensity process is asymptotically ergodic and
Application¶
Applied to Toronto Police Service Assault data (every event from 2014-01-01 to 2026-03-31: \(n = 252{,}971\), \(T = 4{,}473\) days), the four sinusoidal-baseline rows beat every constant-baseline row. The best fit (Weibull kernel, sinusoidal baseline, AIC \(-1{,}546{,}549.5\)) improves on the Markovian classical Hawkes (exponential kernel, constant baseline, AIC \(-1{,}546{,}007.5\)) by \(\Delta\mathrm{AIC} = 542.0\); gamma (\(-1{,}546{,}546.3\)), exponential (\(-1{,}546{,}544.9\)) and Lomax (\(-1{,}546{,}537.1\)) follow, all with the sinusoidal baseline. Branching ratios sit in \([0.561, 0.568]\) with the sinusoidal baseline and \([0.670, 0.780]\) with the constant one: part of what a constant baseline attributes to self-excitation is seasonal.
Reference¶
The functions above implement the methodology; their docstrings give the estimators, the references they follow and the assumptions they make.