numeraire.comparison.ComparisonEntry#

class numeraire.comparison.ComparisonEntry(name: str, estimator: Estimator, train_view: DataView, test_view: DataView | None = None, config: dict[str, Any] | None = None)[source]#

Bases: object

One competitor in a comparison: a named estimator, its training view, its test-asset view.

Parameters:
  • name (str) – The label carried into every result row’s method (and run_id).

  • estimator (numeraire.core.protocols.Estimator) – Anything with fit(view) -> Model whose fitted model prices a cross-section (SupportsPricing).

  • train_view (numeraire.core.protocols.DataView) – The view the estimator is fit on (its native representation — a characteristic panel, a returns block, …).

  • test_view (numeraire.core.protocols.DataView | None) – The estimator’s own representation of the common test assets, used to price them. Must carry the same calendar and asset labels as the shared test_assets (a different view type is fine — that is the whole point). Defaults to train_view for a method that trains directly on the test assets (e.g. an SDF on the test-asset returns block).

  • config (dict[str, Any] | None) – Optional method config, hashed into the entry’s config_hash provenance.

__init__(name: str, estimator: Estimator, train_view: DataView, test_view: DataView | None = None, config: dict[str, Any] | None = None) None#

Methods

__init__(name, estimator, train_view[, ...])

Attributes

config

test_view

name

estimator

train_view