numeraire.core.protocols#

Core contracts (spine). Protocols, not base classes — methods conform by duck typing.

Spine protocols (DataView, Estimator, Splitter, Evaluator, result schema) are committed. The capability layer (to_weights / to_pricing / …) is v0 and is expected to crystallize from the first three real adapters, so Model only mandates capabilities() — concrete extractors are optional and dispatched by capability.

DataView

A point-in-time aligned view of the data.

Model

A fitted model.

Estimator

scikit-learn-compatible.

Splitter

Yields (train, test) views — purge/embargo/PIT aware.

Evaluator

Scores OOS output, emitting rows of the standard tidy result schema.

SupportsWeights

Capability protocol (v0): a model that emits portfolio/timing weights (to_weights).

SupportsForecast

Capability protocol (v0): a model that emits a next-horizon return forecast.

SupportsPricing

Capability protocol: a model that prices a cross-section of test assets (to_pricing).