bayesline.api.equity.PortfolioSettingsMenu#
- pydantic model bayesline.api.equity.PortfolioSettingsMenu#
Specifies the set of available options that can be used to create portfolio settings.
Show JSON schema
{ "title": "PortfolioSettingsMenu", "description": "Specifies the set of available options that\ncan be used to create portfolio settings.", "type": "object", "properties": { "sources": { "description": "The available sources (i.e. user uploaded portfolios or system uploaded portfolios).", "items": { "type": "string" }, "title": "Sources", "type": "array" }, "schemas": { "description": "The available schemas (i.e. names from the portfolio organizer).", "items": { "type": "string" }, "title": "Schemas", "type": "array" } }, "additionalProperties": false }
- Config:
frozen: bool = True
extra: str = forbid
- Fields:
schemas (list[str])
sources (list[str])
-
field sources:
list
[str
] [Optional]# The available sources (i.e. user uploaded portfolios or system uploaded portfolios).
-
field schemas:
list
[str
] [Optional]# The available schemas (i.e. names from the portfolio organizer).
- describe(settings: PortfolioSettings | 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: PortfolioSettings) → 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.