Add backtest pipeline, betting_brain filters, score coherence + social v3
betting_brain.py: - HARD_MIN_SAMPLES=50 floor for calibrator bypass - ev_edge < 0 + >= 0.20 hard vetoes - BTTS muted (grid search found no profitable config) - Per-market optimal envelopes (MS, OU25) - Score coherence filter: main_pick must agree with score prediction - HTFT reversal cross-check for MS picks feature_builder.py / data_loader.py: - Real home/away_position from data (was hardcoded 10) - Cup detection wired into UpsetEngine - _estimate_league_position with 300-day season filter New scripts: - diagnostic_backtest.py: per-bet diagnostic backtest with loss patterns - optimize_filters.py: grid search per-market optimal thresholds - analyze_backtest_csv.py: root-cause hypothesis testing on CSV - compare_backtests.py: side-by-side validation with verdict - test_score_coherence.py: smoke test for coherence filter (20/20 pass) Reports: - diagnostic_backtest_20260525_024437 (50-match smoke) - diagnostic_backtest_20260525_035649 (1000-match in-sample) - filter_optimization_patch.json (grid search winners per market) Social poster v3: - satori + resvg HTML/CSS rendering pipeline - Twemoji football/basketball + flag SVGs - caption SEO: 12 curated hashtags per post - image SEO: descriptive filenames + .json metadata sidecar - /health, /preview-png, /run-now endpoints Docs: - mds/SESSION_HANDOFF.md: full session state for cross-machine continuity - mds/SOCIAL_POSTER_SETUP.md: API keys + test commands Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
==============================================================================
|
||||
DIAGNOSTIC BACKTEST REPORT
|
||||
==============================================================================
|
||||
Generated: 2026-05-25T02:44:37
|
||||
Sample window: start=-3d, end=now
|
||||
Max matches: 50
|
||||
Excluded days: ['2026-04-29', '2026-05-03']
|
||||
|
||||
OVERALL
|
||||
------------------------------------------------------------------------------
|
||||
n_total : 50
|
||||
n_playable_settled : 27
|
||||
wins : 15
|
||||
losses : 12
|
||||
hit_rate_pct : 55.56
|
||||
unit_profit : -0.862
|
||||
staked : 5.4
|
||||
roi_pct : -15.96
|
||||
|
||||
PER MARKET
|
||||
------------------------------------------------------------------------------
|
||||
market n hit% profit roi%
|
||||
OU25 13 53.85 -0.6 -23.08
|
||||
BTTS 12 50.0 -0.392 -16.33
|
||||
MS 2 100.0 0.13 32.5
|
||||
|
||||
PER CALIBRATED CONFIDENCE BAND
|
||||
------------------------------------------------------------------------------
|
||||
band n hit% roi%
|
||||
55-60 4 50.0 -23.75
|
||||
60-65 1 0.0 -100.0
|
||||
65-70 22 59.09 -10.73
|
||||
|
||||
PER ODDS BAND
|
||||
------------------------------------------------------------------------------
|
||||
band n hit% roi%
|
||||
1.3-1.5 11 81.82 12.73
|
||||
1.5-1.8 10 50.0 -17.6
|
||||
1.8-2.2 6 16.67 -65.83
|
||||
|
||||
LEAGUE vs CUP
|
||||
------------------------------------------------------------------------------
|
||||
league n= 27 hit=55.56% roi=-15.96%
|
||||
|
||||
LOSS DIAGNOSTICS
|
||||
------------------------------------------------------------------------------
|
||||
total losses: 12
|
||||
total lost units: -2.4
|
||||
By market: [('BTTS', 6), ('OU25', 6)]
|
||||
Loss patterns (count, % of losses):
|
||||
high_htft_reversal_prob (>=0.20) 0 (0.0%)
|
||||
cup_match 0 (0.0%)
|
||||
low_league_reliability (<0.45) 0 (0.0%)
|
||||
v27_disagree 3 (25.0%)
|
||||
trap_market_flagged 4 (33.33%)
|
||||
low_calibrated_conf (<55) 0 (0.0%)
|
||||
high_odds_underdog (>=2.5) 0 (0.0%)
|
||||
low_data_quality (<0.55) 0 (0.0%)
|
||||
high_risk_level 3 (25.0%)
|
||||
inferred_features 12 (100.0%)
|
||||
Top betting_brain issues seen in losses:
|
||||
inferred_statistical_features 12
|
||||
triple_value_not_confirmed 12
|
||||
trap_market_market_overpriced 4
|
||||
Top betting_brain vetoes (in losses — i.e. veto fired but bet still went through value-sniper override):
|
||||
|
||||
RECOMMENDATIONS
|
||||
------------------------------------------------------------------------------
|
||||
(none surfaced — sample too small or no clear pattern)
|
||||
|
||||
==============================================================================
|
||||
Reference in New Issue
Block a user