Extend semi-auto with ITM/ATM/OTM, offset, and 1:4 sizing.

Moneyness and perp:option units are plan-only; OTM enforces leverage >=180.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-08-08 11:42:57 +08:00
parent 4585dba3c3
commit 457838ef64
17 changed files with 428 additions and 41 deletions
+5 -1
View File
@@ -102,7 +102,11 @@ class Settings(BaseSettings):
semi_option_move_points: float = 50.0 # 顺方向:标的波动点数
semi_perp_exit_unit: float = 5.0 # 净利出场基数(×k
semi_min_option_hours: float = 30.0
semi_min_option_leverage: float = 100.0
semi_min_option_leverage: float = 200.0 # 虚值默认 200(虚值门仍强制≥180)
semi_moneyness: str = "otm" # itm|atm|otm
semi_otm_max_offset: float = 25.0 # 虚值 |KS| 上限(可配)
semi_perp_unit: float = 1.0 # 半自动永续:期权 配比分子
semi_option_unit: float = 4.0 # 配比分母,默认 1:4
close_bid_mark_max_pct: float = 30.0 # 平仓:买一相对标记最大偏差%
# 残留期权中途平:当前买一权利金 ≥ 初始权利金 × 该% 才尝试卖出
residual_min_premium_pct: float = 20.0