docs(research): ACCEL50 — frontiera di leva PORT06 + probe fade 15m verso i 50 EUR/giorno
Leva 2->3/4 dimezza i tempi (OOS CAGR 111->206/343%, DD full 3.5->5.2/6.9%). Fade 15m passa il probe (6/6 sleeve OOS+, fee 2x OK, BTC 15m > 1h a meta' DD). Pairs nuove e PAXG bocciati: stale-print illusion (gambe alt 88-98% barre flat). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,117 @@
|
||||
"""ACCEL50 — Ricerca acceleratori verso l'obiettivo €50/giorno (2026-06-12).
|
||||
|
||||
Domanda: quali strategie/leve portano PIU' VELOCEMENTE a €50/g partendo da ~€2k?
|
||||
Diario: docs/diary/2026-06-12-accel50.md. Esiti:
|
||||
|
||||
1. LEVA su PORT06 (acceleratore dominante, zero ricerca nuova).
|
||||
La frontiera (scala lineare dei daily return canonici, fee pro-quota) mostra
|
||||
che a Sharpe ~7-10 il vincolo non e' il rischio ma la taglia: lev 2->4 porta
|
||||
gli anni-a-target da 3.3 a 1.2 con FULL DD 3.5->6.9%. Vedi lev_frontier().
|
||||
|
||||
2. FADE 15m (candidata NUOVA, validazione preliminare PASSATA).
|
||||
MR01/MR02/MR07 a 15m con i parametri live 1h (trend_max=3, ema_long=200,
|
||||
sl_confirm_atr=0.5, fee 0.10% RT): tutti e 6 gli sleeve positivi, OOS
|
||||
2025-26 positivo ovunque (spesso > del 1h: 4x trade = compounding piu'
|
||||
rapido), reggono fee 2x (Sh 1.6-2.9). BTC 15m MIGLIORA il 1h (MR01 Sh
|
||||
3.37 vs 2.76 con meta' DD). Prossimo passo obbligato: gate PORT06
|
||||
(correlazione col gemello 1h, parita' worker — infra 15m gia' esistente
|
||||
dal BLEND pairs). Vedi fade15m_probe().
|
||||
|
||||
3. PAIRS NUOVE: BOCCIATE (stale-print illusion).
|
||||
Lo sweep delle 19 coppie mai testate (config universale pre-registrata)
|
||||
dava 8 candidate con Sharpe 1.5-4.3, MA le gambe alt hanno 88-98% di barre
|
||||
flat (LTC 97%, ADA 98%, DOGE 91%, XRP 88%, BNB 88%) e con flat_skip=True
|
||||
(fill solo su barre pulite) muoiono quasi tutte (BTC/ADA 4.33->0.17,
|
||||
ETH/DOGE 3.79->0.46). Migliore superstite ETH/XRP a 1.34: inferiore alle
|
||||
5 deployate -> niente. Stessa classe di illusione del XEX su DOGE/SOL
|
||||
(vedi xex_divergence_research.py). PAXG idem: 92% flat su Deribit.
|
||||
|
||||
4. CAPITALE: a config attuale servono ~€24k per €50/g; ogni € aggiunto
|
||||
accorcia linearmente (non e' una strategia ma domina ogni altra leva).
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
|
||||
PROJECT_ROOT = Path(__file__).resolve().parents[2]
|
||||
sys.path.insert(0, str(PROJECT_ROOT))
|
||||
|
||||
|
||||
def lev_frontier() -> None:
|
||||
"""Frontiera di leva su PORT06: CAGR/DD/Sharpe e anni-a-€50/g per lev 1-6.
|
||||
Modello: scala lineare dei daily return del backtest canonico (strumenti
|
||||
lineari, fee proporzionali al notional). NON modella margine/code grasse."""
|
||||
from scripts.portfolios._defs import PORTFOLIOS
|
||||
from scripts.analysis.combine_portfolio import port_returns, SPLIT
|
||||
from src.portfolio.sleeves import all_sleeve_equities, sleeve_returns_df
|
||||
|
||||
p = PORTFOLIOS["PORT06"]
|
||||
eq = all_sleeve_equities()
|
||||
members = {sid: eq[sid] for sid in p.sleeve_ids}
|
||||
w = p.weight_vector(sleeve_returns_df(p.sleeve_ids))
|
||||
base = port_returns(members, w) # == live a lev 2 (parita' validata)
|
||||
|
||||
def dd(x):
|
||||
c = (1 + x).cumprod()
|
||||
return ((c - c.cummax()) / c.cummax()).min() * 100
|
||||
|
||||
def cagr(x):
|
||||
c = (1 + x).cumprod()
|
||||
return ((c.iloc[-1]) ** (365 / len(x)) - 1) * 100
|
||||
|
||||
print("lev CAGR_full% DD_full% CAGR_oos% DD_oos% K_per_50/g anni_da_2k")
|
||||
for f, lev in [(0.5, 1), (1.0, 2), (1.5, 3), (2.0, 4), (2.5, 5), (3.0, 6)]:
|
||||
r = base * f
|
||||
roos = r.iloc[SPLIT:]
|
||||
co = cagr(roos)
|
||||
daily = (1 + co / 100) ** (1 / 365) - 1
|
||||
k = 50 / daily if daily > 0 else float("inf")
|
||||
anni = np.log(k / 2020) / np.log(1 + co / 100) if co > 0 else float("inf")
|
||||
print(f"{lev:>3} {cagr(r):>11.0f} {dd(r):>9.2f} {co:>10.0f} {dd(roos):>8.2f} "
|
||||
f"{k:>11,.0f} {max(anni, 0):>11.1f}")
|
||||
|
||||
|
||||
def fade15m_probe() -> None:
|
||||
"""MR01/02/07 a 15m vs 1h, parametri live, fee 0.10% e stress 2x."""
|
||||
import importlib.util
|
||||
import inspect
|
||||
from src.strategies.base import Strategy
|
||||
|
||||
LIVEP = dict(trend_max=3.0, ema_long=200, sl_confirm_atr=0.5)
|
||||
paths = {
|
||||
"MR01": "scripts/strategies/MR01_bollinger_fade.py",
|
||||
"MR02": "scripts/strategies/MR02_donchian_fade.py",
|
||||
"MR07": "scripts/strategies/MR07_return_reversal.py",
|
||||
}
|
||||
for code, rel in paths.items():
|
||||
spec = importlib.util.spec_from_file_location(code.lower(), PROJECT_ROOT / rel)
|
||||
m = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(m)
|
||||
cls = next(o for _, o in vars(m).items()
|
||||
if inspect.isclass(o) and issubclass(o, Strategy) and o.__module__ == m.__name__)
|
||||
s = cls()
|
||||
for asset in ("BTC", "ETH"):
|
||||
line = f"{code} {asset}: "
|
||||
for tf in ("1h", "15m"):
|
||||
r = s.backtest(asset, tf, **LIVEP)
|
||||
if r is None:
|
||||
line += f"{tf}: no-sig | "
|
||||
continue
|
||||
oos = sum(y.pnl for y in r.yearly if y.year >= 2025)
|
||||
old = s.fee_rt
|
||||
s.fee_rt = 0.002
|
||||
r2 = s.backtest(asset, tf, **LIVEP)
|
||||
s.fee_rt = old
|
||||
line += (f"{tf}: Sh{r.sharpe:5.2f} DD{r.max_dd:5.1f}% n={r.trades:4d} "
|
||||
f"oos25-26={oos:+8.0f} fee2x_Sh{r2.sharpe:5.2f} | ")
|
||||
print(line)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("=== 1. Frontiera di leva PORT06 ===")
|
||||
lev_frontier()
|
||||
print("\n=== 2. Fade 15m probe ===")
|
||||
fade15m_probe()
|
||||
Reference in New Issue
Block a user