From 04e7a613209fda9dd2f6409fdb355470fdad04da Mon Sep 17 00:00:00 2001 From: jgrusewski Date: Sun, 7 Jun 2026 01:41:20 +0200 Subject: [PATCH] fix(crypto): restrict funding harness to crypto-native perps (match validated universe) Live Binance fapi now lists tokenized-stock perps (MSTR/CRCL/INTC/AMD/SOXL, underlyingType= EQUITY) which dominated the high-funding qualifiers (12 of 19) but were NEVER in the validated crypto_pit backtest. Filter to exchangeInfo underlyingType==COIN (crypto-native) to keep the paper-forward test measuring the edge we actually proved. Post-filter: 7 of 212 liquid qualify (thin = current deleverage regime, filter sitting mostly in cash as designed). Tokenized-stock funding may be a separate unvalidated carry; not contaminating the Phase-1 gate. Co-Authored-By: Claude Opus 4.8 (1M context) --- scripts/surfer/crypto_funding_paper.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/surfer/crypto_funding_paper.py b/scripts/surfer/crypto_funding_paper.py index 399bd93d4..ab7c2623e 100644 --- a/scripts/surfer/crypto_funding_paper.py +++ b/scripts/surfer/crypto_funding_paper.py @@ -43,11 +43,19 @@ def get(url, tries=4): time.sleep(2 * (a + 1)) +def crypto_native(): + """Symbols whose underlying is a crypto COIN (excludes EQUITY/KR_EQUITY/COMMODITY/INDEX/ + PREMARKET tokenized-stock perps) — matches the universe the edge was validated on.""" + info = get(f"{FAPI}/fapi/v1/exchangeInfo") + return {s["symbol"] for s in info["symbols"] if s.get("underlyingType") == "COIN"} + + def universe(): - """Liquid USDT perps: symbol -> 24h quote volume (USD).""" + """Liquid CRYPTO-NATIVE USDT perps: symbol -> 24h quote volume (USD).""" + native = crypto_native() t = get(f"{FAPI}/fapi/v1/ticker/24hr") return {x["symbol"]: float(x["quoteVolume"]) for x in t - if x["symbol"].endswith("USDT") and float(x["quoteVolume"]) > LIQ_USD} + if x["symbol"].endswith("USDT") and x["symbol"] in native and float(x["quoteVolume"]) > LIQ_USD} def funding_hist(sym, limit=90):