f7fc83879e106bfbe473319669ffd04d858303b0
Workflow `train-bw28b` on sp20-aux-h-fixed @ 71eab9a25 terminated at
epoch=1 end after 56m wall-clock per
`feedback_kill_runs_on_anomaly_quickly`.
Epoch 1: 490399 trades, 246196 wins, 244203 losses, PF=0.946 — WR =
50.20% (vs Phase 1 = 50.21%, Δ = -0.01pp). Squarely in the runbook's
pre-declared falsification band.
Mechanistic finding (stronger than just "WR didn't move"): the
action distribution is essentially bit-identical across Phase 1
([0,1] / sentinel 0.5) and Phase 2 ([-1,+1] / sentinel 0.0)
encodings — drift < 0.5% on every action bin (run-to-run noise
floor). The policy made the SAME action choices regardless of slot
121's encoding. State[121] has zero behavioral effect on action
selection in either encoding. `pred_tanh = 0.66` in both phases
confirms the aux head IS producing strongly directional predictions
and the bridge IS conducting them — the policy is just ignoring
them entirely.
Hypothesis refinement (vs Phase 2 spec's "encoder can't extract
directional alpha in 3 epochs"): the encoder's weights for state[121]
are effectively zero. This dim was added by H6 with only 3 epochs of
training, while the first 121 dims have had thousands of training
steps to develop meaningful weights. Slot 121's gradient leverage is
dwarfed by the trained dims regardless of input magnitude. This is a
new-dim cold-start weight-init problem, not an encoding problem.
Implication: amplitude scaling (Phase 2 spec's fallback suggestion)
won't help — encoder weights are already near-zero, gradient
propagation through them stays near-zero regardless of input scale.
The deeper fix routes aux signal through a path that BYPASSES the
cold-encoder problem.
Phase 2 wiring stays merged per `feedback_no_functionality_removal`:
the recentered encoding is the better choice on principle (matches
`pearl_first_observation_bootstrap`) even when the bridge isn't
producing measurable WR effect.
Pivot to H6 Phase 3 (combined per
`pearl_no_deferrals_for_complementary_fixes`):
- (α) Bypass-head: small linear head `aux_dir_prob → Q_dir_bias`
summed into Q_dir output post-encoder (parallel skip connection).
- (β) Aux→Q-target shaping: inject aux conviction into the Bellman
target at trade-close events. Event-driven per
`pearl_event_driven_reward_density_alignment`; bypasses the
encoder entirely via the training-signal path.
Distinct mechanisms, non-overlapping refactor scopes — pearl
prescribes one atomic plan.
Refs
────
- docs/plans/2026-05-12-sp22-h6-phase2-recenter.md (Phase 2 spec)
- pearl_first_observation_bootstrap (Phase 2 encoding rationale)
- pearl_event_driven_reward_density_alignment (β motivation)
- pearl_no_deferrals_for_complementary_fixes (combined plan)
- feedback_no_functionality_removal (keep Phase 2 wiring merged)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…
…
…
…
…
…
…
Foxhunt
Production HFT trading system in Rust.
Architecture
The workspace contains 32 crates organized as follows:
Core Libraries (16)
| Crate | Purpose |
|---|---|
trading_engine |
Order processing, FIX 4.4, IB TWS, SIMD, RDTSC timing |
risk |
VaR, Kelly, circuit breakers, kill switches, compliance |
risk-data |
Risk data types and shared structures |
trading-data |
Trading data types |
ml |
DQN Rainbow, PPO, TFT, Mamba2, ensemble inference |
ml-data |
ML data types and feature definitions |
data |
Market data ingestion and storage |
backtesting |
Replay engine, strategy tester |
adaptive-strategy |
Ensemble execution, microstructure analysis |
common |
Shared types, resilience, error handling |
storage |
S3 and local model storage |
model_loader |
Model serialization and loading |
market-data |
Market data feed handlers |
database |
PostgreSQL access layer (SQLx) |
config |
Configuration management |
tli |
CLI commands and tooling |
Services (8)
| Service | Purpose |
|---|---|
backtesting_service |
gRPC backtesting service |
broker_gateway_service |
FIX routing, broker connectivity |
trading_service |
Core trading operations |
ml_training_service |
Model training orchestration |
data_acquisition_service |
Market data acquisition |
trading_agent_service |
Autonomous trading agents |
api_gateway |
gRPC API gateway with auth |
web-gateway |
Axum REST + WebSocket gateway |
Frontend
web-dashboard/ -- React 19 + TypeScript + Vite + TradingView charts.
Building
# Check compilation (no PostgreSQL required)
SQLX_OFFLINE=true cargo check --workspace
# Run tests for a specific crate
SQLX_OFFLINE=true cargo test -p <crate> --lib
# Clippy
SQLX_OFFLINE=true cargo clippy --workspace
ML Models
Four production model architectures on Candle v0.9.1 with CUDA:
- DQN Rainbow -- Deep Q-Network with prioritized replay, dueling heads, noisy nets
- PPO -- Proximal Policy Optimization with GAE and LSTM policies
- TFT -- Temporal Fusion Transformer for multi-horizon forecasting
- Mamba2 -- State space model for sequence prediction
Each model has a standalone trainer and a UnifiedTrainable adapter for the hyperopt pipeline.
Infrastructure
- Git: Gitea at
git.fxhnt.ai(Tailscale-only), Scaleway DEV1-S - Observability: OpenTelemetry OTLP (env
OTEL_EXPORTER_OTLP_ENDPOINT) - Database: PostgreSQL with SQLx offline mode for CI
License
Proprietary. All rights reserved.
Description
Languages
Rust
88.2%
Cuda
7.7%
Python
1.3%
Shell
1.1%
PLpgSQL
0.8%
Other
0.8%