Color 期期 preview PnL and show RR vs full premium loss.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-19 15:43:01 +08:00
parent 7938628485
commit 38ac258497
6 changed files with 77 additions and 18 deletions
+19
View File
@@ -4,6 +4,25 @@
---
## 2026-07-19 · 期期情景测算:盈亏配色 + 盈亏比(亏=全额保费)
### 修改原因
情景弹窗合计无红绿区分;需要一眼看盈亏,并按「最大亏损=权利金全亏」给出上破/下破盈亏比。
### 修改的地方
| 文件 | 改动摘要 |
|------|----------|
| `hedge_plan.js` | 合计/腿盈亏用 `hp-pnl-pos/neg`;摘要显示盈亏比 |
| `hedge_plan_calc_lib.py` | summary 增加 `rr_at_up` / `rr_at_down` / `rr_risk_premium` |
### 交付之后的验收
正数为绿、负数为红;摘要可见「盈亏比 上破 x:1 / 下破 y:1(亏=全额保费)」。
---
## 2026-07-19 · 修复期期「按张数」拆分:用同张数总张数 2n
### 修改原因