Skip to main content

alphatonic

CI License: MIT

alphatonic measures how well trading signals predict future returns. Give it signal scores and prices in pandas DataFrames to produce information coefficients, uncertainty estimates and offline HTML reports.

With alphatonic you can:

  • Measure cross-sectional and time-series information coefficients, including single-asset signals.
  • Estimate uncertainty with Newey–West and equal-weighted cosine standard errors and a block bootstrap.
  • Assess how costly a signal would be to trade, using rank-persistence and bucket-turnover statistics.
  • Render an offline HTML tearsheet, and browse your trials with alphatonic serve.

Start with the tutorial, or browse the docs.

Try it

Python 3.11 or newer. Install from PyPI:

python -m pip install alphatonic
from alphatonic import evaluate
from alphatonic.demo import synthetic_market

factor, prices = synthetic_market(n_assets=30, n_bars=500, ic=0.04, seed=7)  # or your own tables
result = evaluate(factor, prices, horizons=[1, 5])

result.summary.query("method == 'spearman'")[["horizon", "mean", "ci95_lower", "ci95_upper"]]
result.tearsheet("tearsheet.html")

Open tearsheet.html in your browser.

Changelog

See the changelog for what changed in each release.

Development

uv sync --all-extras --locked
uv run pytest
uv run ruff check . && uv run ruff format --check .
uv run pyright

See Contributing for setup, tests and the release process.

License

MIT License. Copyright 2026 Manuel Blum.

Metadata

Release files for alphatonic 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for alphatonic 0.3.1
File Size Uploaded Provenance Actions
alphatonic-0.3.1.tar.gz 351.5 kB Without provenance Details for alphatonic-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for alphatonic 0.3.1
File Interpreter ABI Platform Actions
alphatonic-0.3.1-py3-none-any.whl Python 3 none any Details for alphatonic-0.3.1-py3-none-any.whl

Total release size: 625.8 kB

Release files / alphatonic-0.3.1.tar.gz

Download URL alphatonic-0.3.1.tar.gz
Size 351.5 kB
Tags Source
SHA-256 checksum
How to use checksums
26feec5554e91f53749494d4e00ad53ccc167d12eb862d052b2fa9059929eefe
BLAKE2b-256 checksum
How to use checksums
94453b3f4ff24a7f574d5431e4699c7fbc4c8b0ae71b4ca1b57027ecff639c82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / alphatonic-0.3.1-py3-none-any.whl

Download URL alphatonic-0.3.1-py3-none-any.whl
Size 274.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
59a5be20b63847538062d73e0daab6734523f1e0e6064f5d00397f34bb683556
BLAKE2b-256 checksum
How to use checksums
ba09dc44ddd6ac69ddcb5b46e65fb5ba5fc44d31d0df5c54cbf200e3a386725b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for alphatonic 0.3.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page