QTrade/configs/strategies/debug_000001.yaml
cuizhan 593565bb36 feat: 完善交易系统和实盘模块
核心改进:
- Account模型重命名为Asset,增加完整资产管理字段
- Logger增加prompt_level列表过滤,支持灵活日志级别控制
- 新增TradingDataStorage和TradingCache,完善交易对象存储
- 实现MiniQMTClientAdapter实盘交易适配器
- 新增realtrade_runner.py实盘启动脚本

数据库表更新:
- 重构Order/Trade/Position/Asset表结构
- 所有交易表增加instance_id字段实现多策略隔离
- Signal表增加instance_id字段

文档完善:
- 新增logger_prompt_level_guide.md日志配置说明
- 新增realtrade_guide.md实盘交易使用指南
- 新增table_cleanup_summary.md表结构清理总结

代码优化:
- 全局WSClient使用get_wsclient()函数封装访问
- 移除Symbol模型,信息移至配置文件
- 清理废弃表定义约320行代码
2026-01-15 22:11:28 +08:00

36 lines
1.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 策略实例配置: debug_000001
# 平安银行 - 每条K线都打印,不生成信号
instance_id: "debug_000001"
symbol: "000001.SZ" # 股票代码
symbol_name: "平安银行" # 股票名称
symbol_type: "stock" # 股票类型,stock,etf,future,option,bond
symbol_decimal_places: 2 # 小数位数, 股票为2,期货,ETF等为3
strategy_class: "DebugStrategy"
capital: 100000
# 策略参数
params:
print_every: 1 # 每条K线都打印
simulate_signal: false # 不生成模拟信号
# 风控参数
risk:
max_position_ratio: 0.8 # 最大仓位80%
stop_loss: 0.05 # 止损5%
# ==================== 仅对回测生效 ====================
# 交易费率配置
backtrade:
trading_type: t1 # 交易类型 T+0 或 T+1
trading_fees:
commission_rate: 0.00005 # 佣金率 0.005%(买卖双向收取)ETF 为万0.5, 股票为万0.85
min_commission: 5.0 # 最低佣金 5元
stamp_tax_rate: 0.001 # 印花税率 0.1%(仅卖出时收取)
transfer_fee_rate: 0.00002 # 过户费率 0.002%(买卖双向收取), 万0.2
slippage: 0.0001 # 滑点 0.01%(买卖双向影响)
start_date: "2025-01-01" # 回测开始日期
end_date: "2025-12-31" # 回测结束日期
period: "1m" # 回测K线周期