bayesline.api.equity.RiskDatasetSettingsMenu#

pydantic model bayesline.api.equity.RiskDatasetSettingsMenu#

Joint menu for both DerivedRiskDatasetSettings and RootRiskDatasetSettings.

The two settings types share one menu so they can flow through a single typed registry, validator, and REST endpoint via Pydantic’s discriminated union dispatch on kind. Fields on this menu are partitioned by ``kind`` — only the subset relevant to a given variant is populated:

  • kind="derived"available_reference_datasets is populated; every available_*_sources field is None.

  • kind="root" → every available_*_sources field is populated; available_reference_datasets is None.

The validator populates the union of both per-variant subsets, and Pydantic field validators on each settings class read only the fields they need. Consumers (especially the GUI renderer) MUST branch on the target settings’ ``kind`` before reading fields off this menu — a None here can mean either “this variant doesn’t use this field” or “the validator didn’t populate it” and the two are not distinguishable from the menu alone.

A field set to None is the not-populated sentinel — validators skip the membership check. An empty list is a meaningful constraint: no entries are allowed.

Show JSON schema
{
   "title": "RiskDatasetSettingsMenu",
   "description": "Joint menu for both ``DerivedRiskDatasetSettings`` and ``RootRiskDatasetSettings``.\n\nThe two settings types share one menu so they can flow through a single\ntyped registry, validator, and REST endpoint via Pydantic's discriminated\nunion dispatch on ``kind``. Fields on this menu are **partitioned by\n``kind``** \u2014 only the subset relevant to a given variant is populated:\n\n- ``kind=\"derived\"`` \u2192 ``available_reference_datasets`` is populated;\n  every ``available_*_sources`` field is ``None``.\n- ``kind=\"root\"`` \u2192 every ``available_*_sources`` field is populated;\n  ``available_reference_datasets`` is ``None``.\n\nThe validator populates the union of both per-variant subsets, and\nPydantic field validators on each settings class read only the fields\nthey need. **Consumers (especially the GUI renderer) MUST branch on the\ntarget settings' ``kind`` before reading fields off this menu** \u2014 a\n``None`` here can mean either \"this variant doesn't use this field\" or\n\"the validator didn't populate it\" and the two are not distinguishable\nfrom the menu alone.\n\nA field set to ``None`` is the not-populated sentinel \u2014 validators skip\nthe membership check. An empty list is a meaningful constraint: no entries\nare allowed.",
   "type": "object",
   "properties": {
      "available_reference_datasets": {
         "anyOf": [
            {
               "items": {
                  "anyOf": [
                     {
                        "type": "string"
                     },
                     {
                        "type": "integer"
                     }
                  ]
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "[derived] The datasets that can be referenced as ``reference_dataset``. Populated only when the target settings has ``kind='derived'``; ``None`` for root settings.",
         "title": "Available Reference Datasets"
      },
      "available_market_cap_sources": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Available Market Cap Sources"
      },
      "available_price_sources": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Available Price Sources"
      },
      "available_exposures_sources": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Available Exposures Sources"
      },
      "available_exchange_dates_sources": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Available Exchange Dates Sources"
      },
      "available_exchange_rates_sources": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Available Exchange Rates Sources"
      },
      "available_series_sources": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Available Series Sources"
      },
      "available_idmap_sources": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Available Idmap Sources"
      },
      "available_hierarchy_sources": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Available Hierarchy Sources"
      }
   },
   "additionalProperties": false
}

Config:
  • frozen: bool = True

  • extra: str = forbid

Fields:
  • available_exchange_dates_sources (list[str] | None)

  • available_exchange_rates_sources (list[str] | None)

  • available_exposures_sources (list[str] | None)

  • available_hierarchy_sources (list[str] | None)

  • available_idmap_sources (list[str] | None)

  • available_market_cap_sources (list[str] | None)

  • available_price_sources (list[str] | None)

  • available_reference_datasets (list[str | int] | None)

  • available_series_sources (list[str] | None)

field available_reference_datasets: list[str | int] | None = None#

[derived] The datasets that can be referenced as reference_dataset. Populated only when the target settings has kind='derived'; None for root settings.

field available_market_cap_sources: list[str] | None = None#
field available_price_sources: list[str] | None = None#
field available_exposures_sources: list[str] | None = None#
field available_exchange_dates_sources: list[str] | None = None#
field available_exchange_rates_sources: list[str] | None = None#
field available_series_sources: list[str] | None = None#
field available_idmap_sources: list[str] | None = None#
field available_hierarchy_sources: list[str] | None = None#
describe() str#

Describe the risk dataset settings.

Returns#

str

A human readable description of the menu.