3.4 KiB
Smart Money Rebuild Plan
Living implementation tracker for the rules-first smart-money rebuild. Issue tracking remains in bd; this file records migration state, acceptance criteria, and handoff notes.
Phase Checklists
Phase 1: Contracts and Storage
- Add
SmartMoneyEventcontract inpackages/types. - Add typed features, profile scores, abstention, and suppression metadata.
- Extend
AlertEventwith optional profile metadata. - Add
smart_money_eventsClickHouse storage helpers. - Add bus/live channel names for smart-money events.
Acceptance: smart-money events round-trip through schema/storage helpers and alerts remain backward-compatible.
Phase 2: Parent-Event Reconstruction
- Add
services/compute/src/parent-events.ts. - Convert existing
FlowPacketclusters and structure packets into deterministic parent events. - Emit deterministic event IDs from packet identity.
- Preserve bridge semantics while
FlowPacketremains an intermediate artifact.
Acceptance: live and replay produce the same event ID for the same packet.
Phase 3: Feature Engineering
- Build typed features for aggressor mix, spread/quote quality, timing, strike concentration, DTE, moneyness, structure markers, and event alignment fields.
- Keep batch-only validation fields out of live scoring.
- Connect an external event-calendar feed through
services/refdata.
Acceptance: missing event-calendar fields produce neutral null feature values and do not block scoring.
Phase 4: Rules Engine
- Score the six primary profiles.
- Return probabilities, confidence bands, directions, reason codes, and suppression reasons.
- Add false-positive guards for stale quotes, complex/special prints, retail-frenzy directional suppression, hedge-reactive 0-2 DTE ATM contexts, and arbitrage symmetry.
Acceptance: abstained events do not emit legacy classifier hits.
Phase 5: Synthetic Market Redesign
- Rework synthetic options adapter around labeled parent-event templates.
- Add deterministic scenario families for all six profiles.
- Add test/demo operating modes with hidden labels.
Acceptance: scenario tests assert intended profile wins and wrong nearby profiles remain below threshold.
Phase 6: Compute, API, and UI Rollout
- Emit
SmartMoneyEventfirst in compute. - Derive compatibility
ClassifierHitEventandAlertEvent. - Add REST/history/replay/ws/live support for smart-money events.
- Migrate terminal UI to profile-aware display.
Acceptance: old classifier and alert endpoints still work while /flow/smart-money, /history/smart-money, /replay/smart-money, and /ws/smart-money expose the new model.
Phase 7: Evaluation and Replay
- Add deterministic unit tests for parent-event scoring and storage.
- Add replay-style live-vs-batch consistency tests.
- Add evaluation utilities for calibration, abstention rate, and economic sanity checks.
Migration Notes
FlowPacketremains the packet/cluster bridge and is no longer the final semantic alert object.ClassifierHitEventis now a compatibility surface derived fromSmartMoneyEvent.primary_profile_id.AlertEventkeeps existing fields and may includeprimary_profile_idplusprofile_scores.- Existing structure labels such as vertical, straddle, roll, and 0DTE gamma are evidence/reason concepts rather than final business-facing profile IDs.