new overhaul
This commit is contained in:
161
config.yaml
161
config.yaml
@ -1,6 +1,6 @@
|
||||
# Trading System Configuration
|
||||
# Enhanced Multi-Modal Trading System Configuration
|
||||
|
||||
# Trading Symbols (extendable)
|
||||
# Trading Symbols (extendable/configurable)
|
||||
symbols:
|
||||
- "ETH/USDT"
|
||||
- "BTC/USDT"
|
||||
@ -22,22 +22,38 @@ data:
|
||||
historical_limit: 1000
|
||||
real_time_enabled: true
|
||||
websocket_reconnect: true
|
||||
feature_engineering:
|
||||
technical_indicators: true
|
||||
market_regime_detection: true
|
||||
volatility_analysis: true
|
||||
|
||||
# CNN Model Configuration
|
||||
# Enhanced CNN Configuration
|
||||
cnn:
|
||||
window_size: 20
|
||||
features: ["open", "high", "low", "close", "volume"]
|
||||
hidden_layers: [64, 32, 16]
|
||||
timeframes: ["1m", "5m", "15m", "1h", "4h", "1d"]
|
||||
hidden_layers: [64, 128, 256]
|
||||
dropout: 0.2
|
||||
learning_rate: 0.001
|
||||
batch_size: 32
|
||||
epochs: 100
|
||||
confidence_threshold: 0.6
|
||||
early_stopping_patience: 10
|
||||
model_dir: "models/enhanced_cnn"
|
||||
# Timeframe-specific model weights
|
||||
timeframe_importance:
|
||||
"1m": 0.05 # Noise filtering
|
||||
"5m": 0.10 # Short-term momentum
|
||||
"15m": 0.15 # Entry/exit timing
|
||||
"1h": 0.25 # Medium-term trend
|
||||
"4h": 0.25 # Stronger trend confirmation
|
||||
"1d": 0.20 # Long-term direction
|
||||
|
||||
# RL Agent Configuration
|
||||
# Enhanced RL Agent Configuration
|
||||
rl:
|
||||
state_size: 100 # Will be calculated dynamically
|
||||
state_size: 100 # Will be calculated dynamically based on features
|
||||
action_space: 3 # BUY, HOLD, SELL
|
||||
hidden_size: 256
|
||||
epsilon: 1.0
|
||||
epsilon_decay: 0.995
|
||||
epsilon_min: 0.01
|
||||
@ -46,22 +62,79 @@ rl:
|
||||
memory_size: 10000
|
||||
batch_size: 64
|
||||
target_update_freq: 1000
|
||||
buffer_size: 10000
|
||||
model_dir: "models/enhanced_rl"
|
||||
# Market regime adaptation
|
||||
market_regime_weights:
|
||||
trending: 1.2 # Higher confidence in trending markets
|
||||
ranging: 0.8 # Lower confidence in ranging markets
|
||||
volatile: 0.6 # Much lower confidence in volatile markets
|
||||
# Prioritized experience replay
|
||||
replay_alpha: 0.6 # Priority exponent
|
||||
replay_beta: 0.4 # Importance sampling exponent
|
||||
|
||||
# Orchestrator Settings
|
||||
# Enhanced Orchestrator Settings
|
||||
orchestrator:
|
||||
# Model weights for decision combination
|
||||
cnn_weight: 0.7 # Weight for CNN predictions
|
||||
rl_weight: 0.3 # Weight for RL decisions
|
||||
confidence_threshold: 0.5 # Minimum confidence to act
|
||||
decision_frequency: 60 # Seconds between decisions
|
||||
confidence_threshold: 0.6 # Increased for enhanced system
|
||||
decision_frequency: 30 # Seconds between decisions (faster)
|
||||
|
||||
# Multi-symbol coordination
|
||||
symbol_correlation_matrix:
|
||||
"ETH/USDT-BTC/USDT": 0.85 # ETH-BTC correlation
|
||||
|
||||
# Perfect move marking
|
||||
perfect_move_threshold: 0.02 # 2% price change to mark as significant
|
||||
perfect_move_buffer_size: 10000
|
||||
|
||||
# RL evaluation settings
|
||||
evaluation_delay: 3600 # Evaluate actions after 1 hour
|
||||
reward_calculation:
|
||||
success_multiplier: 10 # Reward for correct predictions
|
||||
failure_penalty: 5 # Penalty for wrong predictions
|
||||
confidence_scaling: true # Scale rewards by confidence
|
||||
|
||||
# Training Configuration
|
||||
training:
|
||||
learning_rate: 0.001
|
||||
batch_size: 32
|
||||
epochs: 100
|
||||
validation_split: 0.2
|
||||
early_stopping_patience: 10
|
||||
|
||||
# CNN specific
|
||||
cnn_training_interval: 21600 # Train every 6 hours
|
||||
min_perfect_moves: 200 # Minimum moves before training
|
||||
|
||||
# RL specific
|
||||
rl_training_interval: 3600 # Train every hour
|
||||
min_experiences: 100 # Minimum experiences before training
|
||||
training_steps_per_cycle: 10 # Training steps per cycle
|
||||
|
||||
# Trading Execution
|
||||
trading:
|
||||
max_position_size: 0.1 # Maximum position size (fraction of balance)
|
||||
max_position_size: 0.05 # Maximum position size (5% of balance)
|
||||
stop_loss: 0.02 # 2% stop loss
|
||||
take_profit: 0.05 # 5% take profit
|
||||
trading_fee: 0.0002 # 0.02% trading fee
|
||||
min_trade_interval: 60 # Minimum seconds between trades
|
||||
min_trade_interval: 30 # Minimum seconds between trades (faster)
|
||||
|
||||
# Risk management
|
||||
max_daily_trades: 20 # Maximum trades per day
|
||||
max_concurrent_positions: 2 # Max positions across symbols
|
||||
position_sizing:
|
||||
confidence_scaling: true # Scale position by confidence
|
||||
base_size: 0.02 # 2% base position
|
||||
max_size: 0.05 # 5% maximum position
|
||||
|
||||
# Memory Management
|
||||
memory:
|
||||
total_limit_gb: 8.0 # Total system memory limit
|
||||
model_limit_gb: 2.0 # Per-model memory limit
|
||||
cleanup_interval: 1800 # Memory cleanup every 30 minutes
|
||||
|
||||
# Web Dashboard
|
||||
web:
|
||||
host: "127.0.0.1"
|
||||
@ -69,37 +142,55 @@ web:
|
||||
debug: false
|
||||
update_interval: 1000 # Milliseconds
|
||||
chart_history: 100 # Number of candles to show
|
||||
|
||||
# Enhanced dashboard features
|
||||
show_timeframe_analysis: true
|
||||
show_confidence_scores: true
|
||||
show_perfect_moves: true
|
||||
show_rl_metrics: true
|
||||
|
||||
# Logging
|
||||
logging:
|
||||
level: "INFO"
|
||||
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
||||
file: "logs/trading.log"
|
||||
file: "logs/enhanced_trading.log"
|
||||
max_size: 10485760 # 10MB
|
||||
backup_count: 5
|
||||
|
||||
# Component-specific logging
|
||||
orchestrator_level: "INFO"
|
||||
cnn_level: "INFO"
|
||||
rl_level: "INFO"
|
||||
training_level: "INFO"
|
||||
|
||||
# Model Directories
|
||||
model_dir: "models"
|
||||
data_dir: "data"
|
||||
cache_dir: "cache"
|
||||
logs_dir: "logs"
|
||||
|
||||
# GPU/Performance
|
||||
performance:
|
||||
use_gpu: true
|
||||
mixed_precision: true
|
||||
num_workers: 4
|
||||
batch_size_multiplier: 1.0
|
||||
gpu:
|
||||
enabled: true
|
||||
memory_fraction: 0.8 # Use 80% of GPU memory
|
||||
allow_growth: true # Allow dynamic memory allocation
|
||||
|
||||
# Monitoring and Alerting
|
||||
monitoring:
|
||||
tensorboard_enabled: true
|
||||
tensorboard_log_dir: "logs/tensorboard"
|
||||
metrics_interval: 300 # Log metrics every 5 minutes
|
||||
performance_alerts: true
|
||||
|
||||
# Performance thresholds
|
||||
min_confidence_threshold: 0.3
|
||||
max_memory_usage: 0.9 # 90% of available memory
|
||||
max_decision_latency: 10 # 10 seconds max per decision
|
||||
|
||||
# Paths
|
||||
paths:
|
||||
models: "models"
|
||||
data: "data"
|
||||
logs: "logs"
|
||||
cache: "cache"
|
||||
plots: "plots"
|
||||
|
||||
# Training Configuration
|
||||
training:
|
||||
use_only_real_data: true # CRITICAL: Never use synthetic/generated data
|
||||
batch_size: 32
|
||||
learning_rate: 0.001
|
||||
epochs: 100
|
||||
validation_split: 0.2
|
||||
early_stopping_patience: 10
|
||||
|
||||
# Directory paths
|
||||
# Backtesting (for future implementation)
|
||||
backtesting:
|
||||
start_date: "2024-01-01"
|
||||
end_date: "2024-12-31"
|
||||
initial_balance: 10000
|
||||
commission: 0.0002
|
||||
slippage: 0.0001
|
Reference in New Issue
Block a user