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.1.tar.gz (357.5 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.1-py3-none-any.whl (79.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: numeraire-0.2.1.tar.gz
  • Upload date:
  • Size: 357.5 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.1.tar.gz
Algorithm Hash digest
SHA256 d0cd8c74374062bed34e9c2a0eee68e95a1302559399d66cd13ce52dd691021d
MD5 7e8cdab60c362d5c232b182782750dea
BLAKE2b-256 7fc6fe71e6d623563dc765e1697677c1839c359ce71e215defb327a3c1b9a2c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for numeraire-0.2.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: numeraire-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 79.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9013f946287d97583fb71383e86a87bb3cb56f899fda0749e468dcddd8e7816a
MD5 384c52a0a6124c2286341c7a922adc6a
BLAKE2b-256 f43acc4101572d8a0d51ce95c21637d48f04d1baa781e5945d0c7bdee819f22b

See more details on using hashes here.

Provenance

The following attestation bundles were made for numeraire-0.2.1-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