tick icon indicating copy to clipboard operation
tick copied to clipboard

Fitting aggregated counts of event times to Hawkes process

Open lshlomovich opened this issue 6 years ago • 5 comments

I would like to use the functions within tick.hawkes to fit some real event times to a Hawkes process. These event times are recorded to the nearest second however and so I wanted to ask if it's possible to conduct parameter estimation from either the series of counts per unit of time, or account for this rounding of the raw times in another way.

Thanks! Leigh

lshlomovich avatar Feb 28 '19 10:02 lshlomovich

Hi,

What is the total time span? What proportion of events occur at the exact same time?

Mbompr avatar Feb 28 '19 12:02 Mbompr

Total time span varies but we can restrict it as desired. The data extends several days but we can look at windows of several hours say. Approximately a third of the values share the same time as another event.

lshlomovich avatar Feb 28 '19 13:02 lshlomovich

Sadly, Hawkes processes theoretically apply to continuous time data only. It might possibly be feasible to rethink the model handle this kind of data but tick has no algorithm for. In fact, our models suppose that no events occur at the same time. Hence I see two possibilities to use tick Hawkes models:

  • either add a random noise to your data points and shit by a continuous random value your timestamps
  • or, when several events collide on the same timestamp, choose one at random and remove the other from the dataset.

These two techniques are kind of brutal but should allow you to have noisy but exploitable results.

Mbompr avatar Mar 03 '19 15:03 Mbompr

Ok, thank you for that! I will try to see if I can adapt the likelihood function to account for this, but adding random noise is certainly an option. Thanks again!

lshlomovich avatar Mar 05 '19 11:03 lshlomovich

I had collision problems on financial time series (mainly on ms timestamps), so I:

  1. Calculated the max number of down in same timestamp (e.g. 21)
  2. Subtract 1/2 of minimum time increment (e.g. subtract 0.5ms) from all timestamps
  3. Create column with increasing counter for every row in same timestamp
  4. Multiply these values by 1/100 of minimum time increment and add to shifted timestamp

MarcosCarreira avatar Jun 06 '20 00:06 MarcosCarreira