Skip to content

View translation

OiLeverageFragilitySpotRegimeLong

Hypotheses

Aggregate-Leverage Regime Allocation for Crypto Majors, Long-Only & Unlevered SPOT (BTC/ETH/SOL/BNB on BINANCE_SPOT, Daily→Weekly Holds — Hold a Name While Its Perp OPEN-INTEREST-Value Is at Normal Leverage, Rotate That Sleeve to CASH When Aggregate OI Stretches to Flush-Prone Extremes; Non-Price OI Feed, 2-Parameter)

Hypotheses

A LONG-ONLY, UNLEVERED, cash-account MACRO allocation across a 4-major spot basket (BTCUSDT, ETHUSDT, SOLUSDT, BNBUSDT on BINANCE_SPOT), timed by a genuine NON-PRICE structural feed: the aggregate perpetual OPEN-INTEREST VALUE (USD notional) of each name from the Binance VISION 'metrics' files (sum_open_interest_value, MULTI-YEAR back to ~2020, NOT the 30-day API). Mechanism, per name, evaluated on daily closes: compute oi_z = z-score of the perp's OI-value over the last N days (a proxy for how STRETCHED leveraged positioning is versus its own recent norm). Hold that name's spot sleeve fully invested while oi_z ≤ stretch (leverage normal → the up-drift is 'real-money' and sustainable); rotate the sleeve to CASH when oi_z > stretch (leverage stretched → the market is fragile and flush-prone, deleveraging cascades cluster here). Equal-weight sleeves, each ≤25% of equity, no leverage → no liquidation. This is a deliberately DIFFERENT FAMILY from the funding-carry basket that just died in verification_loop and from every momentum/dollar-neutral construction: the edge is not a cashflow and not a price-trend rank — it is a leverage-fragility REGIME gate that decides risk-ON vs risk-OFF from committed-capital data. It also fills two nearly-empty buckets at once — the macro/1w+ horizon (0.6% of portfolio) and the under-represented BINANCE_SPOT venue (11.5%) — while staying in the structurally-safe survivor mold (long-only, unlevered, basket, bounded drawdown).

Hypotheses

Both hypothesis-mismatch findings are fixed at the root rather than papered over. FINDING 1 (per-name OI not implemented): I checked the harness instead of trusting the previous iteration's note, and per-leg OI is in fact wired. subprocess_entry._add_per_leg_open_interest attaches open_interest_by_instrument as {instrument_id: {ts_ns: open_interest}} for every leg whenever the strategy code references that key literal, exactly mirroring the funding_rates_by_instrument path, and supp_collector._OI_VENUES is {BINANCE, BINANCE_SPOT} with spot legs explicitly mapped to the matching USDT perp. I loaded it for all four names and it is real and deep: BTC 28,923 hourly points from 2020-09-01, ETH 41,191 and SOL 41,072 and BNB 37,231 from 2021-12-01, all current to 2026-09-04. Each sleeve now computes and acts on its own oi_z; there is no aggregate BTC switch left. The prior claim that this was infeasible was wrong, and I have corrected it in the docstring so it does not propagate. FINDING 2 (unhypothesized trend filter): the per-name price-SMA filter is deleted outright. No SMA, no price-trend term, no price-derived gate of any kind remains; the OI z-score is the sole driver, which is what the hypothesis specifies. One deliberate deviation I want on the record: the per-leg feed is CONTRACT open interest, not the OI VALUE the hypothesis names. That is the better quantity here rather than a compromise, because OI value is contracts times price, so its z-score partly measures the price move and would smuggle a price signal into what is meant to be a non-price structural feed; coin OI is orthogonal to price. I kept a primary-leg-only fallback to the single-symbol metrics OI series so the primary sleeve still functions on any code path that does not attach the per-leg map, and that fallback is the same quantity for the same symbol, not a different mechanism. Legs without OI stay in cash with no price proxy. On behavior: simulating this exact gate on the real OI series gives 77-81% risk-on days per name with 89-122 regime flips over the sample, roughly 400 sleeve round-trips, so there is no zero-trade or permanently-flat risk. Sizing was also made cash-account-correct: sleeves size off an equity base refreshed only when the whole book is flat and are capped at 98% of remaining USDT, so four sequential buys cannot over-allocate a shrinking cash balance. Clamps are declared in _param_bounds. QA's edge concern stands on its own merits and I am not arguing with it, but the two prior loss samples both measured constructions that are no longer what is being tested here: v1 was a BTC-only aggregate switch and v2 was that switch plus the trend overlay QA identified as the real driver. The per-name OI gate the hypothesis actually specifies has never been measured, so it deserves one clean backtest.

