Commit Graph
57 Commits
Author SHA1 Message Date
Hermes Agent 4c7bc6bb2b chore: persist Mac Mini Docker deployment 2026-07-31 05:02:40 +00:00
Hermes Agent bf77737d88 fix: address pre-push review findings 2026-07-26 23:37:15 +00:00
Hermes Agent 2da5d20ccd fix: isolate on-chain provider outages 2026-07-26 23:32:54 +00:00
Hermes Agent a2b9b431c7 fix: isolate auxiliary price source failures 2026-07-26 23:29:54 +00:00
Hermes Agent 1e50760f27 perf: reuse browser across chart scrapes 2026-07-26 23:27:06 +00:00
Hermes Agent dafc21b352 chore: keep runtime persistence out of git 2026-07-26 23:22:56 +00:00
Hermes Agent 4ad9b38e7f test: require current repository ML artifact 2026-07-26 23:20:05 +00:00
Hermes Agent 741de87ce2 perf: trim persisted ML fold metadata 2026-07-26 23:19:21 +00:00
Hermes Agent 1c46e1ad4b fix: train valid purged ML artifacts 2026-07-26 23:17:41 +00:00
Hermes Agent 6655bcfa5a fix: validate scraper metric semantics 2026-07-26 23:15:37 +00:00
Hermes Agent b06cabf3aa fix: add health checks and repair dashboard contracts 2026-07-26 23:15:37 +00:00
Hermes Agent f9e992c2b4 feat: report bootstrap confidence intervals 2026-07-26 23:15:37 +00:00
Hermes Agent 3a2571df9f chore: ignore uv and Playwright local state 2026-07-26 23:07:36 +00:00
Hermes Agent 63d4b6c86a docs: document locked setup deployment and ML provenance 2026-07-26 23:07:36 +00:00
Hermes Agent a9bdf3b46c chore: add arm64 container deployment and Gitea CI 2026-07-26 23:07:36 +00:00
Hermes Agent 14d3baea90 chore: lock reproducible Python dependency groups 2026-07-26 23:07:36 +00:00
Hermes Agent 99f6e80ea1 perf: cache backtests by input signature 2026-07-26 23:07:30 +00:00
Hermes Agent 111b458ddf fix: reserve and persist background jobs 2026-07-26 23:07:30 +00:00
Hermes Agent 3b1bc9a2bf fix: preserve metrics with atomic persistence 2026-07-26 23:07:30 +00:00
Hermes Agent 661579abf9 fix: publish historical metric coverage 2026-07-26 23:07:24 +00:00
Hermes Agent 510b2587ca fix: distinguish OOS ML backtest weights 2026-07-26 23:07:24 +00:00
Hermes Agent eb8c01611c fix: reject unprovenanced ML artifacts 2026-07-26 23:07:24 +00:00
Hermes Agent 62bff348bf fix: canonicalize score brackets and assessments 2026-07-26 23:07:24 +00:00
Hermes Agent 1f754ed85d feat: add block-bootstrap backtest intervals 2026-07-26 23:05:05 +00:00
Hermes Agent a54dec357f docs: clarify legacy ML target semantics 2026-07-26 23:00:46 +00:00
Hermes Agent 81654b5743 fix: remove leakage from legacy ML evaluation 2026-07-26 22:59:21 +00:00
Hermes Agent aef714d6c7 chore: stop tracking local LLM credentials 2026-07-26 22:59:21 +00:00
Hermes Agent 573884a1c2 docs: update README and dashboard screenshots 2026-06-29 00:24:33 +00:00
Hermes Agent de2cd512cd fix: purge ML validation label leakage 2026-06-29 00:09:26 +00:00
Hermes AgentandClaude Opus 4.6 <<EMAIL>> 8fca6181d5 feat: per-metric historical exploration with click-to-select context
- Click any metric card to see historical periods where it was at a similar level
- Purple dot highlighting on chart shows matching periods
- Metric overlay line plotted on chart (dashed purple)
- Metric Context panel shows percentile, comparable days, avg forward returns,
  and historical examples from different market cycles
