bayesline.api.equity.Basket

bayesline.api.equity.Basket#

model Basket#

A user-defined basket of assets that behaves as a thematic factor.

The basket’s return stream becomes a custom factor in the risk model for the scope of the scenario. Weights default to equal-weighted (None); explicit per-asset weights are an optional forward-compatible extension.

Fields#

Field

Type

Required

Default

asset_ids

list[str]

Yes

name

str

Yes

weights

list[float] | None

No

None

field asset_ids: list[str] [Required]#

Asset IDs that make up the basket.

field name: str [Required]#

Human-readable basket name, e.g. ‘AI’.

field weights: list[float] | None [Optional]#

Optional per-asset weights. If omitted, the basket is treated as equal-weighted. If provided, length must match asset_ids and entries must sum to approximately 1.0.