Add option-option hedge mode with SIM/LIVE parity.

Mutual hedge_mode, amplitude OTM selection, 1:1 risk sizing, win-leg/full close, dual audits and docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-08-07 16:01:16 +08:00
parent 15fe2f72dc
commit ec244c63c6
22 changed files with 2640 additions and 83 deletions
+8
View File
@@ -80,6 +80,14 @@ class Settings(BaseSettings):
martingale_enabled: bool = False
martingale_start_after_loss_days: int = 2 # 连续亏损 N 天后开始翻倍
martingale_max_doubles: int = 3 # 最多翻倍次数(如 2→4→8→16 为 3 次)
# 对冲模式:perp_option=永期(默认)| option_option=期期
hedge_mode: str = "perp_option"
oo_amplitude_pct: float = 1.5 # 振幅最小 %(回看窗内高低)
oo_amplitude_hours: float = 12.0 # 振幅回看小时
oo_min_option_hours: float = 24.0 # 期期:最短剩余到期小时
oo_min_leverage: float = 200.0 # 期期:单腿最低杠杆
oo_reward_ratio: float = 2.0 # 盈亏比:出场目标 = 预算 ×
oo_budget_cushion: float = 0.92 # 定仓预留余地(用于权利金的预算比例)
atm_open_offset_enabled: bool = False # 开仓 ATM 偏差限制开关(默认关)
max_atm_open_offset: float = 3.0 # 开启后:|ATM行权价−标的| 上限(点)
# 固定方向:关=现有 ATM/比价规则;开=指定永续多/空,期权 Put/Call 且须实值或平值