bayesline.api.equity.RiskDatasetUploadedExposureSettings

bayesline.api.equity.RiskDatasetUploadedExposureSettings#

model RiskDatasetUploadedExposureSettings#

Settings for uploaded exposure data in a risk dataset.

This class defines settings for using exposure data from uploaded sources, with options for gaussianization, missing value filling, and factor group management.

field categorical_factor_groups: list[str] [Optional]#

The categorical factor groups from the uploaded dataset to carry over.

field categorical_overrides: dict[str, dict[str, str]] [Optional]#

Per categorical factor group, a mapping of uploaded factor codes to canonical codes, applied when reading the uploaded exposures. The original codes are replaced (erased) before the exposures are matched against the factor-group hierarchy, so every target code must exist as a leaf in that group’s hierarchy. Keys must appear in categorical_factor_groups.

field continuous_factor_groups: list[str] [Optional]#

The continuous factor groups from the uploaded dataset to carry over.

field exposure_source: str [Required]#

The uploaded source of the exposures.

field exposure_type: Literal['uploaded'] [Optional]#
field factor_groups_fill_miss: list[str] [Optional]#

For which continuous groups to fill missing values. Each entry must also appear in continuous_factor_groups.

field factor_groups_forward_fill: list[str] [Optional]#

For which factor groups to forward-fill exposures along time, gated by the priced-day mask (no fill on days the asset is not in the modeling universe). Applied before gaussianizing and fill_miss. Supports both continuous (dense) and categorical (sparse) groups; for categorical groups the fill preserves one-hot semantics within each (asset, group) when the upload itself is one-hot. Each entry must also appear in continuous_factor_groups or categorical_factor_groups.

field factor_groups_gaussianize: list[str] [Optional]#

For which continuous groups to gaussianize the exposures. Each entry must also appear in continuous_factor_groups.

field factor_groups_gaussianize_maintain_zeros: list[str] [Optional]#

For which continuous groups to gaussianize the exposures and maintain zeros. maintain_zeros only takes effect during gaussianization, so each entry must also appear in factor_groups_gaussianize (and therefore in continuous_factor_groups).

field hierarchy_sources: dict[str, str] [Optional]#

Mapping from factor group name to uploaded hierarchy dataset name. Factor groups not in this mapping use a flat hierarchy from factor names.