Skip to content

View translation

BnbBtcLogRatioTrendDollarNeutralLS

Hypotheses

BNB/BTC Relative-Strength Ratio Momentum, Dollar-Neutral Long-Short (BINANCE USD-M Perps, DAILY Bars, Idiosyncratic-Supply Driver, Deadband Trend on the Log-Ratio, 3-Parameter)

Hypotheses

A MARKET-NEUTRAL (dollar-neutral) PAIRS spread that trades the TREND of the BNB-vs-BTC log price ratio, not either coin outright. This re-expresses the factory's one proven mechanism family (slow directional trend/momentum on liquid majors) as a RELATIVE-VALUE spread on an instrument PAIR with a genuine idiosyncratic driver, rather than a symbol-swap of the volume-confirmed single-name recipe (avoiding L91). Both legs are BINANCE USD-M perps sized to equal dollar notional so net beta-to-BTC is ~0; PnL comes from the ratio drifting — a different bet than the 70%/85% of the corpus that is directional BINANCE longs. Fills three under-represented buckets: pairs scope (14% vs single 67.5%), long_short (14.5% vs 85.5% long-only), and market-neutral. Only 3 parameters to resist the overfit graveyard.

Hypotheses

Implements the hypothesis exactly: slow time-series trend applied to the BNB/BTC RELATIVE price rather than an outright, expressed as a market-neutral two-leg perp spread with a deadband. Normalizing the N-day log-ratio drift by its own realized noise (sigma*sqrt(N)) makes the threshold scale-invariant across regimes (per L5, no fixed % gates). Equal-dollar legs opened/closed together in one place keep net delta ~0 and rule out the leg-sizing imbalance that has driven neutral books to -100% (L59). Venue: BINANCE USD-M is required because one leg is always short and the edge is a perp-vs-perp spread; leverage 2.0 is genuinely consumed in _open_spread (each leg notional = equity * 0.30 * 2.0 = 0.6x equity, ~1.2x gross, ~0 net) so a spread book whose volatility is far below single-name volatility can be sized meaningfully while staying inside the margin model. Frequency/fee sanity checked offline on the catalog's 2020-2026 daily bars: the exact rule fires ~60 round trips with a median 16-day hold and a mean ~4.1% log-ratio move per trade, an order of magnitude above the ~0.2% two-leg round-trip taker cost, so the design is neither zero-trade (L21/L25) nor fee-fragile. Warm-up is only 2N+5 = 45 daily bars, a small fraction of the sandbox window.

Hypotheses

analyzing_stuck_3_timeouts

Implementation

Dollar-neutral BNB-vs-BTC pairs spread on BINANCE USD-M perps, daily bars. Forms the log price ratio r = ln(BNB/BTC) from a timestamp-aligned two-leg buffer and computes a continuous, unit-free trend score = (r_t - r_{t-N}) / (stdev(dr) * sqrt(N)) every bar. When |score| >= entry_threshold it opens the spread in the direction of the ratio's drift (score > 0: LONG BNB / SHORT BTC; score < 0: the mirror), with both legs sized to the SAME dollar notional (equity * leg_pct * leverage) so the book is dollar-neutral and net beta-to-BTC is ~0. The position is closed when the aligned trend strength decays into the deadband (dir * score < exit_threshold), which also captures an outright sign flip. Three tunable decision parameters (lookback_days, entry_threshold, exit_threshold) plus the sizing fraction; no supplementary data, pure OHLCV.

Verification Results

Rely on the internal ratio-length guard (already present) or confirm the base actually consumes the override; consider renaming if the override is not deliberate.

Verification Results

min_bars_required() overrides the framework method (static-analysis base_shadow warning). Warm-up gating is instead enforced internally in calculate_signal via `if len(self._ratios) < 2*n+1: return 0.0`, so behavior is correct, but the override may not be honored by the base warm-up path. Non-blocking since the internal guard is sound and the sandbox warmed up and traded (120 trades).

Verification Results

Confirm dispatch order guarantees the extra (BTC) bar is committed before the primary bar for the same timestamp, or accept the one-bar alignment lag as a known characteristic.

Verification Results

SyncedBuffer alignment depends on both legs' daily bars being present for the same timestamp when calculate_signal runs on the BNB (primary) bar. If the BTC extra bar for the day has not yet been dispatched, update_a will not form a pair that bar, introducing a one-bar lag in ratio formation. Not a look-ahead and self-correcting, but can slightly shift entry timing.

Verification Results

Sandbox returns are extremely tail-driven: return_skew 4.74, return_kurtosis 93.2, largest_win $516k vs avg_win $34k, and the stressed vol tercile carries the bulk of PnL (+274% vs +17% calm / +46% normal). Sharpe 0.71 with CI low 0.0069 (barely above zero) and max_drawdown 54%. The edge may be a handful of large ratio dislocations rather than a persistent drift signal; the analyst should confirm profitability survives excluding the top 2-3 trades and that the ratio-trend holds outside stressed regimes.

Backtest Review

Mechanism faithfully implemented and matches the hypothesis: 60 long + 60 short balanced pair trades, both legs equal-dollar-notional (dollar-neutral), trend-on-log-ratio deadband rule. benchmark_meaningful=false correctly flags it as market-neutral, so judge on absolute risk-adjusted metrics, not buy-hold.

Backtest Review

Numerically viable on a decisive 120-trade / 6.5-year sample: profit_factor 1.316 (clear of the [0.85,1.10] fee-drag band), avg_trade_return_pct 5.35% (two legs, far above the 0.15% Binance USD-M floor; commission only 1.65% of gross, impact 2.85%), positive Sharpe 0.71, capacity $123M.

Backtest Review

Differentiated: a pairs/long-short/market-neutral trend spread, not a single-name OHLCV clone (avoids L91/L93) nor a cointegration mean-reversion (distinct from the recent DotAda/DotKsm PF~1.0 abandons).

Backtest Review

The headline +288% 2021-03-12 print is NOT an artifact — verified in the detail file it is the realized exit of a LONG-BNB trade held 2021-01-28->2021-03-12 (+$477.7k) that captured the real Feb-2021 BNB/BTC ~6x breakout; daily_returns is keyed on trade-close dates.

Backtest Review

Severe single-trade / single-year concentration: the one Feb-2021 BNB trade (+$478k) alone exceeds total net PnL, and annual returns are +297% in 2021 vs modest/negative elsewhere (2022 -10.1%, 2024 -3.7%). return_skew 3.75 / kurtosis 69.5. QA's concern is real — the edge may be a handful of dislocations.

Backtest Review

Sharpe 95% CI [-0.039, 1.374] straddles zero; the edge is not yet statistically distinguishable from noise on the full sample.

Backtest Review

max_drawdown 54% on a nominally market-neutral book (driven by the 2021 spread reversal, e.g. -$152k trade closed 2021-06-03) is high for a neutral strategy; will be tested against the QUALITY drawdown floor at promotion.

Backtest Review

Profit tilted to the stressed vol tercile (+272%) though calm (+21%) and normal (+43%) are still positive (only_one_regime=false).
Strategy report

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