# Best Hyperparameters for ML Models # # These hyperparameters are the result of Optuna tuning studies # or manual optimization. Update this file when better parameters # are discovered through tuning or experimentation. # # Last Updated: 2025-10-14 # Tuning Method: Manual (defaults based on research) # Next Tuning: 2025-01-15 (post-Q4 retraining) # DQN (Deep Q-Network) dqn: learning_rate: 0.0001 batch_size: 128 gamma: 0.99 epsilon_start: 1.0 epsilon_end: 0.01 epsilon_decay: 0.995 buffer_size: 100000 epochs: 200 checkpoint_frequency: 20 early_stopping_enabled: true q_value_floor: 0.5 min_loss_improvement_pct: 2.0 plateau_window: 30 min_epochs_before_stopping: 50 # Tuning notes: # - Batch size 128 optimal for RTX 3050 Ti (4GB VRAM) # - Learning rate 0.0001 provides stable convergence # - Epsilon decay 0.995 balances exploration vs exploitation # PPO (Proximal Policy Optimization) ppo: learning_rate: 0.0003 batch_size: 64 gamma: 0.99 gae_lambda: 0.95 clip_epsilon: 0.2 value_loss_coef: 0.5 entropy_coef: 0.01 epochs: 200 checkpoint_frequency: 20 early_stopping_enabled: true min_loss_improvement_pct: 1.5 plateau_window: 30 # Tuning notes: # - Batch size 64 to fit both actor and critic in GPU memory # - Clip epsilon 0.2 standard PPO value # - Entropy coef 0.01 encourages exploration # MAMBA-2 (State Space Model) mamba2: learning_rate: 0.0001 batch_size: 32 gamma: 0.99 state_size: 16 d_model: 128 n_layers: 4 expansion_factor: 2 epochs: 150 checkpoint_frequency: 15 early_stopping_enabled: true min_loss_improvement_pct: 2.5 plateau_window: 20 # Tuning notes: # - Batch size 32 due to large model size (150-500MB) # - State size 16 captures sufficient market dynamics # - 4 layers provides good depth without overfitting # TFT (Temporal Fusion Transformer) tft: learning_rate: 0.001 batch_size: 64 gamma: 0.99 hidden_size: 128 num_heads: 4 num_layers: 3 dropout: 0.1 epochs: 100 checkpoint_frequency: 10 early_stopping_enabled: true min_loss_improvement_pct: 2.0 plateau_window: 15 # Tuning notes: # - Higher learning rate 0.001 works well for TFT # - 4 attention heads balance computation vs capacity # - Dropout 0.1 prevents overfitting on financial data # TLOB (Temporal Limit Order Book) tlob: # TLOB is inference-only (rules-based engine) # No training hyperparameters needed inference_only: true features: - price_levels: 10 - volume_imbalance: true - microstructure_features: 51 notes: | TLOB model does not require training. It uses rules-based microstructure analytics on Level-2 order book data. Training would require tick-by-tick order book snapshots, which are not currently available in our data pipeline. # LIQUID (Liquidity Neural Network) liquid: learning_rate: 0.0005 batch_size: 64 gamma: 0.99 hidden_size: 64 num_liquid_layers: 2 epochs: 120 checkpoint_frequency: 12 early_stopping_enabled: true # Tuning notes: # - Liquid networks are efficient, can use moderate batch size # - 2 liquid layers provide good temporal dynamics # Global Training Settings global: device: "cuda" # Use GPU if available, fallback to CPU precision: "fp32" # fp32 for stability, fp16 for speed (if GPU supports) gradient_clipping: 1.0 # Prevent exploding gradients weight_decay: 0.0001 # L2 regularization seed: 42 # For reproducibility num_workers: 4 # Data loading parallelism pin_memory: true # Faster GPU transfer # Quality Gate Thresholds quality_gates: min_sharpe: 1.5 min_win_rate: 0.55 max_drawdown: 0.25 min_trades: 100 min_profit_factor: 1.3 # Data Configuration data: training_split: 0.7 # 70% training validation_split: 0.15 # 15% validation test_split: 0.15 # 15% test (holdout) sequence_length: 100 # For sequential models (MAMBA, TFT) lookback_window: 50 # Technical indicator lookback symbols: - ES.FUT # E-mini S&P 500 - NQ.FUT # Nasdaq-100 futures - ZN.FUT # 10-Year Treasury Note - 6E.FUT # Euro FX futures # Checkpoint Configuration checkpoints: compression: "zstd" # Compress checkpoints to save space format: "safetensors" # Use SafeTensors format (Hugging Face standard) max_checkpoints_per_model: 5 # Keep last 5 checkpoints per model auto_cleanup: true # Delete old checkpoints automatically validate_checksums: true # Verify integrity with SHA-256 # Optuna Tuning Configuration (for future tuning runs) optuna: n_trials: 50 timeout_seconds: 28800 # 8 hours max per tuning session study_name_prefix: "foxhunt" sampler: "TPE" # Tree-structured Parzen Estimator pruner: "MedianPruner" # Early stop poor trials objective: "sharpe_ratio" # Optimize for risk-adjusted returns direction: "maximize" n_jobs: 1 # Sequential trials (GPU memory constraint) storage: "postgresql://foxhunt:foxhunt_dev_password@localhost:5432/foxhunt"