Metadata-Version: 2.4
Name: numeraire
Version: 0.2.1
Summary: A research framework for backtesting, comparing, and replicating empirical asset-pricing methods.
Project-URL: Homepage, https://github.com/py-numeraire/numeraire
Project-URL: Documentation, https://py-numeraire.github.io/numeraire/
Project-URL: Repository, https://github.com/py-numeraire/numeraire
Project-URL: Issues, https://github.com/py-numeraire/numeraire/issues
Project-URL: Changelog, https://github.com/py-numeraire/numeraire/blob/main/CHANGELOG.md
Project-URL: Releases, https://github.com/py-numeraire/numeraire/releases
Author-email: Yuheng Wu <wuyuheng20074@live.com>
License-Expression: BSD-3-Clause
License-File: LICENSE
Keywords: asset pricing,backtesting,empirical finance,factor models,portfolio,replication
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Topic :: Scientific/Engineering
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: numpy>=1.26
Requires-Dist: pandas>=2.2
Requires-Dist: scikit-learn>=1.4
Requires-Dist: scipy>=1.11
Provides-Extra: all
Requires-Dist: numeraire-dataset>=0.1; extra == 'all'
Requires-Dist: numeraire-graphics>=0.1; extra == 'all'
Provides-Extra: data
Requires-Dist: numeraire-dataset>=0.1; extra == 'data'
Provides-Extra: dev
Requires-Dist: basedpyright>=1.18; extra == 'dev'
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: hypothesis>=6.0; extra == 'dev'
Requires-Dist: import-linter>=2.0; extra == 'dev'
Requires-Dist: pandas-stubs>=2.0; extra == 'dev'
Requires-Dist: pre-commit>=3.7; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Requires-Dist: twine>=5.0; extra == 'dev'
Provides-Extra: docs
Requires-Dist: myst-parser>=3.0; extra == 'docs'
Requires-Dist: pydata-sphinx-theme>=0.15; extra == 'docs'
Requires-Dist: sphinx>=7.3; extra == 'docs'
Provides-Extra: graphics
Requires-Dist: numeraire-graphics>=0.1; extra == 'graphics'
Provides-Extra: skfolio
Requires-Dist: skfolio>=0.5; extra == 'skfolio'
Description-Content-Type: text/markdown

# 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

```bash
uv sync --extra dev            # dev environment
```

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

## Develop

```bash
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).
