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:
objectOne 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(andrun_id).estimator (numeraire.core.protocols.Estimator) – Anything with
fit(view) -> Modelwhose 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 totrain_viewfor 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_hashprovenance.
- __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
configtest_viewnameestimatortrain_view