bayesline.api.equity.CategoricalFilterSettings

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

exclude

list[str]

No

factory

hierarchy

str

Yes

min_length=1

include

list[str] | Literal[‘All’]

No

'All'

Validators#

Validator

Mode

Fields

validate_filters

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:

validate_filters

field hierarchy: str [Required]#

The categorical hierarchy to use.

Constraints:
  • min_length = 1

Validated by:

validate_filters

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:

validate_filters

validator validate_filters(mode=after)#
Validates:

entire model