期期出场改盈亏比:达目标平盈利腿,亏损腿残值20%或到期平

将上/下破目标价替换为盈亏比(盈利金额/初始权利金,默认2);残值平需买一流动性且权利金≤初始20%。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-08-11 16:44:45 +08:00
parent e26a67176c
commit c5d3d9d6c1
17 changed files with 566 additions and 198 deletions
+1 -2
View File
@@ -104,8 +104,7 @@ class TestHedgeMoneyness(unittest.TestCase):
err = validate_start_body(
"options_options",
{
"target_price_up": 1900,
"target_price_down": 1700,
"profit_rr": 2,
"index_px": 1800,
"leg_a": {"inst_id": "ETH-USD-260731-1700-C", "opt_type": "C", "strike": 1700},
"leg_b": {"inst_id": "ETH-USD-260731-1900-P", "opt_type": "P", "strike": 1900},