bayesline.api.equity.MinimizeDistanceObjective

bayesline.api.equity.MinimizeDistanceObjective#

model MinimizeDistanceObjective#

Minimize the squared distance between the new and the current holdings.

Unlike trade volume, this spreads the required change across many small trades rather than concentrating it in a few names.

Fields#

Field

Type

Required

Default

Constraints

enabled

bool

No

True

kind

Literal[‘minimize_distance’]

No

'minimize_distance'

weight

float

No

1.0

gt=0

field enabled: bool [Optional]#

Whether this objective contributes to the optimization problem.

field kind: Literal['minimize_distance'] [Optional]#
field weight: float [Optional]#

Relative weight of this objective in the combined problem. Only the ratios between objective weights matter; they need not be normalized to sum to one.

Constraints:
  • gt = 0