diff --git a/bot/data/db.py b/bot/data/db.py index a364c2c..a543f0b 100644 --- a/bot/data/db.py +++ b/bot/data/db.py @@ -247,8 +247,11 @@ class Database: COUNT(*) FILTER (WHERE closed_at IS NOT NULL) AS closed_count, -- excluded_from_metrics trades are omitted from resolved_count, -- realized_pnl, wins_realized, and calibration_score. + -- resolved_count does NOT require final_prob: legacy trades + -- without signal data still count as resolved. Calibration + -- below keeps the final_prob requirement (it needs the + -- estimated probability to score). COUNT(*) FILTER (WHERE resolution IS NOT NULL - AND final_prob IS NOT NULL AND (excluded_from_metrics IS NOT TRUE)) AS resolved_count, COALESCE(SUM(net_cost)