bayesline.api.equity.RootRiskDatasetSettings#
- model RootRiskDatasetSettings#
Settings for creating a root risk dataset directly from uploads.
A root dataset has no reference dataset. It is assembled by reading from seven upload sources (market_cap, price, exposures, exchange_dates, exchange_rates, series, idmap) and producing a
ConsolidatedDataParamsthat can subsequently be referenced by the standardDerivedRiskDatasetSettingsflow.All upload rows are expected to be in master-id space (
asset_id_typecolumn equal tomaster_id_type). Foreign-id rows in the same uploads are tolerated but ignored during root-dataset construction.Shares the joint
RiskDatasetSettingsMenuwithDerivedRiskDatasetSettings; the validator populates theavailable_*_sourcesfields relevant to this variant. Thekinddiscriminator routes Pydantic-union dispatch.Fields# Field
Type
Required
Default
Yes
No
factory
Yes
Yes
Yes
Yes
Literal[‘root’]No
'root'Yes
No
'bayesid_core'No
'bayesid'Yes
No
NoneNo
factory
- field as_of_date: str | date | datetime [Required]#
Snapshot date for the IdMapper. Only id-mapping rows whose
start_date <= as_of_dateare retained when constructing the dataset’sIdMapper. Pick the date as of which the uploaded idmap should be considered authoritative — typically the most recent date for which the upload contains complete mappings. Accepts adate,datetime, or ISO-format string; the consumer normalizes viato_date(...).
- field dense_factor_groups: dict[str, str | None] [Optional]#
Mapping of dense factor-group name to hierarchy upload source. Use
Noneas the value to use a default flat hierarchy.
- field exchange_dates_source: str [Required]#
Upload source name providing trading-day membership per exchange: (date, exchange).
- field exchange_rates_source: str [Required]#
Upload source name providing single-base USD FX rates: (date, ccy, fx_rate).
- field exposures_source: str [Required]#
Upload source name providing factor exposures: (date, asset_id, asset_id_type, factor_group, factor, exposure).
- field idmap_source: str [Required]#
Upload source name providing the id-map table: (start_date, end_date, from_id_type, from_id, to_id_type, to_id). The (master_id_type -> master_id_core_type) projection is extracted during dataset construction.
- field kind: Literal['root'] [Optional]#
Discriminator field for the risk dataset settings union.
rootselects this variant for datasets built directly from upload sources (no reference dataset).
- field market_cap_source: str [Required]#
Upload source name providing per-asset-day market-cap data: (date, asset_id, asset_id_type, ccy, market_cap, volume, idio_vol).
- field master_id_core_type: str [Optional]#
The canonical core-asset-id type. Used to extract the asset-to-core mapping from the idmap upload.
- field master_id_type: str [Optional]#
The canonical asset-id type. Upload rows whose
asset_id_typedoes not equal this value are ignored.
- field price_source: str [Required]#
Upload source name providing prices: (date, asset_id, asset_id_type, ccy, close, return, delisted).