- New /api/metric-context endpoint for per-metric similarity analysis
- Backtest chart_data now includes per-metric raw values
- score_day() returns raw metric values alongside scores
- Fixed JS SyntaxError from broken inline onclick escaping (uses addEventListener)

Co-Authored-By: Claude Opus 4.6 <<EMAIL>>
2026-06-28 22:49:15 +00:00
BizzleBotandClaude Opus 4.6 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 f1d38f9abb fix: backtest chart auto-switches linear/log based on price range
- Added time range buttons (30D/90D/6M/1Y/2Y/4Y/ALL) to backtest chart
- Auto-detects: if price range spans >20x → log scale, else linear
- Short ranges (30D-2Y) now show meaningful price movement instead of flat line
- Zone backgrounds updated to match new thresholds (35/50/65)
- Monospace font, better tooltips with zone labels
- Chart properly destroys and recreates on range change
2026-03-21 23:00:46 +00:00
BizzleBot fb590105ce fix: preserve ATH/Mayer/200D SMA when CoinGecko rate-limits
- ATH: fall back to cached value when fetch fails
- 200D SMA: compute from history.json when CoinGecko blocks us
- Mayer Multiple: derived from 200D SMA fallback
- Drawdown: preserve cached value on ATH fetch failure
- Fixes N/A Drawdown and -- header stats after quick refresh
2026-03-21 22:55:37 +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 5538f666c5 fix: cycle-aware scoring thresholds for diminishing returns
PROBLEM: Fixed thresholds based on 2015-2018 extremes meant the score
could barely reach 65 in the current cycle. MVRV Z-Score bottoms are
getting shallower (-0.6 → -0.4 → -0.3), Puell floors are rising,
NUPL extremes are compressing. A 'good buy' in 2024+ looks different
than 2018.

SOLUTION: Widened scoring ranges across all metrics:
- MVRV Z-Score: 0-1.0 now scores 8/10 (was 0-0.5)
- Puell Multiple: 0.4-0.7 scores 8/10 (was 0.3-0.5)
- NUPL: 0-0.3 scores 8/10 (was 0-0.25)
- LTH Realized Price: 0-30% above scores 7/10 (was 0-20%)
- 200W SMA: 0-30% above scores 7/10 (was 0-20%)
- Drawdown: 40-60% scores 8/10 (was 50-70%)
- Fear & Greed: 0-15 scores 10/10 (was 0-10)
- RHODL: 0-200 scores 10/10 (was 0-100)

RESULT:
- Today: 75/100 Strong Accumulation (was 56)
- Nov 2022 bottom: 91/100 (still extreme)
- 2024-2026 now has meaningful signal variation
- Each threshold has a note explaining the cycle compression logic
2026-03-21 22:35:13 +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 6398c6c8f4 fix: main dashboard historical context shows all 4 timeframes (30d/90d/180d/1yr) 2026-03-20 23:32:30 +00:00
BizzleBot 22fc7fc6cd fix: historical data stored permanently, only append new daily values
- Historical data (5693+ points per metric) saved in history.json permanently
- Quick refresh: only updates price + Fear & Greed from APIs (~2 seconds)
- Full refresh: only needed for FIRST-TIME setup or if data is missing
- Daily append: new values added to history.json from cache, not re-scraped
- Startup: uses cached on-chain data if it exists, no unnecessary Playwright launches
- On-chain metrics only update once per day, no reason to re-scrape them
2026-03-20 23:29:39 +00:00
BizzleBot 28b5240a81 perf: smart refresh — quick updates price/F&G only, full scrape every 6h
- Quick Refresh button: updates price + Fear & Greed only (~2 seconds)
- Full Refresh button: re-scrapes all on-chain data from LookIntoBitcoin (~2-3 min)
- Background auto-refresh: quick every 15min, full only when on-chain data >6h old
- Cached on-chain data preserved between quick refreshes
- On-chain metrics only update daily anyway, no need to re-scrape every 15min
2026-03-20 23:25:54 +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 0ddb4ab01b add: screenshots + comprehensive README with images
Dashboard main view, backtest page, and settings screenshots.
README includes tech stack table, project structure, run instructions,
score interpretation, and all metric descriptions.
2026-03-20 23:10:45 +00:00
BizzleBot 13bac5f654 v4: Bitcoin Accumulation Zone Monitor — on-chain metrics + backtest engine
COMPLETE PIVOT from ML trading optimizer to on-chain metrics monitor.

