Maximum Likelihood Estimation for Hawkes Processes with self-excitation or inhibition