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>)[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.

__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>) None#

Methods

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

strategy_returns()

Cross-sectional portfolio return per date: sum_a weights[t, a] * realized[t, a].

Attributes

capability

universe

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

weights

realized

method

config_hash

data_vintage

run_id

meta

property universe: str#

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

strategy_returns() Series[source]#

Cross-sectional portfolio return per date: sum_a weights[t, a] * realized[t, a].