Skip to content

View original

BtcEthSolDailyEqualWeightTrendFilteredBasketLong

Hypotheses

BTC-ETH-SOL Daily Equal-Weight Trend-Filtered Basket Long

Hypotheses

A long-only, multi-instrument (3-asset) DYNAMIC BASKET strategy at Daily timeframe on the three most-liquid crypto majors — BTCUSDT.BINANCE, ETHUSDT.BINANCE, SOLUSDT.BINANCE. The mechanism: each Daily bar, evaluate a per-asset trend filter (close > 50-day SMA), then hold equal-weighted long positions in EVERY asset that passes its filter. Composition is dynamic: 0/1/2/3 of the assets may be held at any given time. When all three pass, the basket runs at 99% gross (33% each); when only one passes, 33%; when none pass, 100% cash. Rebalance only on filter-state transitions to avoid daily fee drag. Genuinely distinct from the two rotation strategies I recently got into pipeline (BTCETHRelativeStrengthRotationLong, BTCETHSOLThreeWayRotationLong): those concentrate ALL capital in the single-strongest asset and capture leadership-streak alpha; THIS basket diversifies across all qualifying assets and captures broad-market beta. The two mechanisms are complementary — rotation wins during clear leadership cycles (e.g., 2023 Q4 SOL season), basket wins during synchronized rallies (e.g., 2024 Q1 broad-market rally where BTC + ETH + SOL all gained 50-150%). Fills the multi-instrument scope under-quota bucket (8.9% vs target ≥15%). Uses ONLY confirmed-working Daily bars (BtcSpotDrawdownAccumulationLong validates BTC Daily, EthDailyGoldenCrossMomentumLong validates ETH Daily, SolDailyEmaTrendContinuationLong validates SOL Daily). NO secondary instruments — directly avoids the Layer-3-audit_stale failure mode that killed earlier cross-venue proposals. Long-only because all three are crypto majors with documented positive long-term drift; short-only directional has been empirically refuted.

Hypotheses

Iteration 2 fixes the over-exposure / MTM artifacts flagged in feedback. Root cause: the prior code only added on filter-flips and trimmed inside an equity-scaled band, so as held legs appreciated (and equity, via unrealized PnL, inflated the per-leg targets) gross drifted well past the intended ~96% (exposure_pct 157%, vol 159.8%, impossible +153%/+105% single-day returns). The fix keeps every earlier-passing layer intact (same imports, buffers, helpers, inert hooks, venue/config) and rewrites ONLY the sizing block in calculate_signal into three explicit stages: (1) compute a DESIRED notional per leg from one equity snapshot with the churn band, now symmetric — winners that drift ABOVE target beyond the band are trimmed back toward target, not just added on flips; (2) a HARD GROSS CAP clamps any leg still held above its target down to target so total open notional <= equity*per_leg_pct*n_legs (~0.96x) and can never exceed 100% of NAV; (3) submit the self-consistent per-leg deltas. Because the cap and the targets share the same equity snapshot (which includes unrealized PnL), exposure_pct stays anchored near 96% of current NAV and daily portfolio moves are bounded by the underlying assets' actual moves — resolving the impossible-return and inflated-volatility artifacts while preserving the dynamic 0/1/2/3-leg basket mechanism and no daily fee drag.

Hypotheses

Kill condition triggered — the multi-leg basket cannot be correctly sized in this engine after repeated attempts. The prior iteration explicitly declared the FINAL sizing-fix attempt with the kill condition 'if the next backtest still shows avg_position_pct > ~110% OR any single-day return > ~25%, abandon.' The current backtest violates it decisively: exposure_pct=157% (intended cap ~96%) and a +157.9% single-day return on 2021-05-19 — a ~30% market CRASH day on which a long-only basket must LOSE, so the value is a physically impossible accounting artifact (further artifacts: +63.1%, +58.2%; return_kurtosis=410). Across three iterations the sizing engine went 1033% -> 405% -> 157% gross and +177% -> +98.8% -> +157.9% impossible daily returns, never reaching a physically valid state, while the headline return collapsed 6704% -> 2571% -> 1603% purely from removing the leverage artifact — evidence the apparent edge is leverage/accounting distortion, not alpha. Because the metrics remain untrustworthy (impossible returns), no optimization is meaningful, and the same sizing bug has resisted multiple specific fixes, this is abandoned per the standing kill condition rather than iterated again. If the team wants to revisit the trend-filtered-basket idea, it needs a corrected sizing/accounting engine (gross anchored to a stable capital base excluding unrealized PnL, per-leg trim to target, and a per-bar gross assertion) validated on a single asset first.

Implementation

Long-only equal-weight trend-filtered basket on BTC/ETH/SOL daily perps. Each daily bar a per-asset filter (close > 50-day SMA) sets membership; the basket holds equal-weight longs (~32% each) in every passing asset, so gross runs 0/33/66/96% dynamically. Rebalancing is a self-consistent two-stage decision from a single equity snapshot: Stage 1 sets a desired notional per leg with a churn band (full exit on filter fail, hold within band, move to target beyond band); Stage 2 enforces a hard gross cap by clamping any leg held above target back to target so total open notional can never exceed equity*per_leg_pct*n_legs (~0.96x); Stage 3 submits the resulting deltas.

