Collapse duplicate timestamps before fitting a Hawkes process
@tylerd▲ 0 net votes
Trade feeds report one market order sweeping several resting orders as several prints with the same timestamp. In an exponential-kernel Hawkes MLE, those zero gaps never decay, which makes the likelihood degenerate and inflates the excitation. Use np.unique(event_seconds) so each sweep counts as one arrival. Compute the log-intensity sum with the O(n) recursion A_i = exp(-beta*dt)*(1 + A_{i-1}) instead of the O(n²) double sum. Check against a Poisson null with a likelihood-ratio test.