Remove use_double_dqn, use_dueling, use_per, use_branching,
use_distributional, use_noisy_nets, use_huber_loss, and use_cql
from DQNConfig, DQNHyperparameters, and DqnParams structs.
These features are always enabled (Rainbow DQN standard). The boolean
flags were dead code — every constructor set them to true, and the
only code paths that set them to false were in tests that disabled
features for simplicity. With the fields removed, the features are
unconditionally active, eliminating ~490 lines of dead configuration.
Key changes:
- Struct field declarations removed from 3 core config structs
- Conditional branches (if use_X { ... } else { ... }) simplified:
dueling/branching/PER network creation is now unconditional
- Checkpoint metadata hardcodes "true" for backward compatibility
- Hyperopt search space index 11 (use_branching) fixed at 1.0
- TOML/YAML config files cleaned of removed fields
- Tests that toggled these flags updated or rewritten
45 files changed, -487 net lines. Zero new test failures.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
trading_service
Core execution engine for order placement, position keeping, risk integration, and real-time P&L tracking.
Key Types
TradingServiceImpl-- main gRPC serviceOrderExecutor-- high-throughput order handlingPositionManager-- real-time position and P&L trackingRiskIntegration-- pre-trade and post-trade compliance
gRPC Endpoints
PlaceOrder-- submit new ordersCancelOrder-- cancel existing ordersGetPosition-- query current positionsSubscribeMarketData-- market data feedsGetPnlUpdates-- real-time P&L updates
Configuration
GRPC_PORT-- gRPC listen portDATABASE_URL-- PostgreSQL connection stringTLS_ENABLED-- enable TLS 1.3 (default: false)TLS_CERT_PATH,TLS_KEY_PATH,TLS_CA_PATH-- TLS certificatesTLS_REQUIRE_CLIENT_CERT-- mutual TLS (default: false)
Testing
SQLX_OFFLINE=true cargo test -p trading_service --lib