bayesline.api.equity.FactorRiskModelSettings

bayesline.api.equity.FactorRiskModelSettings#

model FactorRiskModelSettings#

Define all settings needed to build a factor risk model.

Fields#

Field

Type

Required

Default

Constraints

exposures

list[str | int | ExposureSettings]

No

[ExposureSettings(exposures=[], orthogonalization_weights='SqrtCap')]

min_length=1

halflife_idio_vra

Annotated[int, Gt(gt=0)] | None

No

None

modelconstruction

list[str | int | ModelConstructionSettings]

No

[ModelConstructionSettings(currency='USD', weights='SqrtCap', estimation_universe=None, return_clip_bounds=(-0.1, 0.1), thin_category_shrinkage={}, thin_category_shrinkage_overrides={}, zero_sum_constraints={}, known_factor_map={}, fx_convert_returns=True)]

min_length=1

universe

list[str | int | UniverseSettings]

Yes

min_length=1, max_length=1

Validators#

Validator

Mode

Fields

check_list_lengths

after

model

validate_modelconstruction

after

modelconstruction

field exposures: list[str | int | ExposureSettings] [Optional]#

The exposures to build the factor risk model on.

Constraints:
  • min_length = 1

Validated by:

check_list_lengths

field halflife_idio_vra: Annotated[int, Gt(gt=0)] | None [Optional]#

The half-life for the idio adjustment. If None, no adjustment is applied.

Validated by:

check_list_lengths

field modelconstruction: list[str | int | ModelConstructionSettings] [Optional]#

The model construction settings to use for the factor risk model.

Constraints:
  • min_length = 1

Validated by:

check_list_lengths validate_modelconstruction

field universe: list[str | int | UniverseSettings] [Required]#

The universe to build the factor risk model on.

Constraints:
  • min_length = 1

  • max_length = 1

Validated by:

check_list_lengths

validator check_list_lengths(mode=after)#
Validates:

entire model

validator validate_modelconstruction(mode=after)#
Validates:

modelconstruction