High-performance time series econometrics: a Rust core with a Python-first API — validation-gated against statsmodels, SciPy, NumPy, and arch
Project description
tsecon
High-performance time series econometrics: a Rust core with a Python-first API.
Pre-1.0 software under active development. The name is settled —
tseconis what you install and import — but the API may still change before the first stable release.
tsecon brings the scattered toolkit of modern time series econometrics —
diagnostics and specification tests, ARIMA, GARCH, VARs and structural
identification, local projections, Bayesian VARs, nowcasting, predictive
regressions, panels, the term structure — into one fast, validated, Python-first
library. The compute core is written from scratch in Rust (no BLAS, no heavy
dependencies) so bootstrap inference and Monte Carlo work that is painfully slow
elsewhere runs in seconds, with results bit-reproducible at any thread count.
Every estimator is validation-gated: its numbers are checked against a
reference implementation (statsmodels, SciPy, NumPy, arch, linearmodels,
scikit-learn, ArviZ) or a documented closed form before it ships, and a
cross-library parity gate re-verifies the agreement in CI on every push. The
library ships no data loaders and makes no network calls — the only runtime
dependency is NumPy.
Install
pip install tsecon # once published; a single self-contained wheel
Until the first PyPI release, build from source with maturin (needs a Rust toolchain and Python >= 3.9):
pip install maturin
maturin develop --release -m bindings/python/Cargo.toml # builds + installs into the active venv
A taste
import numpy as np
import tsecon
rng = np.random.default_rng(0)
y = np.cumsum(rng.standard_normal(300)) # a random walk
tsecon.check_stationarity(y)["recommendation"] # -> "Difference"
# Fit a VAR, read off impulse responses, decompose the variance
data = rng.standard_normal((200, 3))
irf = tsecon.var_irf(data, lags=2, horizon=16) # [h][response][shock]
fevd = tsecon.var_fevd(data, lags=2, horizon=16)
# Robust SEs, exact-MLE ARIMA with a forecast fan, GARCH with robust SEs,
# instrumented local projections, a fiscal multiplier, a Bayesian VAR...
tsecon.ols(y, X, se_type="hac")
tsecon.arima_fit(y, p=1, d=1, q=1, forecast_steps=12, conf_alpha=0.1)
tsecon.garch_fit(returns, vol="gjr", dist="t")
tsecon.lp_multiplier(y_out, spending, instrument, horizons=20)
tsecon.bvar_irf_draws(data, lags=2, horizon=12, n_draws=800)
Every function takes plain NumPy arrays and returns arrays or dicts of
documented keys. An opt-in tsecon.results layer wraps the same calls in
objects that render themselves (.summary(), .plot_irf()) without changing
the dict contract.
What's here today
123 functions across the full applied workflow: the diagnostic battery and
unit-root workflow (ADF, KPSS, check_stationarity, and the one-call
check_series battery with model recommendations); specification and
stability tests (White, Breusch-Pagan, RESET, Chow, CUSUM); robust and HAC
standard errors; the bootstrap family; an exact-diffuse Kalman filter; ARIMA,
GARCH/GJR/EGARCH, and GAS score-driven volatility; VAR/SVAR with sign-restricted
identification, FAVAR, and Diebold-Yilmaz connectedness; local projections
(lag-augmented, LP-IV, state-dependent, and the Ramey-Zubairy integral
multiplier); a Minnesota-NIW Bayesian VAR; GMM and IV-GMM; predictive
regressions with IVX inference; heterogeneous panels (mean group, CCE-MG, PMG);
cointegration and Markov switching; MIDAS and DFM nowcasting with a news
decomposition; multivariate GARCH; realized volatility; spectral analysis;
long memory; recession-probability models; survey-expectations tools; the
Nelson-Siegel/Svensson term structure with the arbitrage-free (AFNS)
adjustment; and a linear rational-expectations (DSGE-lite) solver.
The library ships with complete type stubs (py.typed), so autocomplete and
type checking work out of the box.
Learn more
The full documentation — a 15-chapter guide to time series econometrics, model cards for every estimator family, a worked figure gallery, two replications of published results, a Monte Carlo validation suite, and an honest benchmark harness — lives in the project repository.
License
MIT OR Apache-2.0.
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 Distributions
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 tsecon-0.1.0.tar.gz.
File metadata
- Download URL: tsecon-0.1.0.tar.gz
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
692e709fe313e8f14ba9f0c8a83e82ef3a8a5984f71734f9e5ca7718d97218fc
|
|
| MD5 |
97f7ceed0dbd27e8f55b9f517d99af8c
|
|
| BLAKE2b-256 |
1ca5cc9d7783b2540e41362ab5d248626e8b51b246871f136605a0743627a7d6
|
Provenance
The following attestation bundles were made for tsecon-0.1.0.tar.gz:
Publisher:
release.yml on cacoleman16/tsecon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tsecon-0.1.0.tar.gz -
Subject digest:
692e709fe313e8f14ba9f0c8a83e82ef3a8a5984f71734f9e5ca7718d97218fc - Sigstore transparency entry: 2235916300
- Sigstore integration time:
-
Permalink:
cacoleman16/tsecon@3f4460737475a59fbc84498b866237aa197589a4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/cacoleman16
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3f4460737475a59fbc84498b866237aa197589a4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tsecon-0.1.0-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: tsecon-0.1.0-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 3.8 MB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdbd04427b99892e13179b6f614f4372aa990cc205120e804342ef81074cf765
|
|
| MD5 |
87a8d927cba5abb59f5cf0adbd886abd
|
|
| BLAKE2b-256 |
f2168dacaa0dec03cf754f4689d22e00b2572e0ee3ab95d006d4c057116f4ca3
|
Provenance
The following attestation bundles were made for tsecon-0.1.0-cp39-abi3-win_amd64.whl:
Publisher:
release.yml on cacoleman16/tsecon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tsecon-0.1.0-cp39-abi3-win_amd64.whl -
Subject digest:
cdbd04427b99892e13179b6f614f4372aa990cc205120e804342ef81074cf765 - Sigstore transparency entry: 2235916760
- Sigstore integration time:
-
Permalink:
cacoleman16/tsecon@3f4460737475a59fbc84498b866237aa197589a4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/cacoleman16
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3f4460737475a59fbc84498b866237aa197589a4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tsecon-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: tsecon-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 4.4 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
daf6edf49ac6e036c41583e1592548daa348be79302304e6156fc325d32a516d
|
|
| MD5 |
3f2643621f6fa3c36ab4cb7abead93db
|
|
| BLAKE2b-256 |
f2eb93a5b54718980cd7a9a2537af50b9a3c6d2f7ed1be4816a04a421947b360
|
Provenance
The following attestation bundles were made for tsecon-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on cacoleman16/tsecon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tsecon-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
daf6edf49ac6e036c41583e1592548daa348be79302304e6156fc325d32a516d - Sigstore transparency entry: 2235916580
- Sigstore integration time:
-
Permalink:
cacoleman16/tsecon@3f4460737475a59fbc84498b866237aa197589a4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/cacoleman16
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3f4460737475a59fbc84498b866237aa197589a4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tsecon-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: tsecon-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 3.6 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37bbe3c3108a69264eafaf263288cd08e01ef8d5162349ed2d252edc56d3d462
|
|
| MD5 |
c1e3bdeb147d8ee1cdbb3e1c996d8b5e
|
|
| BLAKE2b-256 |
c13b0f0be21faa5e2eca6768ac7d9f9454bb85b1d0db0761ebc69cc0af3c4d65
|
Provenance
The following attestation bundles were made for tsecon-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on cacoleman16/tsecon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tsecon-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
37bbe3c3108a69264eafaf263288cd08e01ef8d5162349ed2d252edc56d3d462 - Sigstore transparency entry: 2235917164
- Sigstore integration time:
-
Permalink:
cacoleman16/tsecon@3f4460737475a59fbc84498b866237aa197589a4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/cacoleman16
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3f4460737475a59fbc84498b866237aa197589a4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tsecon-0.1.0-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: tsecon-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.2 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
803c879c5596598af1064324be628da523ea497f0a579718ac51c4e9ed98b341
|
|
| MD5 |
8cc83bb6e8e32b68a18625aeda13d3b1
|
|
| BLAKE2b-256 |
761e27653e73e79c3085d1fa1332b01213ff1e3ea1e02598bcf4f4081c0383d9
|
Provenance
The following attestation bundles were made for tsecon-0.1.0-cp39-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on cacoleman16/tsecon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tsecon-0.1.0-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
803c879c5596598af1064324be628da523ea497f0a579718ac51c4e9ed98b341 - Sigstore transparency entry: 2235916943
- Sigstore integration time:
-
Permalink:
cacoleman16/tsecon@3f4460737475a59fbc84498b866237aa197589a4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/cacoleman16
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3f4460737475a59fbc84498b866237aa197589a4 -
Trigger Event:
push
-
Statement type: