numeraire.core.protocols.Model#
- class numeraire.core.protocols.Model(*args, **kwargs)[source]#
Bases:
ProtocolA fitted model. Exposes whatever capabilities it has — capabilities, not mandatory methods.
Optional, dispatched by capability (do NOT make these mandatory):
to_weights(view) -> pd.DataFrame | pd.Series,expected_returns(view) -> pd.DataFrame,to_density(view),to_surface(view), …Capability → method-name mapping (the three crystallized surfaces follow different naming patterns, so an extension author must map deliberately, not by rote):
capabilities.TO_WEIGHTS→to_weights()capabilities.TO_FORECAST→forecast()(notto_forecast)capabilities.TO_PRICING→expected_returns()(notto_pricing)
A model declaring a capability must expose its mapped method; the conformance suite (
numeraire.testing.check_capabilities) enforces this.- __init__(*args, **kwargs)#
Methods
__init__(*args, **kwargs)The set of capability names this model supports (see
numeraire.core.capabilities).