numeraire.core.engine.PanelWeightsOutput#

class numeraire.core.engine.PanelWeightsOutput(weights: Series, realized: Series, method: str, config_hash: str, data_vintage: str, run_id: str, capability: str = 'to_weights', meta: dict[str, ~typing.Any]=<factory>, missing_returns: Literal['error', 'zero', 'renormalize_legs']='error', horizon: int = 1)[source]#

Bases: object

OOS output for a cross-sectional to_weights method over a ragged panel.

weights and realized are long pd.Series on a (date, asset) MultiIndex; the wide, fixed-universe WeightsOutput can’t represent an entering/exiting universe, so the panel path carries the long form. realized is each name’s (t, t+h] return, aligned by key. weights always remains the model’s target decision; scoring_weights() separately exposes any ex-post adjustment selected through missing_returns.

__init__(weights: Series, realized: Series, method: str, config_hash: str, data_vintage: str, run_id: str, capability: str = 'to_weights', meta: dict[str, ~typing.Any]=<factory>, missing_returns: Literal['error', 'zero', 'renormalize_legs']='error', horizon: int = 1) None#

Methods

__init__(weights, realized, method, ...)

scoring_weights()

Effective ex-post weights used only to score returns under missing_returns.

strategy_returns()

Cross-sectional portfolio return per date under the missing-return policy.

Attributes

capability

horizon

Effective forecast horizon h of the paired targets (steps of the decision calendar).

missing_returns

universe

Compact universe label (n=<#assets> over the OOS panel; the name if single).

weights

realized

method

config_hash

data_vintage

run_id

meta

horizon: int = 1#

Effective forecast horizon h of the paired targets (steps of the decision calendar).

Populated by backtest_panel() from the producing view; realized is each name’s (t, t+h] return, so an annualizing evaluator can distinguish overlapping multi-period targets.

property universe: str#

Compact universe label (n=<#assets> over the OOS panel; the name if single).

scoring_weights() Series[source]#

Effective ex-post weights used only to score returns under missing_returns.

strategy_returns() Series[source]#

Cross-sectional portfolio return per date under the missing-return policy.