bayesline.api.equity.RiskDatasetSettingsMenu

bayesline.api.equity.RiskDatasetSettingsMenu#

model 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.

field available_exchange_dates_sources: list[str] | None [Optional]#
field available_exchange_rates_sources: list[str] | None [Optional]#
field available_exposures_sources: list[str] | None [Optional]#
field available_hierarchy_sources: list[str] | None [Optional]#
field available_idmap_sources: list[str] | None [Optional]#
field available_market_cap_sources: list[str] | None [Optional]#
field available_price_sources: list[str] | None [Optional]#
field available_reference_datasets: list[str | int] | None [Optional]#

[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_series_sources: list[str] | None [Optional]#