Files
foxhunt/.gitignore
jgrusewski cd5aa3402b feat(alpha): wire Phase 1d.3 stacker into smoke — H=600 VERDICT PASS
Phase E.1 Task 12b complete. The H=600 DQN smoke now consumes real
alpha_logit from the Phase 1d.3 stacker (Mamba2 + 7-input MLP stacker
trained for AUC=0.673 on test), and PASSES all four kill criteria:

  Q_SPREAD_EMA         = 10.92    ≥ 0.05      PASS
  ACTION_ENTROPY_EMA   = 1.97     ≥ 1.099     PASS
  RETURN_VS_RANDOM_EMA = +1.043   ≥ 0.0       PASS  ← jumped +3.62σ
  EARLY_Q_MOVEMENT_EMA = 0.099    ≥ 0.01      PASS
  Overall: PASS (H=6000 scale-up VIABLE)

Before/after comparison (same env, same DQN, only alpha_logit changed):

                            alpha_logit=0    alpha_logit=Phase1d.3
  rollout_R_mean (final)        -18,272          -18
  RETURN_VS_RANDOM_EMA          -2.58σ           +1.04σ
  Overall verdict               FAIL             PASS

The 1000× reduction in episode loss + the +3.62σ rvr swing definitively
proves the "first-best-action lock-in" hypothesis from the previous FAIL
analysis was a SYMPTOM, not the cause. The cause was alpha_logit=0
placeholder starving the policy of directional signal. With real Phase
1d.3 alpha, the linear Q-network learns to use it cleanly — no
NoisyNet, no MLP, no architectural change needed.

Integration pieces in this commit:

  1. Cargo workspace registration: ml-alpha added as a workspace dep,
     ml's manifest now depends on ml-alpha for FxCacheReader access.
     (ml-alpha already depends only on ml-core, so no circular risk.)

  2. alpha_dqn_h600_smoke.rs: two new CLI args
       --fxcache-path <PATH>   load snapshots from precomputed fxcache
                               (mid from raw_close, bid/ask synthesized
                               at fixed half-tick, 81-dim features extracted
                               for spread_bps / l1_imbalance / ofi / mid_drift)
       --alpha-cache <PATH>    load Phase 1d.3 stacker logit cache produced
                               by `alpha_train_stacker --alpha-cache-out`.
                               Each cache entry aligns to the corresponding
                               fxcache bar, populates SnapshotRow.alpha_logit
                               (and derives alpha_confidence = |sigmoid(z)-0.5|).

  3. Snapshot source selection: in main(), --fxcache-path takes priority
     when both paths are set; --alpha-cache requires --fxcache-path
     (alignment guarantee). Original --mbp10-dir path unchanged for
     non-cached runs.

  4. Two new helper fns: load_alpha_cache (binary [u32 n] + [f32; n]
     reader), load_snapshots_from_fxcache (FxCacheReader → Vec<SnapshotRow>
     with synthesized bid/ask and alpha_logit/alpha_confidence from cache).

alpha_logits_cache.bin (7.6 MB, 1.97M f32 entries) is .gitignore'd —
regenerable from `cargo run -p ml-alpha --release --example
alpha_train_stacker -- --fxcache-path <FXC> --alpha-cache-out
config/ml/alpha_logits_cache.bin` (~2 min on RTX 3050 Ti).

Reproduction of this PASS verdict:
  cargo run -p ml --release --example alpha_dqn_h600_smoke -- \
    --fxcache-path /home/jgrusewski/Work/foxhunt/test_data/feature-cache/9297....fxcache \
    --alpha-cache config/ml/alpha_logits_cache.bin \
    --horizon 600 --n-episodes 1000

Total run time ~10s after fxcache load. Verdict + per-checkpoint KC
trajectory in config/ml/alpha_dqn_h600_smoke.json.

NEXT: Task 13 — scale to H=6000 (the production horizon). Per the plan,
PASS at H=600 unlocks H=6000.
2026-05-15 16:53:16 +02:00

