Gate opens when ATM-spot offset exceeds configurable max (default 3).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-25 12:32:36 +08:00
parent a4bcc3ab0d
commit ee0ec57f89
12 changed files with 93 additions and 13 deletions
+7 -4
View File
@@ -197,7 +197,8 @@ export default function PlanPage() {
<span></span>
<span className="mono">
{fmt(plan?.min_option_hours, 0)}h ·
{fmt(plan?.min_option_leverage, 0)}x
{fmt(plan?.min_option_leverage, 0)}x · ATM偏差
{fmt(plan?.max_atm_open_offset ?? 3, 0)}
</span>
</div>
<div className="kv">
@@ -415,9 +416,11 @@ export default function PlanPage() {
? (snap.perp.bid + snap.perp.ask) / 2
: null);
if (strike == null || px == null) return "—";
const d = strike - px;
const sign = d > 0 ? "+" : "";
return `${sign}${d.toFixed(0)}(最近可用行权价)`;
const abs = Math.abs(strike - px);
const sign = strike - px > 0 ? "+" : "";
const lim = plan?.max_atm_open_offset ?? 3;
const ok = abs <= lim + 1e-9;
return `${sign}${(strike - px).toFixed(0)} · 开仓${ok ? "可" : "不可"}(|Δ|≤${lim})`;
})()}
</span>
</div>