Files
sanguo_vnpy_v2/config/data_platform.yaml
T
claude_dev 164690373f feat(trader): C期分期项收尾—资金占用成本+分红送股+_restore_ledger修复
- 资金占用成本(spec§195): StrategyRunner.daily_borrow_cost(used×risk_free/365)
  归因per_strategy_pnl(不碰account总账, account.equity真实净值不变);
  config risk_free_rate=0.02; engine.step mark_to_market后计扣; =0向后兼容跳过
- 分红送股(spec§295): dividend_source.py(akshare stock_history_dividend_detail,
  实测600000/000001纯现金分红); PositionLedger.apply_split(volume×factor/avg÷factor);
  Account.apply_cash_dividend; engine._apply_dividends(除权日调整,现金先split后);
  mark_to_market停牌prev_close兜底(今收→前收→均价); _run_replay注入dividends日历
- 修_restore_ledger预存bug: PositionLedger.__init__加volume/frozen/avg_price参数
  (原只symbol, live_orchestrator跨日恢复4参数调用会TypeError, 首次step空仓未暴露)
- 139 passed(119基准+20分红+3占用成本), 无回归
- live_step dividends注入待分期项(每日拉全市场分红慢, 需run_daily_update预拉日历)
2026-07-10 08:44:35 +08:00

42 lines
1.1 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