Architecture:
- Playwright scrapes LookIntoBitcoin Plotly Dash charts for real on-chain data
- 10 proven metrics: Puell Multiple, MVRV Z-Score, Fear & Greed, Reserve Risk,
  RHODL Ratio, NUPL, LTH Realized Price, 200W SMA, Hash Ribbons, Drawdown
- Each metric scores 0-10, composite 0-100
- No ML, no black box — every signal transparent and traceable
- Historical backtest validates scoring against actual BTC forward returns
- Recency-weighted analysis accounts for diminishing cycle returns

Full documentation in ARCHITECTURE.md
v4.0-accumulation-monitor
2026-03-20 23:07:53 +00:00
BizzleBotandClaude Opus 4.6 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
BizzleBotandClaude Opus 4.6 e3c5aa9f32 chore: add .gitignore for pycache and data dirs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 22:31:35 +00:00
BizzleBotandClaude Opus 4.6 62e32fc655 feat: replace ML optimizer with on-chain accumulation zone monitor
Complete rewrite — replaces the ML-based signal optimizer with a transparent
on-chain metric monitoring dashboard. Scrapes 10 metrics from LookIntoBitcoin
(Playwright) and free APIs, scores each 0-10, composite 0-100.

Metrics: Fear & Greed, Puell Multiple, MVRV Z-Score, Drawdown from ATH,
Price vs 200W SMA, Reserve Risk, RHODL Ratio, NUPL, LTH Realized Price,
Hash Ribbons. Auto-refreshes every 15 minutes. Settings page preserved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 22:31:29 +00:00
BizzleBot aba30f7718 fix: LLM analysis + new run button + settings page support
- Fixed LLM failing silently (401 auth error on every iteration)
- Reset provider to Ollama (working) from broken OpenRouter config
- Added /api/clear endpoint + 'New Run' button to reset history
- LLM failures now logged visibly with error details
- LLM suggestions persisted to iteration data (survive restarts)
- Settings page support via llm_settings.json (multi-provider)
2026-03-20 21:51:05 +00:00
BizzleBot c17b3b5167 v3: accumulation signal optimizer - lower initial thresholds, disable PCA, simpler model start 2026-03-19 23:55:51 +00:00
BizzleBotandClaude Opus 4.6 560863fa0d pivot: rewrite as BTC accumulation signal optimizer
Replace day-trading bot with long-term accumulation signal model.
Predicts optimal BUY times using forward return analysis at 7d/30d/90d
horizons, scoring each candle 0-100. Primary metric is now
cost_basis_improvement_pct (model buy price vs DCA).

- train_and_backtest.py: regression models (XGBoost/LSTM hybrid),
  accumulation-focused features (price position, momentum, volatility,
  volume, cycle), forward return targets, signal quality backtesting
- orchestrator.py: cost improvement scoring, signal count validation
- analyzer.py: accumulation-focused LLM system prompt
- dashboard: cost improvement display, signal metrics table
- config: new accumulation-focused parameters

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 23:51:43 +00:00
BizzleBotandClaude Opus 4.6 a21e635d9f feat: add LSTM, hybrid ensemble, PCA, scaler, ATR stops, rolling window
Major upgrade to the ML engine:
- LSTM model type: 2-layer PyTorch LSTM with early stopping, GPU support
- Hybrid mode: LSTM (60%) + XGBoost (40%) with agreement gating
- StandardScaler normalization (critical for LSTM)
- PCA dimensionality reduction (configurable variance retention)
- ATR-based dynamic stop-loss/take-profit adapting to volatility
- Rolling window retraining for more realistic time series validation
- Updated LLM system prompt with docs for all new parameters
- All backward compatible (xgboost/lightgbm/catboost still work)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 23:02:11 +00:00