bayesline.api.equity.PortfolioHierarchySettingsMenu#
- pydantic model bayesline.api.equity.PortfolioHierarchySettingsMenu#
Specifies the set of available portfolios that can be used to create hierarchies.
Show JSON schema
{ "title": "PortfolioHierarchySettingsMenu", "description": "Specifies the set of available portfolios that can be used to create hierarchies.", "type": "object", "properties": { "sources": { "additionalProperties": { "items": { "type": "string" }, "type": "array" }, "description": "Mapping of sources to the available portfolio IDs for that source.", "title": "Sources", "type": "object" }, "schemas": { "additionalProperties": { "items": { "type": "string" }, "type": "array" }, "description": "Set of available portfolio organizer schemas and their associated portfolio IDs.", "title": "Schemas", "type": "object" } }, "additionalProperties": false }
- Config:
frozen: bool = True
extra: str = forbid
- Fields:
schemas (dict[str, list[str]])sources (dict[str, list[str]])
- field sources: dict[str, list[str]] [Optional]#
Mapping of sources to the available portfolio IDs for that source.
- field schemas: dict[str, list[str]] [Optional]#
Set of available portfolio organizer schemas and their associated portfolio IDs.
- map_references(fn: Callable[[str | int], str | int]) → Self#
Return a copy with every reference-list entry rewritten by
fn.The menu-side counterpart of
Settings.map_references(). A menu enumerates the settings/datasets/sources a user may reference; this appliesfnto those enumerated references (leaving plain system-data fields untouched) so a caller can translate a menu between reference namespaces. The base implementation has no reference fields and returnsselfunchanged; menus that carry reference lists override it.Parameters#
- fnCallable[[str | int], str | int]
Applied to each enumerated reference. Must preserve a reference’s kind (a name stays a name, an id stays an id).
Returns#
- Self
A copy with reference-list entries rewritten.