bayesline.api.equity.RiskDatasetHuberRegressionExposureSettings#
- pydantic model bayesline.api.equity.RiskDatasetHuberRegressionExposureSettings#
Show JSON schema
{ "title": "RiskDatasetHuberRegressionExposureSettings", "type": "object", "properties": { "exposure_type": { "const": "huber_regression", "default": "huber_regression", "title": "Exposure Type", "type": "string" }, "tsfactors_source": { "description": "The source of the timeseries factors.", "title": "Tsfactors Source", "type": "string" }, "factor_group": { "default": "huber_style", "description": "The factor group name to use for the regression.", "title": "Factor Group", "type": "string" }, "include": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "const": "All", "type": "string" } ], "default": "All", "description": "The factors to include in the regression.", "title": "Include" }, "exclude": { "description": "The factors to exclude from the regression.", "items": { "type": "string" }, "title": "Exclude", "type": "array" }, "fill_miss": { "default": true, "title": "Fill Miss", "type": "boolean" }, "window": { "default": 126, "description": "The window for the rolling regressions.", "title": "Window", "type": "integer" }, "epsilon": { "default": 1.35, "description": "The epsilon for the huber regression.", "title": "Epsilon", "type": "number" }, "alpha": { "default": 0.0001, "description": "The alpha for the huber regression.", "title": "Alpha", "type": "number" }, "alpha_start": { "default": 10.0, "description": "The alpha when no data is available.", "title": "Alpha Start", "type": "number" }, "student_t_level": { "anyOf": [ { "maximum": 1.0, "minimum": 0.0, "type": "number" }, { "type": "null" } ], "default": null, "description": "The level for the student t-test. If a test for the significance of the factor exposure is not rejected, the factor exposure is set to zero. If None, no test is run and the factor exposure is not set to zero.", "title": "Student T Level" }, "clip": { "default": [ null, null ], "description": "The clipping lower and upper bounds for the resulting exposures, before potential huberization.", "maxItems": 2, "minItems": 2, "prefixItems": [ { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, { "anyOf": [ { "type": "number" }, { "type": "null" } ] } ], "title": "Clip", "type": "array" }, "huberize": { "default": true, "description": "Whether to huberize the resulting exposures.", "title": "Huberize", "type": "boolean" }, "huberize_maintain_zeros": { "default": false, "description": "Whether to maintain zeros when huberizing the exposures.", "title": "Huberize Maintain Zeros", "type": "boolean" }, "impute": { "default": true, "description": "Whether to impute missing values for the resulting exposures.", "title": "Impute", "type": "boolean" }, "currency": { "default": "USD", "description": "The currency to convert all returns to.", "title": "Currency", "type": "string" }, "calendar": { "$ref": "#/$defs/CalendarSettings", "description": "The calendar to use for the rolling regressions." } }, "$defs": { "CalendarSettings": { "additionalProperties": false, "description": "Defines the settings for the calendar.", "properties": { "dataset": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the underlying dataset to use. If none is given then the configured default dataset is used.", "examples": [ "Bayesline-US" ], "title": "Dataset" }, "filters": { "default": [ [ "XNYS" ] ], "description": "The filters to apply. Each filter is a list of exchange MIC codes. The outer list will be treated as an OR conditions, while the inner lists will be treated as an AND conditions. For example, `[['A', 'B'], ['C']]` means that the holidays are the days where either A and B are both holidays, or C is a holiday.", "examples": [ [ [ "XNYS" ] ], [ [ "XNYS", "XNAS" ] ], [ [ "XNYS" ], [ "XNAS" ] ] ], "items": { "items": { "type": "string" }, "type": "array" }, "minItems": 1, "title": "Filters", "type": "array" } }, "title": "CalendarSettings", "type": "object" } }, "additionalProperties": false, "required": [ "tsfactors_source" ] }
- Config:
frozen: bool = True
extra: str = forbid
- Fields:
alpha (float)
alpha_start (float)
calendar (bayesline.api._src.equity.calendar_settings.CalendarSettings)
clip (tuple[float | None, float | None])
currency (str)
epsilon (float)
exclude (list[str])
exposure_type (Literal['huber_regression'])
factor_group (str)
fill_miss (bool)
huberize (bool)
huberize_maintain_zeros (bool)
impute (bool)
include (list[str] | Literal['All'])
student_t_level (float | None)
tsfactors_source (str)
window (int)
-
field student_t_level:
float
|None
= None# The level for the student t-test. If a test for the significance of the factor exposure is not rejected, the factor exposure is set to zero. If None, no test is run and the factor exposure is not set to zero.
- Constraints:
ge = 0.0
le = 1.0
-
field clip:
tuple
[float
|None
,float
|None
] = (None, None)# The clipping lower and upper bounds for the resulting exposures, before potential huberization.
-
field huberize_maintain_zeros:
bool
= False# Whether to maintain zeros when huberizing the exposures.
-
field calendar:
CalendarSettings
[Optional]# The calendar to use for the rolling regressions.