Files
foxhunt/crates/common
jgrusewski c318ffa30a fix(ml): 3 hyperopt objective bugs — sliding windows, tanh normalization, adaptive tau
1. Walk-forward windows: replaced 3 non-overlapping with sliding (50% overlap, ~5 windows).
   Aggregation changed from mean-0.5*std to median-0.5*IQR for outlier robustness.

2. Composite score: tanh normalization prevents Calmar ratio scale dominance
   (0.02% drawdowns → values in thousands drowning out Sharpe/Sortino).

3. Q-value overestimation: new Prometheus gauge foxhunt_training_q_overestimation_ratio,
   warning log when ratio>10 or q_mean>5, adaptive tau doubles when Q-mean growth>0.5/epoch
   (capped at 0.01), decays back when stable.

2742 tests pass, 0 failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 02:14:31 +01:00
..

common

Shared types, error handling, and utilities for the Foxhunt HFT ecosystem.

Key Types

  • FoxhuntError — unified error enum with Result alias
  • ModelType — canonical ML model enum (10 primary variants)
  • CircuitBreakerTrait — async circuit breaker interface
  • TlsProtocolVersion, ClientIdentity — TLS configuration types
  • Market data types (Tick, OrderBook) and order types (LimitOrder, MarketOrder)

Modules

  • model_types — canonical ModelType enum re-exported by ml/ and model_loader/
  • resilienceCircuitBreakerTrait async trait
  • tls — TLS types and configuration
  • questdb — QuestDB client configuration

Usage

use common::{FoxhuntError, ModelType};