fix(report): conta i CHIUSI col flag win del worker (PnL REALE), non col net_return sim

Col real-truth ledger net_return resta il numero SIM diagnostico: sui TP fantasma
da spike-print testnet (ETH, bars_held=0: lo spike genera il segnale E tocca il TP
intrabar; il reale chiude a mercato pagando fee/spread) il report Telegram diceva
26 positivi / 0 negativi mentre il reale era 11/15. Ora collect() usa ev.win
(real-truth-aware, fallback nr>0 per eventi storici); i PnL per-motivo erano gia'
reali. TODO: nota monitor sul churn da spike (niente filtri anti-spike nei segnali:
artefatto testnet, real-truth gia' contabilizza giusto).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Adriano Dal Pastro
2026-06-11 19:18:55 +00:00
parent b208417f2d
commit 2ae6d7afe6
2 changed files with 16 additions and 1 deletions
+5 -1
View File
@@ -115,7 +115,11 @@ def collect():
nr = ev.get("net_return", 0.0)
pnl = ev.get("pnl", 0.0)
realized += pnl
closed.append((_short(wid), ev.get("reason", "?"), nr, pnl, nr > 0))
# win = flag del worker (col real-truth segue il PnL REALE; net_return
# resta il sim diagnostico: sui TP fantasma da spike testnet diceva
# 26/0 mentre il reale era 11/15). Fallback nr>0 per eventi storici.
closed.append((_short(wid), ev.get("reason", "?"), nr, pnl,
bool(ev.get("win", nr > 0))))
if "positions" in st or "weights" in st:
continue # multi-asset (TR01/ROT02/TSM01): sezione dedicata
if st.get("in_position"):