HawkesPyLib
A simple Python Package for simulation and inference of Hawkes processes. The library is currently under active development. More methods and functionality will be introduced shortly.
Installation
$ pip install HawkesPyLib
Documentation
A detailed description of the package can be found in the documentation.
Description
The library allows for simulation and fitting of Hawkes processes. Hawkes processes are self-exciting point processes and can be used to model or analyse event arrivals. Hawkes processes can be defined in terms of the conditional intensity function:
$$ \lambda(t) = \mu + \sum_{t_i < t} g(t-t_i) $$
where $\mu$ is a constant background intensity and the memory kernel function $g(t)$ specifies how past event arrivals influence the current state of the process.
The following Hawkes process models are currently available:
- Univariate Hawkes process with single exponential memory kernel
- Univariate Hawkes process with P-sum exponential memory kernel
- Univariate Hawkes process with approximate power-law memory kernel
- Univariate Hawkes process with approximate power-law memory kernel with smooth cutoff
- Homogenous Poisson process
For each of the models there is a simulator class for generating Hawkes process samples using Ogata's thining algorithm. The estimator class allows for maximum likelihood estimation of the model as well as the calculation of the corresponding compensator, and evaluation of the conditional intensity function.
A quick example of simulating and estimating Hawkes processes can be found in the Examples folder.
The core simulation and estimation algorithms are optimized for speed by recursive calculation of the model and further accelerated by numba's JIT compiler.
License
HawkesPyLib is distributed under the terms of the MIT license.
Metadata
Release files for HawkesPyLib 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hawkespylib-0.3.0.tar.gz | 30.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hawkespylib-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 58.4 kB
Release files / hawkespylib-0.3.0.tar.gz
| Download URL | hawkespylib-0.3.0.tar.gz |
|---|---|
| Size | 30.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
879f5b2b293bbe19158ecf605c641fb6af51ff540591f1d9e5d0748fbaa7eb33
|
|
BLAKE2b-256 checksum How to use checksums |
29e9304e82a4705de5b94c3f48a4c5b541724f7fbee277158c1d4f1e264dec75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 6, 2026.
Transparency logRelease files / hawkespylib-0.3.0-py3-none-any.whl
| Download URL | hawkespylib-0.3.0-py3-none-any.whl |
|---|---|
| Size | 28.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
62cfe1cc271938d5d357d5264bd8604900b9118b73281d4ca2d8c4af187aab49
|
|
BLAKE2b-256 checksum How to use checksums |
646a9b83d188a13cad3e50b5cdfefab361f1377d2ee48cd2409ac92865ec3fc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 6, 2026.
Transparency log