bayesline.api.equity.CategoricalExposureGroupSettings#
- model CategoricalExposureGroupSettings#
The settings for a categorical exposure group.
Categorical exposures are exposures to a categorical variable, e.g. industry, country, etc. For example, an asset exposure may be to a single industry factor, and we say the exposure is to the industry category factor “Materials”. The exposure itself may be continuous (e.g. not 0.0 or 1.0), and an asset may be exposed to multiple industry factors (but typically not all of them). The distinction with continuous exposures is primarily in the settings that are available.
Fields# Field
Type
Required
Default
No
factory
Literal[‘categorical’]No
'categorical'No
''Yes
No
'All'Validators# Validator
Mode
Fields
after
before
model
after
model
- field exclude: list[str] [Optional]#
Valid industry codes or labels for given hierarchy at any level. If labels are used which may be duplicated, then the code with the lowest level is used.
- Validated by:
- field factor_group: str [Optional]#
By default, the name of the factor group will be the name of the hierarchy. But we can override this by specifying an alias here.
- Validated by:
- field hierarchy: HierarchyLevel | HierarchyGroups [Required]#
The hierarchy to use for the categorical exposures. This is either aHierarchyLevel or HierarchyGroups object. If a string is passed, the value is converted to a HierarchyLevel of that hierarchy with level=1.
- Validated by:
- field include: Literal['All'] | list[str] [Optional]#
Valid industry codes or labels for given hierarchy at any level. If labels are used which may be duplicated, then the code with the highest level is used. If ‘All’, all codes are included.
- Validated by:
- validator check_valid_factor_group(mode=after)#
- Validates:
- validator set_factor_group(mode=before)#
- Validates:
entire model
- validator validate_filters(mode=after)#
- Validates:
entire model