Objective#
Take the Lab 5/6 model stack from backtest to live operation. Two components: a Radar (automated signal engine) and Central Command (TUI approval dashboard).
Radar — Signal Engine#
- Pickle the Lab 6 model — serialize the 4-state HMM so it loads instantly without refitting
- Signal engine — fetch latest SOL candle, compute observation vector, run
predict_proba(), apply entry/exit thresholds, emit typed signal - SQLite schema —
lab7_signals.dbstores signal history with timestamps, regime posteriors, and approval status - Notifier —
lab7_notifier.pyreads config for enabled channels, firesnotify-sendand/or Telegram with formatted message - Cron — engine scheduled at 00:05 UTC daily; manual dry-run forces a signal through the full pipeline
Central Command — TUI#
Built with Textual:
| Panel | Content |
|---|---|
| RegimePanel (left) | 4 color-coded γ_k progress bars + regime trend arrow vs 7-day avg |
| SignalCard (right top) | Current signal: ENTER / EXIT / HOLD with confidence |
| Approve/Reject buttons | Human-in-the-loop gate before any position is taken |
| HistoryTable (bottom) | Full signal log with outcomes |
Design Principle#
The system does not trade automatically. It surfaces the model’s view, shows the regime context, and waits for human confirmation. This keeps the operator in control while removing the burden of watching charts manually.
The Radar fires daily; the operator reviews on their own schedule. Every approved signal is logged with the full regime state for future analysis.