QTrade/configs/global.yaml
cuizhan 552eca59f6 refactor(config): 重构XtQuant配置位置
变更说明:
- 将 XtQuant 相关配置从 qmt 节点移到 data_source.xtquant 节点
- 配置项包括:
  * xtquant_path: XtQuant 数据目录路径
  * xtquant_token: XtQuant API Token
  * optimize_addresses: 优化地址列表

- 更新相关代码读取配置的路径:
  * xtquant_downloader.py: 从 data_source.xtquant 读取配置
  * test_xtquant_downloader.py: 更新测试配置路径

- qmt 节点仅保留交易相关配置(account_type)

设计理念:
- data_source.xtquant: 数据下载器配置
- qmt: QMT交易客户端配置
- 职责分离,配置结构更清晰
2025-12-17 15:46:10 +08:00

90 lines
2.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.

# QTrade 全局公共配置
# 说明: 此文件包含所有服务共用的配置项
# 环境变量配置(对应 .env 文件内容)
environment:
# 当前环境: backtest, simulation, production
env: "backtest"
# 配置文件路径
config_file: "configs/backtest.yaml"
# 环境对应的配置文件映射
config_mapping:
backtest: "configs/backtest.yaml"
simulation: "configs/simulation.yaml"
production: "configs/production.yaml"
# 应用配置
app:
version: "2.0.0" # 公用版本号
# MySQL 配置(公用)
database:
host: "127.0.0.1"
port: 3306
user: "root"
password: "1234"
pool_size: 5
pool_recycle: 3600
echo: false
# 日志配置(公用)
logging:
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
file:
enabled: true
max_size: 10485760 # 10MB
backup_count: 5
# 数据源配置(公用)
data_source:
# 数据下载器类型: xtquant, qmt, tushare, akshare 等
downloader: "xtquant"
# XtQuant 下载器配置
xtquant:
xtquant_path: "C:\\Program Files\\国金证券QMT交易端\\userdata_mini\\datadir"
xtquant_token: "e83d8eec5226c0b4db4a1d40830e09e4ffe73e15" # XtQuant 数据接口 token(需要申请)
# XtQuant 优化地址(可选,用于提升数据下载速度)
optimize_addresses:
- "115.231.218.73:55310"
- "115.231.218.79:55310"
- "218.16.123.11:55310"
- "218.16.123.27:55310"
# 未来扩展:其他下载器配置
# qmt:
# ...
# tushare:
# token: "your_token_here"
# 行情配置(公用)
market:
kline_periods:
- "1m"
- "5m"
- "15m"
- "30m"
- "60m"
- "1d"
- "1w"
cache_ttl: 60
# 交易配置(公用)
trading:
sessions:
morning:
start: "09:30"
end: "11:30"
afternoon:
start: "13:00"
end: "15:00"
# 服务端口配置(公用)
services:
trading_service:
host: "0.0.0.0"
# QMT交易配置(公用部分)
qmt:
account_type: "STOCK" # STOCK-股票账户, CREDIT-信用账户
·