- Cast input to weight dtype in DQN residual, rmsnorm, noisy_layers - Set use_gpu=true in QNetworkConfig defaults and all config sites - Resolve BF16 boundary mismatches in attention, curiosity, branching, distributional_dueling across ml-dqn - GPU-resident regime ops with BF16 boundary casts, eliminate .expect() in CUDA paths - Eliminate all Device::Cpu fallbacks — GPU-only across 10 ML crates - PPO: cast logits to F32 before softmax, cast batch tensors to training dtype - Gradient collapse detection for RegimeConditionalDQN - Wire halt_grad_collapse from CUDA guard kernel to halt training - Dead neuron detection uses active network VarMap + squeeze factored readback - Increment gradient_logging_step in GPU PER path - Gradient collapse warmup guards use original buffer_size - Cap training steps per epoch + tracing migration - Replace Tensor::all() with sum_all() for pinned Candle compatibility Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
trading_engine
High-performance execution core for HFT — RDTSC timing, SIMD processing, lock-free data structures.
Key Types
TradingEngine— central execution engineOrderManager— order lifecycle management (placement, execution, cancellation)IbAdapter— Interactive Brokers connectivityIcMarketsAdapter— ICMarkets FIX 4.4 connectivity
Features
- RDTSC for sub-microsecond timing, CPU affinity for dedicated core execution
- SIMD-accelerated data processing
- Lock-free concurrent queues and ring buffers
- Event-sourced architecture for deterministic state reconstruction
- Multi-broker connectivity (IB TWS, ICMarkets)
Usage
use trading_engine::engine::TradingEngine;
let mut engine = TradingEngine::new();
engine.connect_broker(BrokerType::InteractiveBrokers).await?;
let order_id = engine.place_order(order).await?;