QTrade/configs/strategies/debug_000001.yaml
cuizhan 6284f98eda 重构策略状态管理:统一由StrategyManager管理状态持久化
主要变更:
1. BaseStrategy新增get_status()和restore_state()方法
2. StrategyManager统一管理状态保存和恢复
   - close()方法调用get_status()保存状态
   - initialize()方法调用restore_state()恢复状态
3. GridStrategy实现状态管理接口
4. 网格策略支持断点续传
5. 新增消息类型常量定义
6. 重构MiniQMT客户端适配器的K线数据处理
7. 统一使用Logger替换LazyLogger
8. 配置文件支持多数据库类型
2026-01-17 14:37:57 +08:00

38 lines
1.4 KiB
YAML
Raw Permalink 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"
is_enabled: true # 是否启用该策略实例
symbol: ["600593.SH","601288.SH"] # 股票代码
symbol_name: ["大连圣亚","农业银行"] # 股票名称
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线周期