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 can 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).

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 applies fn to 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 returns self unchanged; 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.

describe() str#

Describe the available options.

Returns#

str

A description of the available options.