bayesline.api.equity.ModelConstructionSettingsMenu#
- pydantic model bayesline.api.equity.ModelConstructionSettingsMenu#
Defines available modelconstruction settings to build a factor risk model.
Show JSON schema
{ "title": "ModelConstructionSettingsMenu", "description": "Defines available modelconstruction settings to build a factor risk model.", "type": "object", "properties": { "weights": { "description": "\n The available regression weights that can be used for the factor risk model.\n ", "items": { "enum": [ "SqrtCap", "InvIdioVar" ], "type": "string" }, "title": "Weights", "type": "array" }, "known_factors": { "additionalProperties": { "type": "string" }, "description": "\n The available known factor returns that can be used for the factor risk model.\n The keys are the factor names and the values a description for this known factor.\n ", "title": "Known Factors", "type": "object" } }, "additionalProperties": false, "required": [ "weights", "known_factors" ] }
- Config:
frozen: bool = True
extra: str = forbid
- Fields:
known_factors (dict[str, str])
weights (list[Literal['SqrtCap', 'InvIdioVar']])
-
field weights:
list
[Literal
['SqrtCap'
,'InvIdioVar'
]] [Required]# The available regression weights that can be used for the factor risk model.
-
field known_factors:
dict
[str
,str
] [Required]# The available known factor returns that can be used for the factor risk model. The keys are the factor names and the values a description for this known factor.
- describe(settings: ModelConstructionSettings | None = None) → str#
Parameters#
- settingsSettingsType | None
The settings to describe. If None, then the description is not evaluated against any settings.
Returns#
A human readable description of the settings menu, optionally evaluated against the given settings.
- validate_settings(settings: ModelConstructionSettings) → None#
Validates if the given settings are valid for this settings menu.
Parameters#
- settingsSettingsType
The settings to validate.
Raises#
ValidationError if a pydantic error occurs or ValueError if passed settings values are invalid.