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.
- describe(settings: PortfolioHierarchySettings | None = None) → str#
Parameters#
- settingsSettingsType | None
The settings to describe. If None, then the description is not evaluated against any settings.
Returns#
A human readable description of the settings menu, optionally evaluated against the given settings.
- validate_settings(settings: PortfolioHierarchySettings) → None#
Validates if the given settings are valid for this settings menu.
Parameters#
- settingsSettingsType
The settings to validate.
Raises#
ValidationError if a pydantic error occurs or ValueError if passed settings values are invalid.