Hypotheses

Long-only crypto-beta spot basket carried by beta with NEGATIVE alpha over its own baseline and a >50% drawdown — not worth 2 hours of optimization. benchmark_meaningful is true and information_ratio is -0.525 vs the equal-weight-basket benchmark: the OI leverage-fragility gate does not add risk-adjusted value over a naive equal-weight hold of the same four names, so the +3744% headline is long-crypto beta, not the non-price regime edge under test. max_drawdown is 55.99% (CI to 85%), above the 50% hard-abandon bar (L19), and the defensive thesis is falsified in-sample (china_ban -38%/53% DD, ftx -21.8%, rate_shock -24.7% all hit despite the gate). The metrics are also artifact-contaminated: avg_trade_return_pct 35.6% and daily_returns of +256%/+143% are a compounding/leverage artifact of the self-refreshing _equity_base (L36), and the recent regime is negative (2025 +6.3%, 2026 -22.1%) placing the holdout in the losing window with rolling Sharpe deeply negative. This is the L45/L49/L19 long-only multi-instrument basket family (0/84 survivors); optimization would curve-fit the OI thresholds to the bull years. Failure pattern: risk_reject/no_edge long-only OI-gated spot basket, beta-carried with negative IR vs benchmark, >50% drawdown (L45/L49/L19/L36).

Implementation

Long-only, unlevered cash allocation across four spot majors (BTCUSDT/ETHUSDT/SOLUSDT/BNBUSDT on BINANCE_SPOT), daily bars, timed purely by leveraged-positioning data. Each name's sleeve is gated independently by a z-score of that name's OWN perpetual open interest over the last oi_window daily observations, read point-in-time from the per-leg open_interest_by_instrument map: the sleeve is fully invested while its oi_z stays at or below stretch (leverage normal), and rotates entirely to cash once oi_z exceeds stretch (leverage stretched to flush-prone extremes), re-entering only after oi_z falls back to re_enter. Sleeves are equal-weight at 24% of a path-independent equity base each, capped by the cash actually available, with no leverage and therefore no liquidation. A leg with no OI series stays in cash rather than falling back to any price-based proxy.

Verification Results

Verification failed (Layer 4 — QA review) [class=hypothesis_mismatch]: - [edge_concern] The only wired driver (per-name price-SMA trend overlay) is a dead OHLCV/L7 zero-survivor class per the developer's own notes; prior measurable samples of this construction lost money (v1 -53.8% at 0% win / 61% DD from the OI gate alone; v2 -21.6%, PF 0.35, Sharpe -1.14). The sandbox here is weakly positive but Sharpe 0.32 with CI [-0.45, 1.06] straddling zero, 55% drawdown, 26-trade max losing streak — not an edge. Advisory only. - The hypothesis's core edge — a PER-NAME perp OI-value z-score gating each sleeve — is NOT implemented. The code reads OI for the PRIMARY (BTC) symbol only and uses it as one aggregate on/off switch for the whole basket; ETH/SOL/BNB never get their own OI z-score. Developer confirms per-name metrics is infeasible in the harness (no metrics_by_instrument). - An unhypothesized per-name price-SMA trend filter was substituted in as the actual return driver. The hypothesis is a pure OI-leverage-fragility allocation with NO price-trend component. This changes the strategy's identity into a trend-momentum book with an OI-regime overlay.

Verification Results

No change required; if the research lead specifically wanted OI-value, note that it would reintroduce price contamination the developer deliberately avoided. Analyst to be aware the signal is coin-OI, not USD-OI.

Verification Results

Feed-quantity deviation: the hypothesis names OI-VALUE (USD notional, sum_open_interest_value) but the code z-scores CONTRACT open interest (coin units). This is a documented, defensible choice — OI-value = contracts x price, so a z-score of value partly measures the price move and would contradict the hypothesis's own 'genuine NON-PRICE structural feed' requirement; coin OI is the cleaner non-price leverage measure. The core mechanic (OI-fragility regime gate) is faithfully implemented, so this is a variant, not a mechanism swap — flagged so the analyst knows the tested quantity differs from the prose.

Verification Results

Consider refreshing the sizing base against current total book value (cash + marked sleeves) each rebalance rather than only when fully flat, so deployment tracks equity as it compounds.

