bayesline.api.equity.HoldingsOverrideWindow#

pydantic model bayesline.api.equity.HoldingsOverrideWindow#

A time-windowed set of holdings overrides for a single portfolio.

Show JSON schema
{
   "title": "HoldingsOverrideWindow",
   "description": "A time-windowed set of holdings overrides for a single portfolio.",
   "type": "object",
   "properties": {
      "snapshot_date": {
         "anyOf": [
            {
               "format": "date",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "If set, replace the portfolio's holdings within this window with the full holdings as of this date. Overrides are then applied on top. If None, only the explicit overrides are applied.",
         "title": "Snapshot Date"
      },
      "start_date": {
         "description": "Override effective start date.",
         "format": "date",
         "title": "Start Date",
         "type": "string"
      },
      "end_date": {
         "description": "Override effective end date.",
         "format": "date",
         "title": "End Date",
         "type": "string"
      },
      "overrides": {
         "additionalProperties": {
            "type": "number"
         },
         "description": "Mapping of target_id (a leaf asset_id or a child portfolio_id) to an override value, applied after snapshot replacement. Each value is interpreted per ``override_unit``.",
         "title": "Overrides",
         "type": "object"
      },
      "override_unit": {
         "$ref": "#/$defs/OverrideUnit",
         "default": "nav",
         "description": "How to interpret the ``overrides`` values. NAV (default): an absolute target NAV in the report currency. WEIGHT: a target fraction of the parent portfolio's own total NAV, supported only for child-portfolio targets and for leaf targets on fund-of-fund / source portfolios (a weight on a post-lookthrough / non-cascade leaf target is rejected)."
      }
   },
   "$defs": {
      "OverrideUnit": {
         "description": "Interpretation of the float values in ``HoldingsOverrideWindow.overrides``.",
         "enum": [
            "nav",
            "weight"
         ],
         "title": "OverrideUnit",
         "type": "string"
      }
   },
   "required": [
      "start_date",
      "end_date"
   ]
}

Config:
  • frozen: bool = True

Fields:
  • end_date (datetime.date)

  • override_unit (bayesline.api._src.equity.report.scenarios.OverrideUnit)

  • overrides (dict[str, float])

  • snapshot_date (datetime.date | None)

  • start_date (datetime.date)

field snapshot_date: date | None = None#

If set, replace the portfolio’s holdings within this window with the full holdings as of this date. Overrides are then applied on top. If None, only the explicit overrides are applied.

field start_date: date [Required]#

Override effective start date.

field end_date: date [Required]#

Override effective end date.

field overrides: dict[str, float] [Optional]#

Mapping of target_id (a leaf asset_id or a child portfolio_id) to an override value, applied after snapshot replacement. Each value is interpreted per override_unit.

field override_unit: OverrideUnit = OverrideUnit.NAV#

How to interpret the overrides values. NAV (default): an absolute target NAV in the report currency. WEIGHT: a target fraction of the parent portfolio’s own total NAV, supported only for child-portfolio targets and for leaf targets on fund-of-fund / source portfolios (a weight on a post-lookthrough / non-cascade leaf target is rejected).