feat(options): use premium profit RR instead of target index

单独期权与中控改为盈亏比×权利金触发买一平仓,默认2;不达标等到期。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-08-11 10:34:14 +08:00
parent 3b56e15fb1
commit 5c3969674a
13 changed files with 494 additions and 194 deletions
+2 -1
View File
@@ -38,14 +38,15 @@ def build_options_hub_snapshot(cfg: dict[str, Any]) -> dict[str, Any]:
mon = tgt_map.get(str(p.get("inst_id") or ""))
if mon:
p["target_index"] = mon.get("target_index")
p["profit_rr"] = mon.get("profit_rr")
p["target_monitor_id"] = mon.get("id")
p["target_monitor"] = mon
hedge_target = hedge_target_map.get(str(p.get("inst_id") or ""))
if hedge_target:
p["hedge_plan_target"] = hedge_target
if not mon:
# 中控卡片共用 target_index 只读展示;实际平仓仍由对冲计划监控处理。
p["target_index"] = hedge_target.get("target_index")
p["profit_rr"] = hedge_target.get("oo_profit_rr")
try:
from lib.instance.instance_dashboard_lib import (
_format_options_target,