Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.novosky.app/llms.txt

Use this file to discover all available pages before exploring further.

Current state β€” Phase 17.3

DimensionValue
Signal model62 features Β· RF+XGB+LGB Β· 3-class Β· M15 Β· Optuna-tuned Β· recency-weighted
OOS (37d)WR 71.7% Β· PF 5.46 Β· MaxDD 4.5% Β· Sharpe 59.54 Β· Return +195.7% Β· Score 54.47
OOS (224d)WR 57.4% Β· PF 2.21 Β· MaxDD 50.2% (long-range reference)
Position model71 features Β· ATR-aware labels Β· exit_threshold=0.80
Training cutoff2026-05-06 Β· Hugging Face Hub tag v20260506
InfrastructureONNX inference Β· Hugging Face Hub Β· Supabase sync
Incremental trainingWarmstart enabled by default (LGB+XGB continuation, RF tree-append)

Q2 2026 (Apr – Jun) β€” Production hardening + quick wins

Items ordered by implementation impact and dependency.
PriorityPhaseItem
Done15Broker-agnostic refactor β€” dynamic MT5 API, backtest.py, sweep.py
Critical15VM cron β€” weekly_optimize.py (Sunday 02:00 UTC)
Critical15Broker safety audit β€” python scripts/check_broker_limits.py
Done16RF double-weighting fix β€” removed class_weight='balanced' from constructors
Done16TP corrected 0.8β†’1.2Γ—ATR β€” R:R now 1.2, breakeven WR=45.5%
Done16Label/live alignment β€” labels now use atr_tp_mult=1.2, atr_sl_mult=1.0
Done16Risk model β€” Kelly log-utility label function + sequence augmentation (~5,000 samples)
High16Enable max_daily_loss guard β€” already built, set to 15 USD in config
Done16Equity curve filter β€” 10-trade rolling drawdown pause
Done16Walk-forward OOS gate β€” 3 OOS folds, WR/PF gate in weekly_optimize.py
Done16Enable Kelly lot sizing β€” half-Kelly (0.5 fraction) enabled; MaxDD 16.1%β†’7.5%
Done21ml_sltp β€” validated OOS; disabled (degraded Score); re-evaluate with more live data
Done21Trailing stop + min_bars_held sweep β€” both tested; trailing disabled, bars4 optimal
Done18Calibrated probability outputs β€” isotonic calibration live for all 3 signal models
Medium16Multi-account MVP β€” --account flag, per-account state_{account}.json

Q3 2026 (Jul – Sep) β€” Feature expansion + model architecture

PriorityPhaseItem
High17funding_rate + oi_change features (Binance REST) β€” retrain + OOS gate
High17volatility_regime + w1_ema_bias / w1_rsi_norm β€” OHLCV-derived, no external API
High17OHLCV data redundancy β€” yfinance + OKX REST as gap-fill sources
High18Stacked meta-learner β€” replace majority-vote; strict OOS gate: Score β‰₯ current + 1.0
High21M1 intra-candle features for position model β€” 5 features, requires retrain
High21Catastrophic SL / position-as-primary-exit β€” gated on 21.1/21.2 + EXIT precision β‰₯ 87%
Medium18Regime-switching model β€” trending vs ranging via ADX; gated on β‰₯ 20k samples per segment
Done19API failover β€” SAFE_PAUSE after 3 consecutive failures
Done19Graceful shutdown β€” finish-cycle exit instead of hard sys.exit(0)
Medium19Config hot-reload β€” poll config.json mtime per cycle

Q4 2026 (Oct – Dec) β€” Multi-asset expansion

PriorityPhaseItem
High19Live Streamlit dashboard β€” equity curve + open positions from Supabase
High18XAUUSD model β€” separate model stack, gold-specific ATR scaling, OOS PF > 2.0 gate
Medium16Multi-account fully wired β€” at least 2 brokers running simultaneously

Q1 2027 (Jan – Mar) β€” Multi-asset live + revenue

PriorityPhaseItem
High18EURUSD model β€” pip-based P&L, tighter spreads, forex news calendar
High18Multi-instrument live trading (BTCUSD + XAUUSD simultaneously)
Medium17fear_greed_index β€” daily sentiment (96 identical M15 values; monitor SHAP weight)
Medium19Per-instrument dashboards and Telegram alerts

Milestones

M1 β€” Full production hardening (target: May 2026)

Goal: zero-touch live operation with monitoring, alerts, and auto-maintenance.
  • Score >= 15.0 (achieved: 21.34 in Phase 15, Phase 16 OOS WR=65.8% PF=3.03, Phase 17.2 weekly Score=35.13, Phase 17.3 weekly Score=18.48)
  • Position model live with conservative thresholds
  • Weekly auto-retrain cron running on trading VM (code done β€” VM wiring pending)
  • PM2 performance monitor running every 4h (code done β€” VM wiring pending)
  • Telegram bot commands operational
  • Broker safety audit completed (docs done β€” live run pending)
  • max_daily_loss guard enabled (config change only)
  • Equity curve filter implemented and live
  • Walk-forward OOS gate wired into weekly_optimize.py
  • Weekly Score review cadence: Score < 10 β†’ retrain, Score < 6 β†’ pause
Pass criteria: Bot runs 7d without manual intervention; Telegram alert fires on simulated degradation.

M2 β€” Dynamic SL/TP + position model upgrades (target: Jun 2026)

Goal: confidence-aware exits that outperform the current static 1:0.8 RR.
  • Calibrated probability outputs live (isotonic calibration on all 3 signal models)
  • ml_sltp validated OOS β€” result: disabled (best combo Score=0.29 vs baseline 0.30; re-evaluate with more live data)
  • Trailing stop validated OOS β€” result: disabled (Scoreβ‰ˆ0.19; conflicts with partial-close breakeven SL)
  • min_bars_held sweep completed β€” optimal reverted to 4 bars post clean retrain (Score=0.66)
  • Kelly lot sizing enabled and compared OOS β€” half-Kelly (0.5) kept; MaxDD 16.1%β†’7.5%
Pass criteria: OOS Score β‰₯ 22.0 β€” not yet met (ml_sltp and trailing stop degraded OOS; re-evaluate after M3 feature upgrade).

M3 β€” Signal intelligence upgrade (target: Aug 2026)

Goal: measurably better OOS accuracy through new features and a better combiner.
  • funding_rate + oi_change features retrained and swept
  • volatility_regime + W1 features retrained and swept
  • Stacked meta-learner deployed (OOS Score β‰₯ current + 1.0)
  • Walk-forward: 3+ OOS folds, all WR > 55%, PF > 1.8
  • M1 intra-candle features for position model retrained and swept
Pass criteria: OOS Score β‰₯ 22.0 on 37d window; position model EXIT precision β‰₯ 86%.

M4 β€” Multi-asset live (target: Q4 2026 – Q1 2027)

Goal: second live trading instrument + multi-account operation.
  • XAUUSD model validated (OOS PF > 2.0) and live
  • EURUSD model in development (Q1 2027 target)
  • Regime-switching model deployed (if OOS gates pass)
  • Multi-account trading operational (at least 2 broker accounts)
Pass criteria: XAUUSD running live alongside BTCUSD; multi-account stable for 30d.

What was removed and why

The following items were in earlier roadmap drafts and have been removed.
ItemReason
Optuna 150 trials + MedianPrunerMedianPruner already active in both tune files. Trials are a --trials flag β€” use --trials 100 for architecture changes. Not a phase item.
Online/incremental weekly updatesAlready built. Warmstart mode enabled by default in ml/train.py and ml/ensemble_trainer.py.
Confidence-based lot tiers (60/70/80%)Kelly already does this continuously and mathematically. Discrete tiers are a cruder approximation.
Ensemble weighting by recencyWalk-forward already handles recency more robustly. Recency weighting adds a tuneable parameter with overfit risk.
corr_spy_20 / corr_dxy_20BTC–SPY/DXY correlation at M15 changes regimes frequently. Would overfit to the 2020–2026 macro correlation period.
liq_distance_buy/sell (Coinglass)Historical liquidation data is non-standardized, exchange-dependent, and not reliably reproducible for backtesting. High lookahead risk.
dom_sin / dom_cosNo statistically meaningful monthly seasonality in BTC M15 data. Weak signal, overfit risk.
Synthetic OFIWithout level-2 order book data, any OFI proxy is a linear combination of OHLCV features the model already has. Redundant.
h4_macd_hist / d1_macd_histh4_macd_dir already in feature set. Histogram adds a fine-grained continuous variable over a direction signal β€” marginal gain, overfit surface.
Options skew (Deribit 25D RR)Sparse historical data, evolving market structure, unclear relationship to M15 BTCUSD direction. Very high overfit risk.
Grafana + InfluxDBSupabase already handles storage and sync. Adding a second metrics pipeline is premature complexity for the current scale.
TradingView as OHLCV sourceToS violation risk; scrapers break silently. Use official REST APIs only (yfinance, OKX, Binance).

Score formula

All retrains and config sweeps are ranked by:
Score = WR x PF / sqrt(MaxDD)
ScoreInterpretation
< 6.0Pause live trading β€” manual review required
6.0–10.0Operational but below target β€” trigger retrain
10.0–15.0Production-grade
> 15.0Excellent β€” Phase 15: 21.34 (37d OOS); Phase 16w: 46.80 (WR=62.8%); Phase 17.2w: 35.13 (WR=67.6%, PF=2.83); Phase 17.3w: 54.47 (WR=71.7%, PF=5.46)

Version history

PhaseDateKey changeOOS Score
1–42025Initial ML model, SHAP, ATR labelingβ€”
5–82025Phase 8 position model, Kelly sizingβ€”
9–112026-04-11M15 timeframe, 53 features, MTF ladder~4.5
122026-04-11ADX filter, spread fix, OOS contamination fix~5.1
132026-04-1255 features, news_surprise/bars_since_news, Optuna retune~3.5
142026-04-13Config sweep, TP=0.8xATR, risk=2%, conf=0.6015.49
152026-04-15Position model ATR-aware retrain, threshold sweep21.34
162026-04-24RF double-weighting fix, TP 0.8β†’1.2Γ—ATR, label/live alignment, Kelly risk modelWR=65.8% PF=3.03
16w2026-04-24Weekly optimize: Profile 4 Growth, risk=3.0%, cb=7Score=46.80 WR=62.8% Return=+1154.6%
17.22026-04-29Phase 17 features (volatility_regime, w1_ema_bias, w1_rsi_norm), weekly optimize, conf=0.65Score=35.13 WR=67.6% PF=2.83
17.32026-05-08Single-source training (revert multi-source), 365d recency decay weights, fresh retrainScore=54.47 WR=71.7% PF=5.46
21plannedml_sltp, trailing stop, M1 features, primary-exit modeTBD
17plannedfunding_rate, OI (remaining Phase 17 items)TBD
18plannedMeta-learner, calibration, regime model, XAUUSDTBD

Active task list with checkboxes β†’ TODO. Archived phases 1–12 β†’ ARCHIVE.md in the repository root.