Implement dual target-close paths and residual option expiry.

Document and enforce: A full dual-leg close, B perp-only when deep OTM with residual archive that does not block next open, and expiry settlement when target is missed.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-26 18:32:05 +08:00
parent 96e8e5cb70
commit 4994aaab16
14 changed files with 595 additions and 118 deletions
+16
View File
@@ -29,6 +29,22 @@ def option_intrinsic(*, option_side: str, strike: float, spot: float) -> float:
return 0.0
def is_deep_otm(
*,
option_side: str,
strike: float,
spot: float,
max_intrinsic: float = 0.01,
) -> bool:
"""
远虚:内在价值≈0(多头期权已无行权价值)。
100×杠杆 ATM 在标的波动约1%后常落入此状态。
"""
return option_intrinsic(
option_side=option_side, strike=strike, spot=spot
) <= float(max_intrinsic)
def option_expiry_settle(
*,
intrinsic: float,