Skip to content

View original

BinanceTop3MultiFactorCompositeLongShort

Hypotheses

BINANCE Top-3-Major Multi-Factor Composite Long-Short (Equal-Weight Ensemble of 6 Validated Factors, Weekly Rebalance, OHLCV-Only)

Hypotheses

Multi-factor composite ranking strategy that combines ALL SIX factor signals from my in-pipeline factor zoo into a single weighted score on the three system-explicitly-confirmed-safe BINANCE perps (BTCUSDT, ETHUSDT, SOLUSDT). Each week, compute six individual factor scores for each asset, standardize them to z-scores, sum them into a composite signal, and trade the cross-section based on this aggregate. LONG the asset with the BEST composite score, SHORT the asset with the WORST composite score. This is a fundamentally NEW MECHANISM CLASS (factor ensemble) — not another single-factor variant. The six factors aggregated: (1) CS 30-day MOMENTUM (rank by trailing return), (2) CS 7-day REVERSAL (rank inversely by short-horizon return), (3) LOW VOLATILITY (rank inversely by 20-day vol), (4) TIME-SERIES MOMENTUM (per-asset vol-normalized trend t-stat), (5) MAX EFFECT (rank inversely by 30-day max daily return), (6) SKEWNESS PREMIUM (rank by 30-day return skewness; negative-skew preferred). Asness-Frazzini-Pedersen 2014 'Quality Minus Junk' (published in 2019 J. Financial Economics) demonstrates that equal-weight ensembles of orthogonal factors achieve Sharpe ratios of 1.5-2.5 — dramatically higher than any single component factor (typically 0.5-1.0) — because the factors' alpha is additive while their idiosyncratic vol diversifies away. This represents the LOGICAL COMPLETION of my 6-factor exploration phase: testing whether the ensemble outperforms any individual factor on the same safe-instrument set. Fills the SAME under-represented buckets as the prior factor strategies: MULTI scope (8.3%), market-neutral direction (10.1%).

Hypotheses

Iteration 4 targets the sole failure — Layer 3 'No trades produced' — which for this cross-sectional basket means the extra legs (ETH/SOL) never populated self._closes, so every rebalance saw <2 ready assets and aborted. Fix has two parts, both preserving the factor/z-score/rebalance/sizing logic and the Layer-2 calculate_signal signal exactly: (1) the config explicitly carries the ETHUSDT.BINANCE and SOLUSDT.BINANCE daily extra_instruments/extra_bar_types the cross-section requires; (2) I replaced the bespoke on_bar override with an override of _maybe_process_primary — the exact pattern that fixed the identical 'multi-instrument daily basket → no trades' failure on the CoinMInverseTimeSeriesMomentumLSBasketDaily sibling. This reuses the base class's proven bar routing (which buffers extra bars, calls on_extra_bar, and re-attempts the primary after each extra bar so interleaved delivery completes) while dropping the base's same-timeframe alignment barrier, which our per-asset factors don't need and which BTC/ETH/SOL (non-identical daily timestamps, SOL listed later) would never satisfy. The ready-subset (>=2) guard from iteration 3 stays, so BTC+ETH alone guarantee trades even before SOL's window fills. No imports changed (Layer 1 green); calculate_signal unchanged (Layer 2 green).

Hypotheses

Fundamentally broken on two independent counts. (1) Position-sizing/accounting defect: despite a stated dollar-neutral leverage-1.0 ~60%-gross design, exposure_pct is 205.8% and daily returns hit impossible values (-117.95% on 2021-09-17, -62.44%, -54.95%) — a dollar-neutral 60%-gross book cannot lose 117% in a day, so the multi-leg sizing produces far more gross exposure than intended, and the account LIQUIDATED on 2021-09-04 (total_return -100%, max_drawdown 100%). (2) Negative-expectancy mechanism regardless: profit_factor 0.525, Sharpe -1.32 (CI [-2.38, 0.18]), avg_trade_return_pct -12.16%, expectancy -$2,086/trade, PSR 0.015, losing in every vol regime. This is the L63 always-in multi-factor composite / L45 market-neutral basket (0/84) class, and only 51 trades is a thin sample. Neither the liquidation-grade sizing defect nor the negative-expectancy ensemble is fixable by the 3-phase optimizer, which can only tune parameters. Failure pattern: risk_reject/no_edge multi-factor composite long-short with broken sizing and liquidation. Not worth 2 hours of optimization.

Implementation

Market-neutral cross-sectional 6-factor composite long-short on BTCUSDT/ETHUSDT/SOLUSDT.BINANCE USD-M perps, daily bars, weekly rebalance, OHLCV-only. Each week it standardizes six per-asset factor scores (30d momentum, 7d reversal, low-vol, TS-momentum t-stat, MAX effect, skewness premium) into z-scores across the ready assets, sums them, then LONGs the best composite and SHORTs the worst (dollar-neutral, ~60% gross, leverage 1.0).

Verification Results

CLEAN RESTART 2026-09-04 — this run's verdict history and learning records were removed and it was restarted from verification. Its previous abandonment came from the pipeline, not from the market: the Layer-2 harness mis-bound @staticmethod helpers (fixed), QA issued terminal performance verdicts on an unoptimized smoke test (removed — QA now judges correctness only), and sandbox timeouts came from backtest-slot starvation (fixed). The hypothesis and the strategy code are unchanged. Verify the code on its merits; performance is decided later by the full backtest and the optimizer.

Backtest Review

Conceptually diversified 6-factor ensemble with a clean cross-sectional z-score/composite construction

Backtest Review

Account LIQUIDATED 2021-09-04: total_return -100%, max_drawdown 100%, CAGR -100% — blew up in 2021 despite 6 years of data

Backtest Review

Broken/excessive sizing: exposure_pct 205.8% and impossible single-day returns (-117.95%, -62.44%, -54.95%) for a claimed dollar-neutral leverage-1.0 ~60%-gross book — the multi-leg sizing produces far more gross exposure than intended

Backtest Review

Negative expectancy: profit_factor 0.525, Sharpe -1.32 (CI [-2.38, 0.18]), avg_trade_return_pct -12.16%, expectancy -$2,086/trade, PSR 0.015, skew -7.0, kurtosis 93; loses in all three vol regimes

Backtest Review

L63 always-in multi-factor composite / L45 market-neutral basket (0/84) class prior; only 51 trades is a thin sample

Iteration History

Verification failed (Layer 3 — sandbox backtest): No trades produced Bar type used: BTCUSDT.BINANCE-1-DAY-LAST-EXTERNAL, Bars processed: 2330 Diagnostics: should_enter() returned a side 0 times over 0 evaluated bars -> your ENTRY CONDITION never triggered. Loosen the entry logic / thresholds. Ensure your strategy produces trades with the given data and parameters.

Iteration History

Verification failed (Layer 3 — sandbox backtest): smoke test exceeded the 300s wall-clock limit. This almost always means per-bar work that scales with history — e.g. rescanning the full funding/supplementary series, or rebuilding a list and calling min()/sorted() inside calculate_signal()/on_bar() on every bar. Precompute sorted timestamp arrays ONCE in __init__ and use bisect, or cache lookups keyed by timestamp, so per-bar cost is O(log n) not O(n).
Strategy report

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