bayesline.api.equity.PositionBoundConstraint

bayesline.api.equity.PositionBoundConstraint#

model PositionBoundConstraint#

Per-asset holding weight bounds.

Only the listed assets are bounded; every other position is free. A min of zero on a name keeps it long-only, a max of zero keeps it short-only or flat.

Fields#

Field

Type

Required

Default

Constraints

bounds

dict[str, PositionBound]

Yes

min_length=1

enabled

bool

No

True

kind

Literal[‘position_bound’]

No

'position_bound'

space

Literal[‘total’, ‘active’]

No

'total'

field bounds: dict[str, PositionBound] [Required]#

Bounds keyed by asset id, in the risk model’s asset id type.

Constraints:
  • min_length = 1

field enabled: bool [Optional]#

Whether this constraint is applied to the optimization problem.

field kind: Literal['position_bound'] [Optional]#
field space: Literal['total', 'active'] [Optional]#

Whether the bounds apply to the portfolio’s holding weights (total) or to its weights in excess of its benchmark’s (active).