-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
問題描述
2382 在 3/19 以 220.2 買入,但當日 EOD 收盤價為 286.5,偏離幅度 23%。原因:simulation 模式下 Shioaji 以委託價成交,而策略模組送出的委託價使用了歷史/過時價格。
影響:
positions.avg_price= 220.0 vs 實際市場 ~287 → unrealized PnL +31K 為虛假數據- 績效指標全部失真
- 回測與 live 表現會有巨大落差
修復方案
- buy order 委託價強制使用即時行情(Shioaji tick)或最新 EOD close
- 加入
buy_price_max_deviation_pct = 2.0:若委託價偏離最新 EOD close 超過 2%,拒絕送單並記 incident - 影響範圍:
ticker_watcher.py中建立買單的邏輯
驗證
- 新買單委託價與最新 EOD close 偏離 <2%
- 偏離超標時寫入 incidents 表並跳過下單
- 現有 positions 表中的歷史買入價標註警告
來源:每日策略審核 2026-03-27
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working