bayesline.api.equity.TSFactorSpec

bayesline.api.equity.TSFactorSpec#

model TSFactorSpec#

Specification for deriving a risk model with user-defined TS factors.

This spec is consumed by derive_factor_model_with_tsfactor to build a new FactorRiskModelSettings that is then run as an ordinary report.

The uploaded series is interpreted as the returns of an external portfolio or theme. Per-asset exposures are derived at report time by rolling regression of asset returns on the uploaded series; the resulting exposures feed a chained second-stage regression that produces the new factor’s returns alongside the existing model’s factors.

Fields#

Field

Type

Required

Default

factor_selection

list[TSFactorSelection]

Yes

tsfactors_source

str

Yes

field factor_selection: list[TSFactorSelection] [Required]#

Factors to pull from the uploaded dataset. Each becomes a custom factor in the derived risk model.

field tsfactors_source: str [Required]#

Name of the uploaded time-series factors dataset to draw from.