Split OO budget per leg and size Call/Put independently.
Each half of the risk budget buys its own qty from ask; equal qty no longer forced. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -367,6 +367,7 @@ export type PlanState = {
|
||||
oo_min_option_hours?: number;
|
||||
oo_min_leverage?: number;
|
||||
oo_reward_ratio?: number;
|
||||
oo_put_qty_eth?: number;
|
||||
sizing_mode?: "manual" | "risk_based";
|
||||
risk_based?: boolean;
|
||||
ledger: { equity: number; available: number; reserved: number };
|
||||
|
||||
@@ -223,7 +223,7 @@ export default function PlanPage() {
|
||||
: `待估算(基数${fmt(plan?.risk_exit_unit ?? 15)})`
|
||||
: `固定 ${fmt(plan?.net_profit_target ?? 15)} U`;
|
||||
const riskRatioLabel = isOo
|
||||
? "Call:Put 1:1"
|
||||
? "预算平分 Call/Put"
|
||||
: `比例${Number(plan?.risk_perp_unit ?? 1)}:${Number(plan?.risk_option_unit ?? 2)}`;
|
||||
const sizingModeLabel = riskBased
|
||||
? [
|
||||
@@ -268,7 +268,16 @@ export default function PlanPage() {
|
||||
"虚值Call@高·Put@低",
|
||||
`剩余≥${fmt(plan?.oo_min_option_hours ?? 24, 0)}h`,
|
||||
`杠杆≥${fmt(plan?.oo_min_leverage ?? 200, 0)}x`,
|
||||
displayOptQty != null ? `单腿${fmt(displayOptQty, 1)}ETH` : null,
|
||||
displayOptQty != null
|
||||
? `Call${fmt(displayOptQty, 1)}/Put${fmt(
|
||||
Number(
|
||||
plan?.risk_sizing_preview?.put_qty_eth ??
|
||||
plan?.oo_put_qty_eth ??
|
||||
displayOptQty,
|
||||
),
|
||||
1,
|
||||
)}ETH`
|
||||
: null,
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(" · ");
|
||||
|
||||
@@ -756,7 +756,7 @@ export default function SettingsPage() {
|
||||
/>
|
||||
<p className="hint" style={{ margin: "0.35rem 0 0" }}>
|
||||
目标盈利 = 以损预算 × 盈亏比(例预算 100U、比 2 → 目标
|
||||
200U)。两腿 1:1 平分预算。振幅/选约参数见「选约」页。
|
||||
200U)。预算平分给 Call/Put,各按卖一独立定仓。
|
||||
</p>
|
||||
</div>
|
||||
) : null}
|
||||
@@ -785,7 +785,7 @@ export default function SettingsPage() {
|
||||
<div className="field">
|
||||
<label>定仓模式</label>
|
||||
<div className="mono" style={{ fontSize: 13 }}>
|
||||
以损定仓(期期固定 · Call/Put 1:1)
|
||||
以损定仓(期期固定 · 预算平分,按各自卖一定仓)
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
@@ -1048,11 +1048,19 @@ export default function SettingsPage() {
|
||||
? ` · 倍投待命(连亏${Number(mg.loss_days) || 0}天)`
|
||||
: "";
|
||||
return isOo
|
||||
? `预算=${budS}U · 估亏=${mxS}U · 出场=预算×${ooRewardRatio}${
|
||||
riskPreview.option_qty_eth != null
|
||||
? ` · 单腿≈${riskPreview.option_qty_eth}ETH`
|
||||
: ""
|
||||
}${mgS}`
|
||||
? `预算=${budS}U · 各腿≈${
|
||||
riskPreview.leg_budget != null
|
||||
? Number(riskPreview.leg_budget).toFixed(2)
|
||||
: budS !== "—"
|
||||
? (Number(budS) / 2).toFixed(2)
|
||||
: "—"
|
||||
}U · Call≈${
|
||||
riskPreview.call_qty_eth ??
|
||||
riskPreview.option_qty_eth ??
|
||||
"—"
|
||||
} · Put≈${
|
||||
riskPreview.put_qty_eth ?? "—"
|
||||
} · 出场=预算×${ooRewardRatio}${mgS}`
|
||||
: `k=${pk ?? "—"} · 预算=${budS}U · 估亏=${mxS}U · 永续=${perp ?? "—"} · 期权=${opt ?? "—"} · 出场=${exit ?? "—"}${basisS}${mgS}`;
|
||||
})()}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user