stock-monitor/config/config.yaml

89 lines
1.6 KiB
YAML
Raw Permalink Normal View History

# 数据库配置
database:
host: localhost
port: 3306
user: stock_user
password: stock_password
database: stock_monitor
charset: utf8mb4
# Redis配置
redis:
host: localhost
port: 6379
db: 0
password: null
# 券商API配置
broker:
# 模拟券商配置
mode: simulation
# API配置
api:
base_url: "https://api.example.com"
timeout: 30
retry_count: 3
# 认证配置
auth:
username: ""
password: ""
api_key: ""
secret_key: ""
# 风控参数
risk_control:
# 仓位控制
max_position_ratio: 0.8
single_position_ratio: 0.3
# 止损设置
stop_loss_ratio: 0.05
take_profit_ratio: 0.15
# 回撤控制
max_drawdown_ratio: 0.1
daily_loss_limit: 0.03
# 黑名单
blacklist: []
# 策略参数
strategy:
# 多条件共振
conditions:
price_change_threshold: 0.03
volume_change_threshold: 1.5
money_flow_threshold: 0.02
sentiment_threshold: 0.6
# T+1逻辑
t1_logic:
enabled: true
buy_time_window: ["09:30", "14:30"]
sell_time_window: ["09:31", "15:00"]
# 日志配置
logging:
level: INFO
format: "{time:YYYY-MM-DD HH:mm:ss} | {level} | {name} | {message}"
file: "logs/stock_monitor.log"
rotation: "1 day"
retention: "30 days"
# 监控配置
monitoring:
# 监控指标
metrics:
- position_count
- total_value
- daily_pnl
- drawdown
# 报警配置
alert:
email:
enabled: false
smtp_server: ""
smtp_port: 587
username: ""
password: ""
to_addresses: []
webhook:
enabled: false
url: ""
timeout: 10