Add trade move points; label option UPL price as bid not mark.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -583,7 +583,7 @@ class Matcher:
|
||||
).fetchone()
|
||||
fees = float(g["fees"] or 0) + pf.fee + of.fee
|
||||
slip = float(g["slip_cost"] or 0) + pf.slip + of.slip
|
||||
settle_index = float(spot) if is_expiry and spot is not None else None
|
||||
settle_index = float(spot) if spot is not None else None
|
||||
self.db._conn.execute(
|
||||
"""UPDATE groups SET status=?, close_at_ms=?, close_reason=?, realized_pnl=?,
|
||||
fees=?, slip_cost=?, note=NULL, settle_index_px=? WHERE group_id=?""",
|
||||
@@ -1045,7 +1045,7 @@ class Matcher:
|
||||
)
|
||||
est_opt_close_fee = of.fee
|
||||
opt_mark = bid
|
||||
# 浮盈亏:买一×数量 − 初始权利金
|
||||
# 浮盈亏:买一×数量 − 初始权利金(对齐可市价卖出)
|
||||
option_upl = bid * opt_qty - initial_premium
|
||||
elif oq:
|
||||
opt_mark = oq.bid or oq.mark_px
|
||||
|
||||
Reference in New Issue
Block a user