CATASTROPHIC fixes: 1. TX cost missing *0.0001f bps conversion — trades cost $17K instead of $1 2. Backtest action decode: raw factored int→800% exposure (should decode exposure_idx) 3. State mismatch: training 66 features, backtest 45 — Q-values at eval were garbage 4. Position scaling disabled: CVaR/conviction/Kelly destroyed credit assignment Monitoring fixes: 5. Q-value labels: 5-element array→9-element for 9-action exposure space 6. Monitoring kernel: add common_device_functions.cuh for DQN_ORDER_ACTIONS defines 7. Backtest metrics: factored action decode for buy/sell/hold classification 8. Backtest gather: add common_device_functions.cuh for MARKET_DIM/PORTFOLIO_DIM Result: agent now trades 71K times (was 1) with all 9 exposure levels explored. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ml
10-model ML ensemble for the Foxhunt HFT system, built on Candle v0.9.1.
Models
- DQN (Rainbow) — deep Q-network with prioritized replay, dueling heads, noisy nets
- PPO — proximal policy optimization with GAE, LSTM policies, clip-higher
- TFT — temporal fusion transformer for multi-horizon forecasting
- Mamba2 — state space model for sequence prediction
- Liquid Networks — biologically inspired networks for non-stationary data
- TLOB — transformer-based limit order book analysis
- KAN — Kolmogorov-Arnold networks
- xLSTM — extended LSTM architecture
- TGGN — temporal graph neural network
- Diffusion — diffusion-based generative model
Key Modules
ensemble— model ensemble coordination and confidence aggregationhyperopt— PSO-based hyperparameter optimization with per-model adapterstrainers— unified training loops (DQN, PPO, supervised)inference—InferenceAdaptertrait for predictioncheckpoint— model checkpointing and restorationevaluation— walk-forward evaluation pipeline
Usage
use ml::dqn::DQN;
use ml::ppo::PpoTrainer;