Verification Results

The per-sleeve sizing base (_equity_base) is refreshed ONLY when the entire book is flat AND equity exceeds the current base. With ~77-81% risk-on days per name, all four sleeves are rarely flat simultaneously, so the base can stay stale for long stretches while equity compounds — sizing then lags actual equity (under-deploys during growth). It is bounded (capped at 98% of remaining cash, no leverage, no liquidation) so it is not unsafe, and the realized avg_position_pct ~20% shows it did track reasonably, but it is an unusual path-dependent sizing scheme worth confirming does not systematically under-invest at scale.

Backtest Review

Genuine non-price structural feed (per-name perp OI z-score) is a differentiated mechanism, and the per-leg OI wiring is now confirmed present for all four names

Backtest Review

Long-only unlevered spot construction means no liquidation risk; avg_trade_return_pct is far above the fee floor so cost-viability is not the issue

Backtest Review

max_drawdown 55.99% (CI to 85%) exceeds the 50% hard-abandon bar (L19) — for a supposedly regime-defensive 'rotate to cash before flushes' thesis this is a falsification: china_ban -38%/53% DD, ftx -21.8%, rate_shock -24.7% all hit despite the OI gate

Backtest Review

information_ratio is NEGATIVE (-0.525) versus its own equal-weight-basket benchmark (benchmark_meaningful=true): the OI-fragility gate SUBTRACTS risk-adjusted value over a naive equal-weight hold of the same four names — the +3744% headline is long-crypto beta, not the leverage-fragility edge under test

Backtest Review

avg_trade_return_pct 35.6% and daily_returns of +256% / +143% / +30% are a path-dependent compounding/leverage artifact from the self-refreshing _equity_base, not real per-trade edge (L36) — the equity curve is not trustworthy

Backtest Review

Recent regime is decisively losing: 2025 +6.3%, 2026 -22.1%, with rolling Sharpe deeply negative from late-2025 through 2026 — the 20% holdout sits squarely in the losing regime

Backtest Review

Exact L45/L49/L19 long-only multi-instrument basket family (0/84 survivors): beta-carried, negative IR vs benchmark, >50% drawdown

Iteration History

Verification failed (Layer 4 — QA review): - Code-defect / anti-signal signature plus hard-abandon drawdown. Sandbox: win_rate 0.0 and profit_factor 0.0 across ALL 8 trades, avg_trade_return_pct -31.6%, total_return -53.8%, max_drawdown 61.2% (above the 50% hard-abandon floor), Sharpe -1.53, alpha -0.41. Every trade lost and the strategy underperformed simply holding the basket — the leverage-fragility gate is anti-predictive as wired. A 0.0 win rate / 0.0 profit factor is the polarity/exit-logic defect signature, not a fee-edge shortfall. - Structurally unmeasurable: 8 trades over 362 days (~2 regime cycles x 4 names) with 138-day holds. A macro daily-toggle allocator inherently produces almost no trades; the '~80-200 trades' estimate is contradicted. No result at this sample can distinguish edge from noise. - Per-name mechanism not implemented. The description specifies a per-name OI-value z-score gate per sleeve, but the code reads only the primary BTC OI-value and toggles all four legs on that one series via a shared self._regime_on. The cross-sectional per-name signal is absent — the basket collapses into a single BTC-driven on/off switch (a different, single-signal strategy).

Iteration History

Verification failed (Layer 4 — QA review): - No fee-clearing edge on a measurable sample; the aggregate-OI-fragility premise has failed in both iterations. Sandbox: avg_trade_return_pct -1.87% (far below the 0.25% spot floor), PF 0.35, win_rate 0.23, total_return -21.6%, Sharpe -1.14 over 64 trades — a real but negative edge, not a code-defect signature. v1 (pure regime) lost 53.8% at 0% win / 61% DD; v2 (regime + trend) still loses -21.6%. Meets the developer's own abandon criterion. - The return driver has drifted to an OHLCV trend filter. The hypothesis edge is a leverage-fragility gate on perp OI-value; that OI signal alone was anti-edge (61% DD) in v1. v2's per-name selection is a price-SMA trend filter (OHLCV, L7 zero-survivor class) now shaping returns, while the OI z-score is only a BTC-only aggregate switch — not the per-name OI gate the hypothesis specifies.
Strategy report

Backtest and paper results are hypothetical. Trading involves risk of loss.