From eeac97dde4a3cb974bedeb33af25ff7f837465a9 Mon Sep 17 00:00:00 2001 From: Adriano Dal Pastro Date: Tue, 23 Jun 2026 20:43:47 +0000 Subject: [PATCH] feat(dashboard): Deribit-only book panel (TP01+SKH01) + accumulation forecast MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New section showing the executable Deribit-only book (TP01 75% + SKH01 25%): combined FULL/HOLD Sharpe+DD, plus the reinvest-winnings accumulation projection (historical & conservative CAGR, €5k→5y/10y, conservative €/day run-rate). Reuses the already-computed sleeve daily series (no extra heavy compute). Honest caveats (bull sample, no leverage, SKH01 not live, ~€177k for €50/day). Co-Authored-By: Claude Opus 4.8 (1M context) --- src/live/dashboard.py | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/src/live/dashboard.py b/src/live/dashboard.py index a913e48..0cacb98 100644 --- a/src/live/dashboard.py +++ b/src/live/dashboard.py @@ -32,6 +32,21 @@ def build(): pf = StrategyPortfolio(active_sleeves(), capital=2000.0) bt = pf.backtest() eq = bt["equity"]; idx = bt["index"] + # BOOK DERIBIT-ONLY eseguibile (TP01 75% + SKH01 25%), riusando i daily gia' calcolati + try: + sl_by = {s.name: s for s in pf.sleeves} + tp_d, sk_d = sl_by["TP01_trend_1d"].daily(), sl_by["SKH01_skyhook"].daily() + Jd = pd.concat({"t": tp_d, "s": sk_d}, axis=1, join="inner").fillna(0.0) + der = 0.75 * Jd["t"] + 0.25 * Jd["s"] + mm = ((1.0 + der).resample("ME").prod() - 1.0).dropna() + d_cagr = float(np.prod(1.0 + mm.values) ** (12.0 / len(mm)) - 1.0) if len(mm) else 0.0 + cons = d_cagr * 0.5 + rd = (1.0 + cons) ** (1.0 / 365.0) - 1.0 if cons > 0 else 0.0 + deribit = dict(full=metrics(der), hold=metrics(der[der.index >= HOLDOUT]), + cagr=d_cagr, cons_cagr=cons, eday_5k=5000.0 * rd, + eq5_5y=5000.0 * (1.0 + cons) ** 5, eq5_10y=5000.0 * (1.0 + cons) ** 10) + except Exception as e: + deribit = {"error": f"{type(e).__name__}: {e}"} # sparkline: subsample ~400 punti step = max(1, len(eq) // 400) spark = [(str(idx[i].date()), float(eq[i])) for i in range(0, len(eq), step)] @@ -56,7 +71,7 @@ def build(): full=bt["full"], holdout=bt["holdout"], weights=bt["weights"], per_sleeve=bt["per_sleeve"], yearly=bt["yearly"], positions=pf.current_positions(), spark=spark, paper=paper, prevday=prevday, - combo=combo, gtaa_weights=gtaa_w, + combo=combo, gtaa_weights=gtaa_w, deribit=deribit, shadow=shadow, trades=trades, bh=None, ) _CACHE.update(t=time.time(), data=data) @@ -146,6 +161,18 @@ def html(): + f" (asof {asof})") else: gw_html = "n/d (cache ETF assente — gira fetch_ib_equities.py)" + db = d.get("deribit") + if db and "error" not in db: + f2, h2 = db["full"], db["hold"] + deribit_html = ( + f"FULL Sh {f2['sharpe']:.2f} ret {f2['ret']*100:+.0f}% DD {f2['maxdd']*100:.1f}%  ·  " + f"HOLD-OUT Sh {h2['sharpe']:.2f} DD {h2['maxdd']*100:.1f}%
" + f"accumulo (reinvesti le vincite, no leva) — CAGR storico " + f"{db['cagr']*100:.0f}%, conservativo {db['cons_cagr']*100:.0f}%: " + f"da €5k → ~€{db['eq5_5y']:,.0f} (5a) / ~€{db['eq5_10y']:,.0f} (10a)  ·  " + f"run-rate oggi ~€{db['eday_5k']:.2f}/g @conservativo") + else: + deribit_html = "n/d" + (f" — {db['error']}" if db and db.get("error") else "") sh = d.get("shadow") if sh and "error" not in sh: bits = "  ·  ".join( @@ -221,6 +248,10 @@ th{{color:#8a93a0;font-weight:500}}.y{{display:inline-block;background:#161b22;b
TP01 (Deribit) + GTAA (IB) — le DUE gambe ESEGUIBILI a basso capitale, scorrelate (corr ~0.21) → blend Sharpe ~1.5, drawdown dimezzato. Nessuna esecuzione reale:
{combo_html}
posizioni azionabili IB (GTAA, peso ETF): {gw_html}

⚠️ PAPER cross-venue: valida l'operativita' su due conti (Deribit + IB) a rischio zero. Lo Sharpe ~1.5 e' ottimistico (finestra crypto corta/favorevole); il dato robusto e' la diversificazione (corr 0.21, DD dimezzato), non il livello. XS01/VRP01 esclusi (STAT-MODE): qui solo TP01+GTAA.

+
BOOK DERIBIT-ONLY — eseguibile (TP01 + SKH01)
+
TP01 75% + SKH01 25% — le due gambe direzionali BTC/ETH sullo STESSO venue (Deribit), ribilancio mensile. Sottoinsieme realmente armabile (XS01/VRP01 esclusi):
{deribit_html}
+forecast: scripts/portfolio/forecast_deribit_book.py · report: scripts/portfolio/run_deribit_book.py
+

⚠️ Accumulo = proiezione condizionata (storico bull crypto → pianifica sul conservativo); nessuna leva; SKH01 research/forward-monitor (solo TP01 armato live). A €50/g servono ~€177k @conservativo: la via è capitale+tempo, non leva.

FORWARD-MONITOR — lead paper (non deploy)
PREVDAY range-breakout — lead ORTOGONALE a TP01 (corr ~0.15 full / ~0 hold; marginal ADDS, non-hedge, robusto allo shift del confine-giorno). Forward-only, nessuna esecuzione reale:
{prevday_html}

⚠️ LEAD in osservazione, NON deployato. Sopravvissuto alla verifica avversariale dell'onda intraday; lo teniamo in paper per validarlo fuori-campione-vero. I due libri (modeled vs real-$600) mostrano l'haircut di fill che lo scettico aveva segnalato.