refactor(ml): extract regime-detection, explainability, paper-trading

- ml-regime-detection (1.2K lines): feature_classifier, hmm modules.
  Depends on ml-core + ml-dqn (RegimeType). 23 tests passing.

- ml-explainability (329 lines): integrated_gradients module.
  Depends on ml-core + candle-core. 4 tests passing.

- ml-paper-trading (389 lines): broker, pnl_tracker modules.
  Depends on ml-ensemble (TradeAction, TradeSignal). 8 tests passing.

Total: 21 sub-crates extracted from ml monolith.
ml reduced from ~260K to ~90K lines (65% extracted).
All tests: 841 ml + 35 in new sub-crates = 876 passing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-03-08 14:20:16 +01:00
parent 4676fe79e2
commit 58f4f26113
17 changed files with 468 additions and 284 deletions

View File

@@ -77,6 +77,7 @@ ml-hyperopt.workspace = true
ml-features.workspace = true
ml-labeling.workspace = true
ml-regime.workspace = true
ml-regime-detection.workspace = true
ml-checkpoint.workspace = true
ml-data-validation.workspace = true
ml-validation.workspace = true
@@ -87,6 +88,8 @@ ml-asset-selection.workspace = true
ml-universe.workspace = true
ml-observability.workspace = true
ml-stress-testing.workspace = true
ml-explainability.workspace = true
ml-paper-trading.workspace = true
config.workspace = true
common = { workspace = true, features = ["questdb"] }
risk = { path = "../risk" }