Fix semi open stalls: one-leg asks, OTM realign, clearer pick errors.
Monitor no longer shows ATM Put bias while semi-auto is authorized for Call. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -53,6 +53,17 @@ def test_decide_fixed_short_call() -> None:
|
||||
assert s.bias == "fixed_short_call"
|
||||
|
||||
|
||||
def test_decide_fixed_needs_only_own_leg() -> None:
|
||||
from app.strategy.signal import decide_fixed
|
||||
|
||||
# 半自动多/空:对侧卖一缺失仍可定方向
|
||||
sc = decide_fixed(8.2, None, perp_side="short")
|
||||
assert sc is not None and sc.option_side == "call"
|
||||
sp = decide_fixed(None, 11.4, perp_side="long")
|
||||
assert sp is not None and sp.option_side == "put"
|
||||
assert decide_fixed(None, None, perp_side="short") is None
|
||||
|
||||
|
||||
def test_signal_strike_below_spot_call_short() -> None:
|
||||
# 现价 1859、ATM 1850:即使 Put 卖一更高,也走 Call+空
|
||||
s = decide(10.0, 20.0, strike=1850, mark_px=1859)
|
||||
|
||||
Reference in New Issue
Block a user