A modern Python point process library with deep Hawkes specialization, dual-domain interfaces for quantitative finance and computational neuroscience.
Project description
intensify
A modern Python point process library with deep Hawkes specialization — built for quantitative finance and computational neuroscience, tested on real spike-train recordings, and JAX-accelerated end-to-end.
pip install intensify
Quickstart
import numpy as np
import intensify as its
# Simulate some event times
events = np.array([0.1, 0.5, 1.2, 1.8, 2.3, 3.1, 3.7, 4.4])
T = 5.0
# Fit a univariate Hawkes model with exponential kernel
model = its.Hawkes(mu=0.5, kernel=its.ExponentialKernel(alpha=0.3, beta=1.5))
result = model.fit(events, T=T)
print(f"Branching ratio: {result.branching_ratio_:.3f}")
print(f"Log-likelihood: {result.log_likelihood:.3f}")
print(f"Fitted params: {result.flat_params()}")
# Visualize fitted intensity and diagnostics
its.plot_intensity(result)
Features
- Core processes: homogeneous / inhomogeneous Poisson, Cox (Log-Gaussian, Shot-Noise), Hawkes (univariate, multivariate, marked, nonlinear / inhibitory).
- Kernel family: Exponential, Sum-of-Exponentials, Power-Law, Approximate Power-Law (Bacry–Muzy), Nonparametric (piecewise-constant). Every kernel is supported in every MLE path.
- Inference: MLE via JAX autodiff with an
O(N)recursive likelihood for exponential-family kernels; EM for mixtures; online (streaming) updates; Bayesian MCMC (experimental, numpyro backend). - Diagnostics: time-rescaling theorem (KS + QQ on inter-compensator increments — the mathematically correct form), AIC/BIC, residual intensity.
- Simulation: Ogata thinning (general) and cluster/branching (Galton–Watson).
- Stationarity enforcement: projected gradient for multivariate Hawkes;
spectral radius of the kernel-norm matrix reported on every multivariate
FitResult. - Backends: JAX (JIT + autodiff, default) with a NumPy fallback. Switch
at runtime with
its.set_backend("numpy").
Why intensify?
intensify and tick solve partly overlapping problems. Pick the right tool:
| Capability | intensify | tick |
|---|---|---|
| Joint MLE of (μ, α, β) — fits the decay for you | ✓ | — (decay must be supplied) |
| MLE for power-law, approx-power-law, nonparametric kernels | ✓ | — |
| Marked Hawkes fit with any kernel | ✓ | — |
| Nonlinear (softplus / sigmoid / relu) Hawkes, signed kernels | ✓ | — |
| Multivariate stationarity enforcement (projected gradient) | ✓ | — |
| Time-rescaling test on inter-compensator increments | ✓ | ✓ |
| Python 3.10 – 3.14 support, pure-Python install | ✓ | 3.8 only, C++ build |
| Microsecond fits for exp kernels with known decay | still improving | ✓ (C++) |
Concrete numbers, head-to-head: docs/benchmarks.md.
Short version, on the apples-to-apples problem (decay-given, the case
tick can solve at all): univariate fit is 2.6 ms vs tick 1 ms;
multivariate mv_exp_5d is 17 ms vs tick 2 ms — and intensify is
more accurate (parameter RMSE 0.041 vs 0.052). For kernels tick
doesn't ship (power-law, nonparametric, signed, marked, nonlinear)
intensify is the only option. pyhawkes is no longer usable — its
transitive deps depend on APIs removed from SciPy 1.0 in 2017.
Documentation
Full docs: https://hillmatt7.github.io/intensify
- Getting started
- User guide: inference, kernels, simulation, diagnostics
- Domain guides: quantitative finance, computational neuroscience
- API reference
- Tutorials (Jupyter notebooks)
Citation
If you use intensify in academic work, please cite it:
@software{intensify,
author = {Hill, Matthew},
title = {intensify: A modern Python point process library with deep Hawkes specialization},
year = {2026},
url = {https://github.com/hillmatt7/intensify}
}
See CITATION.cff for the machine-readable form.
Contributing & changes
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file intensify-0.2.0.tar.gz.
File metadata
- Download URL: intensify-0.2.0.tar.gz
- Upload date:
- Size: 169.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea84f14791590f6dea0f3917461214c2b33433f541cc27e492d4825840e49b66
|
|
| MD5 |
d99bd228136d450a3dc4112abad60012
|
|
| BLAKE2b-256 |
005549e50417c657f6ce9be7afbdb803a43138043bdcf143d1de588c6e59043a
|
Provenance
The following attestation bundles were made for intensify-0.2.0.tar.gz:
Publisher:
publish.yml on hillmatt7/intensify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
intensify-0.2.0.tar.gz -
Subject digest:
ea84f14791590f6dea0f3917461214c2b33433f541cc27e492d4825840e49b66 - Sigstore transparency entry: 1514464007
- Sigstore integration time:
-
Permalink:
hillmatt7/intensify@36e955887f18a5dad2634dec3e0d139b2f8c5f76 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/hillmatt7
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@36e955887f18a5dad2634dec3e0d139b2f8c5f76 -
Trigger Event:
push
-
Statement type:
File details
Details for the file intensify-0.2.0-py3-none-any.whl.
File metadata
- Download URL: intensify-0.2.0-py3-none-any.whl
- Upload date:
- Size: 80.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22d65d9e6f3a5cce6cf99255444d7db01029b45258d9d04a5c6179da7d2f397e
|
|
| MD5 |
4d81d07cb0fac052cf67ab0fe3e6576c
|
|
| BLAKE2b-256 |
b617241d6d0e129973127636bbb98b0a8119db11539b84961a9986cab18a701e
|
Provenance
The following attestation bundles were made for intensify-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on hillmatt7/intensify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
intensify-0.2.0-py3-none-any.whl -
Subject digest:
22d65d9e6f3a5cce6cf99255444d7db01029b45258d9d04a5c6179da7d2f397e - Sigstore transparency entry: 1514465291
- Sigstore integration time:
-
Permalink:
hillmatt7/intensify@36e955887f18a5dad2634dec3e0d139b2f8c5f76 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/hillmatt7
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@36e955887f18a5dad2634dec3e0d139b2f8c5f76 -
Trigger Event:
push
-
Statement type: