6 Commits

Author SHA1 Message Date
BizzleBot
4647c596b3 feat: ML-optimized accumulation scoring with dashboard toggle
Train GradientBoostedClassifier on 2,601 days of historical data
(2018-2025) to find optimal metric weights for identifying the best
long-term buying opportunities. Uses time-series cross-validation
to prevent look-ahead bias.

Key results:
- pct_above_200w_sma: 50.7% weight (was 11.1% equal)
- drawdown: 14.6%, lth_rp: 10.9%, rhodl: 8.9%
- fear_greed demoted from 11.1% to 5.1%
- nupl/mvrv nearly eliminated (0.7-1.8%)

ML Strong Accumulation bracket: avg +210% 1yr (vs +176% classic)

New files: ml/optimizer.py, config/ml_weights.json
Modified: scoring/engine.py (score_all_ml), backtesting/engine.py
(ml_mode), dashboard/server.py (Classic/ML toggle)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 23:18:29 +00:00
BizzleBot
85e0a6839f fix: backtest engine uses thresholds.json (single source of truth)
Previously the backtest engine had hardcoded OLD thresholds that
diverged from scoring/engine.py + config/thresholds.json. Now loads
from thresholds.json directly, ensuring the chart matches the dashboard.
2026-03-21 22:42:37 +00:00
BizzleBot
ececd65a22 feat: interactive score history chart with time range selector + BTC price overlay
- Time range buttons: 30D, 90D, 6M, 1Y, 2Y, 4Y, ALL
- BTC price overlay on right y-axis (orange dashed line)
- Accumulation zone backgrounds (green/yellow/red shading)
- Threshold lines at 65, 50, 35
- Tooltip shows score + zone label + BTC price
- Uses backtest daily_scores for full history (not just score_history.jsonl)
- Smart downsampling: daily for last 2yr, weekly before that
- Chart height increased to 320px
2026-03-21 22:41:22 +00:00
BizzleBot
6bfbd30e3d fix: comparable periods pick one example per market cycle
Instead of showing 5 recent days with similar scores (all from the same
2-week window), now picks one example per cycle:
- pre-2016, 2016-17 Bull, 2018-19 Bear, 2020-21 Bull, 2022-23 Bear, 2024+
- Sorted by closest score match, then picks one per cycle
- Shows cycle label in brackets next to each example
- Much more representative of how the score performed across different eras
2026-03-21 22:21:14 +00:00
BizzleBot
e385765fda add: 30d/90d/180d/365d forward returns in all backtest views
- Bracket table now shows Avg 30d, 90d, 180d, and 1yr columns
- Signal events show all 4 timeframes
- Current context shows all 4 average returns
- Comparable examples show all available timeframes
- Updated backtest screenshot
2026-03-20 23:20:42 +00:00
BizzleBot
5b3b3811ec feat: add historical backtest engine and dashboard page
- scrapers/history_collector.py: scrapes full time series from 8 LookIntoBitcoin
  charts + Fear & Greed API, stores to data/history.json (~5700 days back to 2010)
- backtesting/engine.py: scores each historical day using same thresholds as live
  scoring, computes 30d/90d/180d/1yr forward returns, bracket stats, signal events
- dashboard/server.py: adds /backtest page with dual-axis score vs price chart,
  bracket performance table, signal event list, current context box; adds backtest
  nav link and historical context box on main dashboard; 4 new API endpoints

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 22:50:57 +00:00