0761342baf
容器 docker run(非 compose)注入 BRIDGE_TOKEN env 需重建容器,风险大。改为 live_cfg.bridge_token 优先、fallback BRIDGE_TOKEN env。run_live_step 每次 load_config,改 config 免重启即生效。 - _shadow_trades_to_bridge + reconcile_from_bridge 两处 token 读取 - config: live.bridge_token 占位空值(真实值填 NAS gitignored config,不入库) - tests: +6 测试(config优先/env fallback/都无跳过),191 passed
52 lines
1.7 KiB
YAML
52 lines
1.7 KiB
YAML
# config/data_platform.yaml
|
|
data_paths:
|
|
daily_dir: /volume1/stock/A股数据/日线数据/daily
|
|
raw_dir: /volume1/stock/A股数据/日线数据/raw
|
|
qfq_dir: /volume1/stock/A股数据/日线数据/qfq
|
|
minute_15_dir: /volume1/stock/minute_kline/15min
|
|
minute_15_qfq_dir: /volume1/stock/minute_kline/15min_qfq
|
|
minute_15_raw_dir: /volume1/stock/minute_kline/15min_raw
|
|
vnpy_db: /volume1/stock/sanguo_vnpy/data/quant_trading.db
|
|
stock_list: /volume1/stock/A股数据/stock_info/stock_basic_info_raw_20260326_113530.csv
|
|
|
|
data_sources:
|
|
daily:
|
|
- name: eastmoney
|
|
enabled: true
|
|
interval: 4.0
|
|
- name: baostock
|
|
enabled: true
|
|
interval: 0.0
|
|
timeout: 30
|
|
- name: tencent
|
|
enabled: true
|
|
interval: 0.0
|
|
minute_15:
|
|
- name: eastmoney
|
|
enabled: true
|
|
interval: 4.0
|
|
|
|
validation:
|
|
price_positive: true
|
|
ohlc_consistency: true
|
|
no_future_dates: true
|
|
|
|
performance:
|
|
request_interval: 0.3
|
|
max_retries: 3
|
|
fail_window: 100
|
|
fail_threshold: 0.8
|
|
|
|
# 资金占用成本归因(spec §195):年化无风险利率,每策略占用资金按此日扣归因到 PnL
|
|
risk_free_rate: 0.02
|
|
|
|
# 实盘集成(D期,spec §5)— 默认关闭,D-4a 联调再开
|
|
# bridge_token 优先从 config 读,fallback 环境变量 BRIDGE_TOKEN
|
|
live:
|
|
enabled: false # 总开关(false=影子分支整个跳过,live_step 行为不变)
|
|
bridge_url: https://bridge.mysanguo.top
|
|
shadow: true # 模式A影子下单(模拟撮合为准,信号同步POST bridge影子)
|
|
mode_b: false # D-4c 模式B: bridge回报校正账本(默认关,切实盘再开)
|
|
# 和 Windows bridge 同值;不进 git。占位空值,真实值部署时填实际 config
|
|
bridge_token:
|