trading.ai/config/config.yaml
aaron 283901df18 Initial commit: A股量化交易系统
主要功能:
- K线形态策略: 两阳+阴+阳突破形态识别
- 信号时间修复: 使用K线时间而非发送时间
- 换手率约束: 最后阳线换手率不超过40%
- 汇总通知: 钉钉webhook单次发送所有信号
- 数据获取: 支持AKShare数据源
- 舆情分析: 北向资金、热门股票等

技术特性:
- 支持日线/周线/月线多时间周期
- EMA20趋势确认
- 实体比例验证
- 突破价格确认
- 流动性约束检查

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-16 15:59:48 +08:00

98 lines
3.0 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.

# A股量化交易配置文件
trading:
# 交易时间配置
trading_hours:
start: "09:30:00"
end: "15:00:00"
lunch_break_start: "11:30:00"
lunch_break_end: "13:00:00"
# 股票池配置
stock_pool:
# 默认关注的指数成分股
index_codes: ["000001.SZ", "000300.SZ", "000905.SZ"] # 上证指数、沪深300、中证500
# 排除的股票代码
exclude_codes: []
# 风险控制
risk_management:
max_position_per_stock: 0.05 # 单股最大仓位比例
max_total_position: 0.9 # 最大总仓位比例
stop_loss_ratio: 0.05 # 止损比例
take_profit_ratio: 0.15 # 止盈比例
# 数据配置
data:
# 数据源配置
sources:
primary: "adata"
# 数据更新频率
update_frequency:
realtime: "1min" # 实时数据更新频率
daily: "after_close" # 日线数据更新时机
# 数据存储
storage:
path: "data/"
format: "parquet" # 数据存储格式
# 策略配置
strategy:
# 技术指标参数
indicators:
ma_periods: [5, 10, 20, 50] # 移动平均线周期
rsi_period: 14 # RSI周期
macd_params: [12, 26, 9] # MACD参数
# 选股条件
selection_criteria:
min_market_cap: 1000000000 # 最小市值(元)
max_pe_ratio: 30 # 最大市盈率
min_volume_ratio: 1.5 # 最小成交量比率
# K线形态策略配置
kline_pattern:
enabled: true # 是否启用K线形态策略
min_entity_ratio: 0.55 # 前两根阳线实体最小占振幅比例55%
final_yang_min_ratio: 0.40 # 最后阳线实体最小占振幅比例40%
timeframes: ["daily", "weekly", "monthly"] # 支持的时间周期
scan_stocks_count: 1000 # 扫描股票数量限制
analysis_days: 90 # 分析的历史天数
# 监控配置
monitor:
# 实时监控
realtime:
enabled: true
refresh_interval: 60 # 刷新间隔(秒)
# 报警配置
alerts:
price_change_threshold: 0.05 # 价格变动报警阈值
volume_spike_threshold: 3.0 # 成交量异常报警阈值
# 日志配置
logging:
level: "INFO"
format: "{time:YYYY-MM-DD HH:mm:ss} | {level} | {name} | {message}"
rotation: "1 day"
retention: "30 days"
file_path: "logs/trading.log"
# 通知配置
notification:
# 钉钉机器人配置
dingtalk:
enabled: true # 是否启用钉钉通知
webhook_url: "https://oapi.dingtalk.com/robot/send?access_token=50ad2c14e3c8bf7e262ba837dc2a35cb420228ee4165abd69a9e678c901e120e" # 钉钉机器人webhook地址需要用户配置
secret: "SEC6e9dbd71d4addd2c4e673fb72d686293b342da5ae48da2f8ec788a68de99f981" # 加签密钥
at_all: false # 是否@所有人
at_mobiles: [] # @指定手机号列表
# 其他通知方式
email:
enabled: false # 邮件通知(预留)
wechat:
enabled: false # 微信通知(预留)