198 lines
3.0 KiB
Plaintext

# Build artifacts
/target/
target/
# Feature cache (precomputed .fxcache binaries, ~470MB each)
test_data/feature-cache/
/data/feature-cache/
*.fxcache
# IDE files
.vscode/
.idea/
*.swp
*.swo
# OS files
.DS_Store
Thumbs.db
# Logs
*.log
# Environment variables and secrets
.env
.env.*
!.env.example
# Secret files and directories
/config/secrets/
secrets/
*.key
*.pem
*.p12
*.pfx
*.crt
*.cert
# Credential files
credentials.json
credentials.toml
auth.json
auth.toml
ibkr.txt
# Certificate security files
certs/security.env
certs/production.env.template
certs/*.serial
certs/**/*.serial
# API keys and tokens
*api_key*
*token*
*secret*
!*secret*.example
!infra/modules/secrets/
!infra/live/production/secrets/
!infra/k8s/secrets/
!infra/k8s/secrets/*.yaml
!scripts/deploy-secrets.sh
# Database credentials
database.conf
db_config.json
# Temporary files
*.tmp
*.temp
# GPU test artifacts
gpu_test.rs
simd_bench
simd_bench.rs
temp_script.sh
# Build artifacts (additional)
**/*.rs.bk
*.pdb
Cargo.lock
# Coverage reports
tarpaulin-report.html
cobertura.xml
lcov.info
# Benchmark results
target/criterion/
target/bench/
# CI artifacts
.training-generated.yml
audit-results.json
geiger-report.md
security-report.md
outdated.json*.profraw
# Python virtual environments and cache
venv/
.venv/
.venv_databento/
venv_databento/
__pycache__/
*.py[cod]
*.so
.Python
*.egg-info/
.coverage
coverage.xml
htmlcov/
.python-version
# ML model checkpoints and training artifacts
diagnostic_data/
checkpoints/
ml/checkpoints/
ml/trained_models/*.safetensors
ml/trained_models/norm_stats_*.json
ml/trained_models/ppo_fold*.safetensors
ml/trained_models/ppo_fold*.json
ml/ml/
# Removed Windows wrapper files per user request
hive-mind-prompt-*.txt
# Node.js
node_modules/
web-dashboard/dist/
# Git worktrees
.worktrees/
.claude/worktrees/
# Serena (IDE agent)
.serena/
# Claude local state
.claude/settings.local.json
.claude/ralph-loop.local.md
.mcp.json
claude-flow.config.json
.swarm/
.hive-mind/
.claude-flow/
memory/
coordination/
memory/claude-flow-data.json
memory/sessions/*
!memory/sessions/README.md
memory/agents/*
!memory/agents/README.md
coordination/memory_bank/*
coordination/subtasks/*
coordination/orchestration/*
*.db
*.db-journal
*.db-wal
*.sqlite
*.sqlite-journal
*.sqlite-wal
claude-flow
# Terragrunt cache and generated files
.terragrunt-cache/
**/.terragrunt-cache/
.terraform.lock.hcl
**/.terraform.lock.hcl
# Data cache (downloaded market data, not checked in)
data/cache/
# Generated reports and validation artifacts in test_data
test_data/**/*REPORT*
test_data/**/*SUMMARY*
test_data/**/*METADATA*
test_data/**/README.md
test_data/databento/samples/
# Large binary files (prevent repo bloat - use LFS or external storage)
*.dbn
*.dbn.zst
*.safetensors
*.onnx
*.ot
*.pt
*.pth
*.bin
# Load test results
services/*/load_tests/results/
services/*/load_tests/*.json
!services/*/load_tests/package.json
.playwright-mcp/
crates/ml/ml/
# Foxhunt audit hook dedup state (cleared at SessionStart)
.claude/.foxhunt-audit-state
/config/ml/alpha_logits_cache.bin