numeraire.WeightsOutput#
- class numeraire.WeightsOutput(weights: DataFrame, realized: DataFrame, method: str, config_hash: str, data_vintage: str, run_id: str, capability: str = 'to_weights', meta: dict[str, ~typing.Any]=<factory>)[source]#
Bases:
objectOOS output for a
to_weightsmethod: realized weights aligned with realized returns.weightsandrealizedare both(date x asset)indexed by the prediction dates, whererealized.loc[t]is the return over(t, t+h](sostrategy_returnsis the realized, no-look-ahead P&L of holdingweights.loc[t]over that period).- __init__(weights: DataFrame, realized: DataFrame, 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, ...)Realized portfolio return per date:
sum_a weights[a] * realized[a].Attributes
capabilityCompact universe label (
n=<#assets>for panels, the name for a single asset).weightsrealizedmethodconfig_hashdata_vintagerun_idmeta