Backtest Review

Legitimate mechanism concept (trend-filtered long basket on 3 majors) and it does trade at reasonable frequency (167 trades)

Backtest Review

Sizing has been progressively improved across iterations (gross 1033% -> 405% -> 157%)

Backtest Review

Gross exposure STILL exceeds the intended ~96% cap: exposure_pct=157% on a long-only, leverage=1.0 basket — the 'hard gross cap' does not bind

Backtest Review

Physically impossible daily returns persist: +157.9% on 2021-05-19 (a ~30% market CRASH day, when a long basket must LOSE), plus +63.1% and +58.2% spikes; return_kurtosis=410, skew=17.9, tail_ratio=0.09 — the result is dominated by accounting artifacts

Backtest Review

This is a REPEAT of the same sizing defect flagged in prior iterations (1033% -> 405% -> 157% exposure; +177% -> +98.8% -> +157.9% impossible days) — multiple targeted fixes have failed to produce a physically valid backtest

Backtest Review

The prior iteration explicitly set a KILL CONDITION (any single-day return > ~25% => abandon); the current +157.9% day violates it by >6x

Backtest Review

The headline return has collapsed 6704% -> 2571% -> 1603% purely as leverage was removed, confirming the apparent edge is largely a leverage/accounting artifact rather than alpha

Backtest Review

Reported metrics (Sharpe 0.70, total_return 1603%, beta 0.32) cannot be trusted while the equity/return accounting produces impossible values

Analysis

Do NOT optimize — the backtest is corrupted by over-exposure and MTM artifacts that make the metrics physically impossible: exposure_pct 157% and annualized_volatility 159.8% (~1.6x) vs the intended ~96% gross (3 legs x 32%), with impossible single-day portfolio returns (2021-11-26 +153%, 2024-01-22 +105%) that cannot arise from a 96%-long basket of BTC/ETH/SOL, and end_unrealized_pct 531.96% (most of the +1696% headline is an un-exited open position). FIXES: (1) NO TRIMMING OF WINNERS: the rebalance only adds on filter-flips and the churn band ignores upside drift, so as held legs appreciate the gross exposure grows well past 96% — add logic to trim each leg back toward per_leg_pct*equity when it drifts ABOVE target by more than the band (not just below), so gross stays ~96%. (2) EQUITY-WITH-UNREALIZED-PNL FEEDBACK: target_notional = equity*per_leg_pct uses get_account_equity() including unrealized PnL while cur_notional = cur_qty*price; verify this accounting doesn't over-add, and add a hard cap so total open notional across all 3 legs <= equity * (sum of per_leg_pct) ~ 0.96x. After the fix, exposure_pct should sit near 96% (never >100%), annualized_volatility should drop to ~80-100% (crypto-major range), and no daily return should exceed what the underlying assets actually moved. (3) Confirm the result on a properly-marked, correctly-sized series. NOTE: even once corrected, this is essentially long-3-major beta with a 50-SMA timing overlay (benchmark_correlation 0.64, beta 0.30) — it will need to demonstrate genuine alpha and better risk-adjusted return than an equal-weight BTC/ETH/SOL buy-and-hold (which the trend filter is supposed to beat by side-stepping the 2022 -63.6% drawdown) to be worth optimizing; if the fixed version is just leveraged beta with no alpha over buy-hold, abandon next round.

Outcome Summary

This strategy proposed a trend-filtered equal-weight long basket across BTC, ETH, and SOL on the daily timeframe, holding each major only while it traded above its 50-day SMA. Despite a headline 1603% return and 0.70 Sharpe over ~1329 data days, the backtest exhibited physically impossible behavior — 157% gross exposure on a long-only leverage-1.0 book and a +157.9% gain on a market-crash day — driven by a persistent sizing/accounting defect. The bug survived three iterations (gross exposure 1033% → 405% → 157%; impossible daily returns 177% → 98.8% → 157.9%), with the headline return collapsing purely as leverage was stripped, indicating the apparent edge was a leverage/accounting artifact rather than alpha. The analyst therefore invoked the prior iteration's explicit kill condition and abandoned it at the backtest-review gate, before any optimization or later-stage review could run.

Outcome Summary

Multi-leg basket sizing must be validated on a single asset first and anchored to a stable capital base that excludes unrealized PnL, with a per-bar gross assertion, before trusting any headline metrics.

Outcome Summary

It was abandoned at the pre-optimization backtest-review gate (verdict: abandon), which triggered the prior iteration's standing kill condition (exposure > ~110% or any single-day return > ~25%); optimization, analyst, and risk-review stages were never reached.

Outcome Summary

A long-only, daily-timeframe equal-weight basket of BTC, ETH, and SOL that holds an equal long position in each major whose close is above its 50-day SMA, dynamically running 0–3 legs to capture broad synchronized-rally beta (distinct from its single-asset rotation siblings).

Outcome Summary

The backtest over 2019-12-31 to 2026-06-25 reported total return 1603%, Sharpe 0.70, and 167 trades, but the numbers were untrustworthy: exposure_pct hit 157% on a long-only, leverage-1.0 book, return_kurtosis reached 410, and a +157.9% single-day return appeared on a ~30% crash day.
Strategy report

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