feat(live): D-3 sanguo实盘分支(影子下单)+D期设计文档
D-3 模式A影子下单(spec §5): - bridge_client.py: QMT bridge HTTP客户端(urllib, X-Bridge-Token, 失败不抛返回None) - live_orchestrator: _shadow_trades_to_bridge 当日成交POST bridge(默认enabled=false) - persistence: paper_shadow_orders幂等表+save_shadow_order/is_trade_shadowed - config: data_platform.yaml加live段, token走env(BRIDGE_TOKEN) - to_bridge_code symbol转换与guess_exchange一致(2位前缀) 安全: enabled=false默认关+token走env+幂等防重复+影子失败不阻断live_step docs: phase3d-live-trading-design.md(D期完整设计)
This commit is contained in:
@@ -10,6 +10,7 @@ class DataConfig:
|
||||
validation: dict
|
||||
performance: dict
|
||||
risk_free_rate: float = 0.02 # 年化无风险利率(spec §195 资金占用成本归因)
|
||||
live: dict | None = None # 实盘集成(D期 spec §5),None/缺省=disabled
|
||||
|
||||
def load_config(path: str) -> DataConfig:
|
||||
try:
|
||||
@@ -29,6 +30,7 @@ def load_config(path: str) -> DataConfig:
|
||||
validation=raw.get("validation", {}),
|
||||
performance=raw.get("performance", {}),
|
||||
risk_free_rate=float(raw.get("risk_free_rate", 0.02)),
|
||||
live=raw.get("live"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user