Fix semi strike-target test not tripping net lock early.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -40,9 +40,9 @@ def test_semi_points_long_needs_net_positive() -> None:
|
||||
|
||||
|
||||
def test_semi_points_uses_strike_not_spot() -> None:
|
||||
# 现价 1915、K1930、+50 → 目标 1980;现价未到则不平
|
||||
# 现价 1915、K1930、+50 → 目标 1980;现价未到则不平(净利勿触达锁定)
|
||||
d = check_semi_exits(
|
||||
net_pnl=5.0,
|
||||
net_pnl=1.0,
|
||||
strike=1930,
|
||||
index_px=1915,
|
||||
view_side="long",
|
||||
@@ -54,7 +54,7 @@ def test_semi_points_uses_strike_not_spot() -> None:
|
||||
assert d.target_index == 1980.0
|
||||
|
||||
d2 = check_semi_exits(
|
||||
net_pnl=5.0,
|
||||
net_pnl=1.0,
|
||||
strike=1930,
|
||||
index_px=1980,
|
||||
view_side="long",
|
||||
|
||||
Reference in New Issue
Block a user