Files
PythagorasGoal/tests/test_gamma_scalp.py
T
Adriano Dal Pastro cf72e395d3 research(options): gamma scalping (long-vol) — SCARTATO
"Scalping BTC/ETH con copertura in opzioni" = gamma scalping, lo specchio
esatto del VRP01 (long straddle ATM + delta-hedge -> incassa RV-IV).

Esito: perde ogni anno / ogni variante / ogni frequenza (Sharpe -3 a -6).
Diagnostica strutturale: a 1d IV>=RV (paghi il VRP); a 1h RV>IV gross ma il
rehedge orario paga 24x la fee di hedge -> variante peggiore. Marginale vs TP01
= DILUTES, non e' nemmeno un hedge. Muro eseguibilita': opzione BTC min $5968 >> $600.

Schiacciato tra due muri: rehedge lento = premio, veloce = fee -> nessuna
frequenza vince. Il VRP01 (lato short, gated) resta l'unico edge opzioni.

- scripts/research/options_gamma_scalp.py (harness: naked/cheap/rich, 1d+1h, diagnostica RV-IV)
- tests/test_gamma_scalp.py (lock della conclusione)
- docs/diary/2026-06-26-gamma-scalp-options.md
- CLAUDE.md: riga nella sintesi di ricerca

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 18:36:48 +00:00

51 lines
2.0 KiB
Python

"""Lock della conclusione 2026-06-26: il gamma scalping (long-vol) su BTC/ETH PERDE
strutturalmente — è lo specchio del VRP01, dal lato sbagliato del premio. Guardia contro
ri-litigare l'idea "scalping con copertura in opzioni" come edge.
Diario docs/diary/2026-06-26-gamma-scalp-options.md."""
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(ROOT))
sys.path.insert(0, str(ROOT / "scripts" / "research"))
from options_gamma_scalp import ( # type: ignore # noqa: E402
_bs_straddle, gamma_scalp_asset, rv_iv_diagnostic, to_daily_voltgt, _metrics,
)
def test_bs_straddle_positive_and_increasing_in_vol():
"""Premio straddle ATM > 0 e cresce con la vol implicita (sanity del pricer)."""
p_lo = _bs_straddle(100.0, 100.0, 7 / 365.25, 0.30)
p_hi = _bs_straddle(100.0, 100.0, 7 / 365.25, 0.90)
assert p_lo > 0
assert p_hi > p_lo
def test_long_gamma_loses_when_rv_below_iv_synthetic():
"""Sintetico: con prezzo PIATTO (RV=0) e IV>0, il long gamma deve perdere (solo theta)."""
# P&L per step = DG*(r^2 - sigma^2 dt); con r=0 ogni step e' -DG*sigma^2*dt < 0.
from options_gamma_scalp import OPT_FEE_FRAC # noqa: F401
sig = 0.60
# se RV=0 il gamma_pnl e' strettamente negativo -> ritorno negativo. Verifico via il segno
# del contributo per-step a r=0.
r = 0.0
contrib = (r * r - sig * sig * (1.0 / 365.25))
assert contrib < 0
def test_iv_exceeds_or_near_daily_rv_btc():
"""BTC: a campionamento giornaliero l'IV (DVOL) >= RV in media -> il long gamma paga il VRP."""
d = rv_iv_diagnostic("BTC")
assert d["iv"] > 0 and d["rv_daily"] > 0
assert d["spread_daily"] > 0.0 # IV - RV_1d > 0 su BTC (lato short paga)
def test_naked_gamma_scalp_standalone_sharpe_negative():
"""La conclusione: il book gamma-scalp nudo (BTC+ETH) ha Sharpe standalone NEGATIVO."""
wB = gamma_scalp_asset("BTC", mode="naked")
wE = gamma_scalp_asset("ETH", mode="naked")
daily = to_daily_voltgt(wB, wE)
assert daily.std() > 0
assert _metrics(daily)["sharpe"] < 0.0