bayesline.api.equity.GroupNetExposureConstraint

bayesline.api.equity.GroupNetExposureConstraint#

model GroupNetExposureConstraint#

Freeze the net exposure of asset groups while allowing trading within them.

A group’s net exposure (the sum of its members’ holdings) is held at its current value, so names can be rotated within the group but the group as a whole neither grows nor shrinks. Groups come from a categorical factor group of the risk model (e.g. an industry classification, one group per factor, membership given by the exposures), from explicit asset lists, or both.

Fields#

Field

Type

Required

Default

asset_groups

dict[str, list[str]]

No

factory

enabled

bool

No

True

factor_group

str | None

No

None

kind

Literal[‘group_net_exposure’]

No

'group_net_exposure'

field asset_groups: dict[str, list[str]] [Optional]#

Explicit groups to freeze, keyed by group name, each a list of asset ids in the risk model’s asset id type.

field enabled: bool [Optional]#

Whether this constraint is applied to the optimization problem.

field factor_group: str | None [Optional]#

Name of a categorical factor group of the risk model whose factors define the groups to freeze.

field kind: Literal['group_net_exposure'] [Optional]#