feat(combo): paper combo NUDO vs PROTETTO (guardia-DD -4%) affiancati + dashboard

paper_combo traccia forward entrambe le versioni; dashboard mostra nudo + protetto. Guardia-DD:
de-risk 0.4x a DD>-4%, ri-rischia a -1.6% (backtest MaxDD 8.4->5.8%, 2022 -4.4->-1.8%). Opzioni
escluse (non aiutano il grind). Container ricostruito.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Adriano Dal Pastro
2026-06-23 12:59:07 +00:00
parent 1c15c3c1be
commit 010d1f0733
2 changed files with 59 additions and 39 deletions
+7 -3
View File
@@ -117,9 +117,13 @@ def html():
cdays = (pd.Timestamp(cb["last"]) - pd.Timestamp(cb["start"])).days
cret = cb["equity"] / cb["initial"] - 1
wc = cb.get("w_crypto", 0.5)
combo_html = (f"<b>{cb['equity']:.2f}</b> (start {cb['initial']:.0f}, {cb['start'][:10]} "
f"{cb['last'][:10]}, {cdays}g, {cb['n_days']} barre) &nbsp; ret <b>{cret*100:+.2f}%</b> "
f"&nbsp; maxDD {cb['max_dd']*100:.1f}% &nbsp; blend {wc*100:.0f}/{(1-wc)*100:.0f} TP01/GTAA")
head = (f"start {cb['initial']:.0f} · {cb['start'][:10]} {cb['last'][:10]} ({cdays}g, "
f"{cb['n_days']} barre) · blend {wc*100:.0f}/{(1-wc)*100:.0f} TP01/GTAA")
combo_html = f"{head}<br><b>NUDO</b> &nbsp; eq <b>{cb['equity']:.2f}</b> &nbsp; ret <b>{cret*100:+.2f}%</b> &nbsp; maxDD {cb['max_dd']*100:.1f}%"
if "equity_g" in cb:
crg = cb["equity_g"] / cb["initial"] - 1
combo_html += (f"<br><b>PROTETTO</b> (guardia-DD {cb.get('dd_trigger',0.04)*100:.0f}%) &nbsp; "
f"eq <b>{cb['equity_g']:.2f}</b> &nbsp; ret <b>{crg*100:+.2f}%</b> &nbsp; maxDD {cb['max_dd_g']*100:.1f}%")
else:
combo_html = "non inizializzato (gira <code>scripts/live/paper_combo.py</code>)"
gw = d.get("gtaa_weights")