Skip to main content

A research framework for backtesting, comparing, and replicating empirical asset-pricing methods.

Project description

numeraire

A research framework providing a stable bedrock for backtesting, comparing, and replicating empirical asset-pricing / financial-econometrics methods (IPCA, VoC, KNS, 1/A, factor-model tests, …), extensible by design so new methods plug in as first-class extensions.

Documentation: https://py-numeraire.github.io/numeraire/

The numéraire is the reference unit against which all prices are measured. Core stays representation-agnostic: it defines capabilities (what a model can produce — weights, pricing, …), never a specific method's internal form, so linear-factor, nonlinear/RFF, neural, and distributional methods are all first-class.

Architecture (the boundary rule)

numeraire.core is exactly the modules that depend on no specific method and that every method depends on. Dependency arrows point toward core; core never imports a method, an adapter, or a reference library. This is enforced in CI by import-linter — the lint rule is the architecture (see pyproject.toml [tool.importlinter]).

src/numeraire/
  core/        # spine: DataView/Estimator/Splitter/Evaluator protocols, capabilities,
               # result schema, evaluator registry  (stable, strict-typed, high-coverage)
  adapters/    # thin wrappers making reference libraries conform to core — glue, not spine
  methods/     # published methods bundled as extensions (VoC, 1/A, classical tests, …)

Methods register via the numeraire.methods entry-point group, so external packages (numeraire-yourlab, numeraire-<method>) are first-class peers without editing core.

Install

uv sync --extra dev            # dev environment

Base install is the spine + native general evaluators only; method/adapter deps are extras.

Develop

uv run ruff check . && uv run ruff format --check .   # lint + format
uv run basedpyright src/numeraire/core                # strict types on core
uv run lint-imports                                   # architecture boundary
uv run pytest                                         # tests (public/synthetic data only)

Status

Pre-1.0, development. Usable via GitHub install; not on PyPI yet (the capability layer is expected to crystallize once three real adapters land). The spine (DataView, walk-forward OOS engine, Splitter, native evaluators) is in place; the first method (1/A conservative slope) is wired end-to-end.

License: BSD-3-Clause. Never commit CRSP/WRDS/proprietary data or credentials (data/, ref/, .env are git-ignored).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

numeraire-0.2.0.tar.gz (237.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

numeraire-0.2.0-py3-none-any.whl (70.3 kB view details)

Uploaded Python 3

File details

Details for the file numeraire-0.2.0.tar.gz.

File metadata

  • Download URL: numeraire-0.2.0.tar.gz
  • Upload date:
  • Size: 237.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for numeraire-0.2.0.tar.gz
Algorithm Hash digest
SHA256 585e3b0d9d679ffb64317a75946b1dda74ae8c212ca12d878fdd01e295338331
MD5 7c6fd374cb1d57e50fdd55667f7b4b36
BLAKE2b-256 5f14c3a102614b873843c9611c2c44bbd4bc8fd4d191c7c20247459b7af63028

See more details on using hashes here.

Provenance

The following attestation bundles were made for numeraire-0.2.0.tar.gz:

Publisher: publish.yml on py-numeraire/numeraire

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file numeraire-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: numeraire-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 70.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for numeraire-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 92f6c2761b015f454ca47c34fbba61f01819bd2af4f3447c2ab15787f0792690
MD5 149a528bcea57ff925d28225507b7b2d
BLAKE2b-256 8e9fdf4819540a37cbdcdb5fefc0c83703602f4500344b481bd6880097353d88

See more details on using hashes here.

Provenance

The following attestation bundles were made for numeraire-0.2.0-py3-none-any.whl:

Publisher: publish.yml on py-numeraire/numeraire

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page