bayesline.api.equity.RiskDatasetHuberRegressionExposureSettings

bayesline.api.equity.RiskDatasetHuberRegressionExposureSettings#

model RiskDatasetHuberRegressionExposureSettings#

Settings for Huber regression-based exposure data in a risk dataset.

This class defines settings for generating exposure data using Huber regression on time series factors, with options for windowing, regularization, and statistical testing.

Fields#

Field

Type

Required

Default

Constraints

alpha

float

No

0.0001

alpha_start

float

No

10.0

calendar

CalendarSettings

No

factory

clip

tuple[float | None, float | None]

No

(None, None)

currency

str

No

'USD'

epsilon

float

No

1.35

exclude

list[str]

No

factory

exposure_type

Literal[‘huber_regression’]

No

'huber_regression'

factor_group

str

No

'huber_style'

fill_miss

bool

No

True

gaussianize

bool

No

True

gaussianize_maintain_zeros

bool

No

False

impute

bool

No

True

include

list[str] | Literal[‘All’]

No

'All'

student_t_level

float | None

No

None

ge=0.0, le=1.0

tsfactors_source

str

Yes

window

int

No

126

field alpha: float [Optional]#

The alpha for the huber regression.

field alpha_start: float [Optional]#

The alpha when no data is available.

field calendar: CalendarSettings [Optional]#

The calendar to use for the rolling regressions.

field clip: tuple[float | None, float | None] [Optional]#

The clipping lower and upper bounds for the resulting exposures, before potential huberization.

field currency: str [Optional]#

The currency to convert all returns to.

field epsilon: float [Optional]#

The epsilon for the huber regression.

field exclude: list[str] [Optional]#

The factors to exclude from the regression.

field exposure_type: Literal['huber_regression'] [Optional]#
field factor_group: str [Optional]#

The factor group name to use for the regression.

field fill_miss: bool [Optional]#
field gaussianize: bool [Optional]#

Whether to gaussianize the resulting exposures.

field gaussianize_maintain_zeros: bool [Optional]#

Whether to maintain zeros when huberizing the exposures.

field impute: bool [Optional]#

Whether to impute missing values for the resulting exposures.

field include: list[str] | Literal['All'] [Optional]#

The factors to include in the regression.

field student_t_level: float | None [Optional]#

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 tsfactors_source: str [Required]#

The source of the timeseries factors.

field window: int [Optional]#

The window for the rolling regressions.