Wire 8 OFI features (OFI L1/L5, depth imbalance, VPIN, Kyle's lambda, bid/ask slopes, trade imbalance) through the DQN training pipeline: - Add mbp10_data_dir config field to DQNHyperparameters - Dynamic state_dim: 43 (no OFI) or 51 (with OFI) based on config - Compute OFI per bar during data loading, store on trainer - Pass OFI features through regime_features slot in TradingState - Configurable MBP-10 path with recursive .dbn/.dbn.zst discovery - Add zstd auto-detection to DbnParser::parse_mbp10_file() - Add --mbp10-data-dir CLI flag to train_baseline_rl - Fix hardcoded [f64; 51] → FeatureVector51 ([f64; 40]) across examples, walk_forward, GPU memory profile, and test fixtures - Fix stale state_dim=51 in dqn_config_2025() and DQN tests 2747 tests pass, 0 failures. Co-Authored-By: Claude Opus 4.6 <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;