strategy: implement model assist be-lock path and clarify audit note
This commit is contained in:
@@ -30,7 +30,20 @@ def test_exited_has_priority_over_promotion() -> None:
|
||||
assert state == PositionState.EXITED
|
||||
|
||||
|
||||
def test_model_signal_is_assist_only_not_direct_exit() -> None:
|
||||
def test_model_signal_promotes_be_lock_as_assist() -> None:
|
||||
state = promote_state(
|
||||
PositionState.HOLDING,
|
||||
StateTransitionInput(
|
||||
unrealized_pnl_pct=0.5,
|
||||
be_arm_pct=1.2,
|
||||
arm_pct=2.8,
|
||||
model_exit_signal=True,
|
||||
),
|
||||
)
|
||||
assert state == PositionState.BE_LOCK
|
||||
|
||||
|
||||
def test_model_signal_does_not_force_exit_directly() -> None:
|
||||
state = promote_state(
|
||||
PositionState.ARMED,
|
||||
StateTransitionInput(
|
||||
|
||||
Reference in New Issue
Block a user