88 lines
2.1 KiB
YAML
88 lines
2.1 KiB
YAML
# AI Trading Application Configuration
|
|
# This file can be placed at:
|
|
# - ./config.yaml (current directory)
|
|
# - ~/.config/aitrade/config.yaml
|
|
# - /etc/aitrade/config.yaml
|
|
# Or specify with: CONFIG_FILE=/path/to/config.yaml ./aitrade
|
|
|
|
# Interactive Brokers Gateway
|
|
ib_gateway:
|
|
host: 127.0.0.1
|
|
port: 4001 # 4001 for live, 4002 for paper trading
|
|
client_id: 1
|
|
|
|
# Trading Configuration
|
|
trading:
|
|
# Strategy: defensive, normal, aggressive
|
|
strategy: normal
|
|
|
|
# Stop Loss
|
|
stop_loss_enabled: true
|
|
stop_loss_percent: 3.0
|
|
|
|
# Rate Limiting
|
|
max_trades_per_hour: 6
|
|
max_parallel_trades: 5
|
|
pending_time: 300 # Seconds or Go duration (300, "5m", "1h30m")
|
|
|
|
# Dry Run Mode (Paper Trading)
|
|
dry_run: true
|
|
dry_run_balance: 100000.0
|
|
|
|
# Auto Trading
|
|
trading_enabled: true
|
|
trading_interval: 60 # Seconds or Go duration (60, "1m", "5m")
|
|
watch_symbols:
|
|
- AAPL
|
|
- MSFT
|
|
- GOOGL
|
|
- TSLA
|
|
- AMZN
|
|
|
|
# SELL Triggers
|
|
take_profit_percent: 5.0
|
|
hold_time_minutes: 30
|
|
sell_on_negative_sentiment: true
|
|
|
|
# Trade Limits
|
|
max_trade_value: 2000.0 # 0 = unlimited
|
|
|
|
# Database
|
|
database:
|
|
path: ./data/aitrade.db
|
|
|
|
# Web Server
|
|
web:
|
|
host: 0.0.0.0
|
|
port: "8080"
|
|
|
|
# OpenID Connect (Optional)
|
|
oidc:
|
|
enabled: false
|
|
issuer: https://auth.example.com
|
|
client_id: aitrade
|
|
client_secret: your-secret-here
|
|
redirect_url: http://localhost:8080/callback
|
|
scopes:
|
|
- openid
|
|
- profile
|
|
- email
|
|
|
|
# News Aggregation
|
|
news:
|
|
poll_interval: 300 # Seconds or Go duration (300, "5m", "1h")
|
|
api_key: "" # Optional: NewsAPI.org key
|
|
|
|
# LLM Sentiment Scorer (Optional - requires Ollama)
|
|
llm_scorer:
|
|
enabled: false # Set to true to enable LLM-based sentiment
|
|
endpoint: http://localhost:11434
|
|
model_name: mistral # "mistral", "llama2", "llama2:70b"
|
|
timeout: 30 # Seconds or Go duration
|
|
temperature: 0.3 # 0.0-1.0, lower = more deterministic
|
|
max_retries: 2
|
|
ensemble_weight: 0.7 # 0.0-1.0 (1.0 = LLM only, 0.7 = 70% LLM + 30% keyword)
|
|
|
|
# Logging
|
|
log_level: info # debug, info, warn, error
|