Open data builders for numeraire: fetch + clean public and WRDS-sourced data into tidy, point-in-time tables.
Project description
numeraire-dataset
Open, reproducible data loaders + builders for
numeraire. This package ships code, not data: it
fetches public (and, with your own WRDS credentials, licensed) sources and cleans them into tidy,
point-in-time tables that numeraire consumes.
Install
pip install numeraire-dataset # frame loaders + builders (tidyfinance backend)
pip install "numeraire-dataset[numeraire]" # + the point-in-time view helpers (numeraire bridge)
pip install "numeraire-dataset[wrds]" # + live CRSP/Compustat pulls (your own WRDS account)
Two layers
sources— tidyfinance (MIT) is the primary backend for standard sources (Fama-French, Goyal-Welch, FRED, JKP, q-factors, OSAP). Thin loaders return tidy frames (+ an optional point-in-time view helper) withdata_vintageprovenance — no loader hand-rolling.builders— self-built ETL for what tidyfinance does not cover: vintage-aware FRED-MD (reference period × vintage × series, tcodes applied at build time) and, with your own credentials, WRDS panels. (The FRED-MD vintage/tcode design is a candidate to upstream into tidyfinance — once merged, itssourcespath could replace the local builder.)
Why a separate project
numeraire (the framework) bundles only tiny public example slices. Anything that needs to be
downloaded, merged across releases, or built from a subscription source lives here, as
transparent open-source ETL — so the cleaning is auditable and re-runnable, and no licensed data is
ever redistributed inside a wheel. Build outputs land in a local cache (git-ignored), never the repo.
Design: build once, read clean
raw vendor files ──build (this package)──▶ tidy point-in-time table ──read──▶ numeraire
(download) clean / tcode [reference period × vintage × series]
- The vintage axis is a column. Each value carries the reference period it describes and the
vintage (data release) it came from, so revisions are first-class and
asofis leak-safe. - Stationarity transforms (FRED-MD tcodes) are applied at build time, per vintage — never inside
numeraire's main pipeline.
transform=Falsekeeps raw levels. - Availability lag (
L) is NOT baked in. It stays a read-time parameter in numeraire, so you can sweep it for robustness. The table stores only(reference period, vintage, series…).
Builders
| Builder | Source | License of output | Status |
|---|---|---|---|
fredmd |
FRED-MD monthly vintages (St. Louis Fed, McCracken-Ng) | public (cite McCracken-Ng 2016) | in progress |
famafrench |
Ken French Data Library | public (cite, carry copyright notice) | planned |
zones.wrds |
CRSP / Compustat panels (your WRDS account) | not redistributable — local only | implemented |
Usage
# Standard sources via tidyfinance (frames; + a view helper with the `numeraire` extra):
from numeraire_dataset import load_ff_factors, load_gw_view
ff = load_ff_factors() # date, mkt_excess, smb, hml, risk_free (decimals)
view, vintage = load_gw_view(start_date="1926-07-01", end_date="2020-12-31")
# → feed `view` straight into numeraire's backtest_forecast; `vintage` is the provenance stamp.
# Vintage-aware FRED-MD (what tidyfinance lacks) via the local builder:
from numeraire_dataset.builders import fredmd
paths = fredmd.download(vintages=["2025-01", "2025-02", "2025-03"], dest="~/.numeraire_data")
table = fredmd.build_table(paths, transform=True) # tidy [reference, vintage, series…]
Frame loaders vs. *_view helpers
The split is intentional, not an oversight. Frame loaders (load_ff_factors,
load_goyal_welch) return plain tidy pandas frames and carry no numeraire dependency, so
they are usable on their own. The *_view helpers (load_gw_view, zones.view) add the
optional bridge into a numeraire view plus a data_vintage stamp, and only import numeraire
lazily (install the [numeraire] extra). A frame loader is therefore a strict subset of the
work a view helper does — the names differ because their return contracts and dependency footprints
differ, and both are kept rather than collapsed into one signature.
License: BSD-3-Clause (code). Source datasets keep their own terms — see each builder's docstring.
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 Distribution
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 numeraire_dataset-0.1.0.tar.gz.
File metadata
- Download URL: numeraire_dataset-0.1.0.tar.gz
- Upload date:
- Size: 210.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
764dadd197ce11d0433f64f4936f48b598ab241a838a2a9e1bfc48c6783e9d48
|
|
| MD5 |
b83c7c27088a6d3d2f01fe6d04dfffe1
|
|
| BLAKE2b-256 |
686c25733d077f29ba25cdbe02d596a00e719f24f91186ef2a33131de751ab3d
|
Provenance
The following attestation bundles were made for numeraire_dataset-0.1.0.tar.gz:
Publisher:
publish.yml on py-numeraire/numeraire-dataset
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
numeraire_dataset-0.1.0.tar.gz -
Subject digest:
764dadd197ce11d0433f64f4936f48b598ab241a838a2a9e1bfc48c6783e9d48 - Sigstore transparency entry: 2084014949
- Sigstore integration time:
-
Permalink:
py-numeraire/numeraire-dataset@89d4282885105d02732da2d1bf8f5c34579fde13 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/py-numeraire
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@89d4282885105d02732da2d1bf8f5c34579fde13 -
Trigger Event:
release
-
Statement type:
File details
Details for the file numeraire_dataset-0.1.0-py3-none-any.whl.
File metadata
- Download URL: numeraire_dataset-0.1.0-py3-none-any.whl
- Upload date:
- Size: 39.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d6315912d39cceceac4f04e38e7bd359fd5cfdf24ed09cfc3f8bb8607ee145d
|
|
| MD5 |
927c31e13979117ac44473cabb826de9
|
|
| BLAKE2b-256 |
80e34a6f4d630ca6405b2ecf35c889de8ccc469fd5f80e247f00a4109138a5da
|
Provenance
The following attestation bundles were made for numeraire_dataset-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on py-numeraire/numeraire-dataset
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
numeraire_dataset-0.1.0-py3-none-any.whl -
Subject digest:
2d6315912d39cceceac4f04e38e7bd359fd5cfdf24ed09cfc3f8bb8607ee145d - Sigstore transparency entry: 2084014983
- Sigstore integration time:
-
Permalink:
py-numeraire/numeraire-dataset@89d4282885105d02732da2d1bf8f5c34579fde13 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/py-numeraire
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@89d4282885105d02732da2d1bf8f5c34579fde13 -
Trigger Event:
release
-
Statement type: