bayesline.api.equity.CategoricalFilterSettings#
- model CategoricalFilterSettings#
Specify include and exclude filters for categorical codes.
Examples of categorical codes are industries or countries. Assets are included if they are part of at least one include and not part of any exclude.
By default all codes for the given hierarchy are included.
Fields# Field
Type
Required
Default
Constraints
No
factory
Yes
min_length=1
No
'All'Validators# Validator
Mode
Fields
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 hierarchy: str [Required]#
The categorical hierarchy to use.
- Constraints:
min_length =
1
- Validated by:
- field include: list[str] | Literal['All'] [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 validate_filters(mode=after)#
- Validates:
entire model