Skip to content

View original

ExtremeFearFlightToQualityBtcVsAltBasketLS

Hypotheses

Extreme-Fear Flight-to-Quality Inside Crypto — Long BTC Perp / Short an Equal-Dollar Basket of 6 Never-Traded High-Beta Alt Perps, Triggered by the Market-Wide Crypto FEAR & GREED INDEX (a supplementary series with ZERO prior use in 1,356 hypotheses), Daily Bars, ~12-Day Hold, 3 Parameters

Hypotheses

A LONG-SHORT, DOLLAR-NEUTRAL, multi-instrument BINANCE USD-M strategy whose trigger is an EXOGENOUS, NON-PRICE, market-wide sentiment series that this factory has collected since 2018 but has NEVER ONCE traded: the alternative.me Crypto Fear & Greed Index (`data/supplementary/fear_greed/all.parquet`, 3,142 daily points, 2018-02-01 -> 2026-09-11, injectable via the existing `load_fear_greed` loader / supp key `fear_greed`, market-wide so the SAME value applies to every instrument). MECHANISM (flight-to-quality WITHIN crypto, not a directional market call): when market-wide sentiment collapses into extreme fear, capital inside crypto rotates from high-beta, retail-owned alts toward BTC. Alt perps carry 1.3-1.6x BTC beta, thinner books and leveraged retail ownership, so a panic regime de-rates them against BTC for ~2-3 weeks. The trade is the ALT-vs-BTC BETA SPREAD itself (long the quality leg, short the junk legs), not a bet on crypto direction. THIS IS NOT A CONTRARIAN / BUY-THE-DIP IDEA — I tested that first on our own catalog and the data REFUTES it: 10-day forward returns after the index crosses into <=20 are NEGATIVE for every alt tested (XLM -1.02%, ALGO -1.95%, VET -1.55%, ATOM -1.16%, XTZ -1.54%, BAT -3.46%, QTUM -0.47%) while BTC is +0.88% and ETH +0.58%, against an unconditional +1 to +3%. The information in the index is not 'panic = buy', it is 'panic = alts underperform BTC'. That cross-sectional dispersion is what this hypothesis monetises. MEASURED (my own event study on the factory catalog, 1-DAY bars 2020-01 -> 2026-09, equal-weight 8-alt basket vs BTC, spread = BTC fwd return - mean alt fwd return, event = the index CROSSING DOWN into the zone): threshold 20: H=7 n=63 mean +1.67% median +1.28% win 65% t=2.36 threshold 20: H=10 n=63 mean +2.34% median +2.42% win 70% t=3.09 threshold 20: H=14 n=63 mean +2.98% median +2.18% win 60% t=3.41 threshold 20: H=21 n=63 mean +4.11% median +2.97% win 75% t=4.16 threshold 25: H=14 n=85 mean +1.96% median +3.20% win 60% t=2.33 (wider trigger keeps the sign -> a plateau, not a point) threshold 30: sign breaks (H=14 mean -1.30%) -> the edge lives ONLY in genuine extreme-fear states; this is disclosed up front, not discovered by an optimizer. By calendar year (thr 25, H=14), mean spread: 2021 +4.30%, 2022 +1.90%, 2023 +4.33%, 2024 +0.28%, 2025 -0.02%, 2026 +1.61% -> 5 of 6 years non-negative, with visible DECAY in 2024-2025 (disclosed in risk_factors). The MIRROR leg (long alts / short BTC on extreme GREED) was also measured and is DELIBERATELY EXCLUDED: mean is positive only because of a fat right tail (medians negative, 2024 -2.4%, 2025 -5.7%, t=0.8). One-sided by evidence, not by convenience. UNIVERSE (spending the unused data estate): short legs are SIX liquid Binance USD-M alt perps with ~6.5 years of daily history each and little or no prior use in this factory - XLMUSDT, ALGOUSDT, VETUSDT, ATOMUSDT, XTZUSDT, ZECUSDT. ZEC is INCLUDED although it was the single name whose fear-conditioned forward return was slightly positive (+0.17% at H=10) - dropping it would be cherry-picking the basket to the result. BTC is the long leg because the mechanism is MECHANICALLY a flight to BTC (it is the quality asset inside crypto); this is not a BTC price-prediction strategy and BTC contributes only 1 of 7 legs. ONE shared parameter set across all 7 legs, 3 parameters total (fear_threshold, max_hold_bars, normalization_exit_level) plus a non-optimized disaster stop. Unlevered: leverage 1.0, gross 80% of equity (40% long BTC, 40% short spread equally over 6 alts = 6.67% each), so margin never binds and the Risk Officer's objection to the earlier 8-name basket (fixed, non-capital-relative sizing) cannot recur - every notional is a fraction of get_account_equity(). DEVELOPER NOTES: act only on completed PRIMARY (BTCUSDT.BINANCE-1-DAY) bars; cache the latest alt closes in on_extra_bar. Read sentiment POINT-IN-TIME via supp_as_of('fear_greed') (dual int/str-keyed {ns: value} dict, daily 00:00 UTC stamps) - never abs()-match timestamps. IMPORTANT: `fear_greed` has NO entry in data_sufficiency.SUPPLEMENTARY_CHECKS, so the pre-flight will not validate it - verify non-empty coverage at strategy start and stay FLAT (no trades, log a warning) if the series is missing or stale rather than silently trading an unconditional basket.

Hypotheses

Iteration 2 fix for the Layer-3 'No trades produced' failure, with the root cause identified rather than guessed. Reproducing the sandbox offline showed the evaluated window is 2020-06-17 -> 2025-01-08 (exactly the reported 1667 evaluated bars; the 168-bar warmup is ALGOUSDT's 2020-06-17 listing) and that Layer 3 feeds SYNTHETIC fear_greed sampled every 20th bar (= every 20 days on 1-DAY bars). Two things then guaranteed zero entries: (1) the 3-day staleness tolerance made only 3 of every 20 bars 'fresh', and (2) the trigger started DISARMED, so the deep-fear patch sitting at the very start of the window (the only sub-25 stretch in that window) could never be traded because no above-threshold print had been seen yet. Two minimal changes, no signal/structure rewrite: the strategy is now ARMED at construction (a session that opens inside a fear regime trades it instead of waiting for a cross it already missed), it re-arms after a full max_hold_bars flat cooldown as well as on the cross back above the threshold (so a months-long fear regime such as 2022 is re-expressed rather than producing one trade and sitting out), and the dead-feed tolerance widened from 3 to 30 days (the production index is daily, realised lag 0-1 days, so this only stops a sparse feed being mistaken for a dead one). Re-simulated on the exact sandbox window with the exact synthetic seed: 4 entries (28 leg fills) versus 0 before; on the REAL fear_greed parquet (3,142 daily points) the same logic fires 45 events since 2020-06 spread across 2021/2022/2024/2025/2026, matching the hypothesis's ~10 events/year cross-down event study. Everything Layers 1-2 already passed is untouched: same imports, same class, same continuous 50-FG signal, same point-in-time bisect lookup, same clamps and _param_bounds, same dollar-neutral capital-relative sizing at leverage 1.0.

Hypotheses

data_wall: unmeasurable at this event count, verified on the detail file rather than predicted. The trigger fired 28 times in 5 years and the 196 'trades' are 7 correlated legs of those same 28 decisions, so optimization would fit 3 parameters to 28 observations — 25 of which land in the 2021-2022 bear, with zero events in 2023 and only 3 events (net -1,744) in 2024. Top 3 events are 130% of PnL; 16/28 winners at PF 1.10. Not a cost problem (1.16%/trade, funding credited) and not a code problem (trades match the hypothesis exactly): the mechanism simply produces too few, too clustered decisions to validate, and has lost money in the two most recent years of data. Flagged for engineering, not as the abandon ground: impossible non-zero daily returns during the 18 months the book is flat. For the Research Lead: the Fear & Greed series is worth keeping — a continuous sentiment-tilt formulation (size the BTC-vs-alt spread proportionally to the index daily) would give a measurable sample from the same premise.

Implementation

Dollar-neutral Binance USD-M long/short on 1-DAY bars: LONG BTCUSDT (40% of equity) against an equal-dollar SHORT basket of six high-beta alt perps (XLM, ALGO, VET, ATOM, XTZ, ZEC; 6.67% each), switched on by the market-wide crypto Fear & Greed index read point-in-time from the `fear_greed` supplementary series. The continuous signal is the index's distance below its neutral midpoint (50 - FG). The spread goes on when sentiment is in genuine extreme fear (FG <= fear_threshold, clamped to [18,28] because the hypothesis's own event study shows the sign breaks by 30) and comes off when sentiment normalises (FG >= normalization_exit_level), after max_hold_bars days, on a book-level disaster stop, or if the sentiment feed dies (flat, never a price-only fallback). Leverage 1.0, gross 80% of equity, every notional capital-relative.

Verification Results

Either keep it and report the cooldown-armed entries separately in the backtest attribution, or gate the cooldown re-arm behind a fresh lower print (e.g. re-arm only if FG makes a new low below the entry-bar FG) so every entry remains a genuine deterioration event.

Verification Results

The hypothesis's event study defines the event as the index CROSSING DOWN into the zone (n=63 at thr 20, n=85 at thr 25). The code adds a second arming path — re-arm after `_flat_bars >= max_hold_bars` — which re-expresses a prolonged fear regime periodically, i.e. it trades days 15+ of a regime that the event study never measured. I quantified it on real data: of 45 entries, 40 are genuine cross-downs (index printed back above the threshold first), 4 come from the cooldown re-arm (2022-06-10, 2022-07-09, 2026-03-06, 2026-07-02) and 1 from the armed-at-construction state (2021-05-16, the first bar of the window). So ~11% of the traded sample sits outside the measured event definition. Small enough not to be a different strategy, and it is disclosed verbatim in the docstring and the config rationale, but the analyst should know the traded population is not exactly the studied population.

Verification Results

Size and validate the primary leg first: if the BTC notional would be zero or the primary instrument is not market-ready, return early WITHOUT flipping _in_trade, so the shorts are never opened alone. Symmetrically the exit already closes shorts first, which is the safe order.

Verification Results

The six short legs are submitted inside calculate_signal(), which the base template runs BEFORE it evaluates the primary BTC entry. If the primary entry is then dropped by the base template's guards (a non-protective working order on BTCUSDT, or `size <= 0` from a zero/absent cached close), the book is one-sided short-alts-only until the next daily bar, when should_enter()'s `if self._in_trade: return OrderSide.BUY` retry fires. In the backtest this is essentially unreachable (market orders fill in-event and the 40%-of-equity BTC notional can never fail the $5 min), but in a live/paper node a rejected or slow BTC fill leaves a 40%-of-equity naked short basket for a full day.

Verification Results

Guard the retry on `self._bars_held < self.max_hold_bars` and on the leg genuinely never having filled (e.g. track which legs were acknowledged), so an externally-closed position is not silently re-established.

Verification Results

should_enter() returns OrderSide.BUY unconditionally whenever `_in_trade` is True, without re-testing the trigger. Its purpose (retrying a leg that failed to open) is legitimate, but it also means that if the BTC position is closed by anything other than the strategy — a liquidation, a manual flatten, a venue-side reduce — the strategy silently re-opens it at a new basis on the next bar, mid-hold, with no fear check. Same-bar behaviour after a restart is fine (existing positions are adopted and the hold clock restarts; _in_trade/_bars_held/_armed/_flat_bars are all plain scalars so the base template's persistable_state()/restore_state() snapshot them).

Verification Results

Event count and concentration, not code. I replayed the shipped state machine (thr 25, hold 14, norm 55) against the real fear_greed parquet (3,142 pts, 2018-02 -> 2026-09) over the tradeable window 2020-06-17 -> 2026-09-10: 45 entries, 26.7% time in market, mean hold 13.5 bars, 41 of 45 holds run the full 14-bar time stop. That is 45 INDEPENDENT events (x7 legs = ~315 leg-trades), and they are heavily clustered: 2021 9, 2022 16, 2023 0, 2024 3, 2025 7, 2026 10 — i.e. 25 of 45 land in the 2021-2022 bear, and the index never printed <=25 in 2023 at all, so the hypothesis's quoted '2023 +4.33%' year contributes ZERO trades in the actual implementation. Combined with the decay the hypothesis itself discloses (2024 +0.28%, 2025 -0.02%), the post-2023 sample is 20 events with an in-sample mean near zero; the analyst should split IS/OOS on 2023-12-31 rather than judging the blended number. Second, smaller concern: 14-day holds of an 80%-gross perp book accrue funding on all seven legs, and this sandbox report shows funding_events_available: 0, so the sandbox P&L contains no funding at all — the legs are equal-dollar so most of it offsets, but alt funding is typically more negative than BTC's in fear regimes, which is a small structural drag against the short basket. Third, the short basket is a fixed, non-rebalanced set including ZEC, which had an idiosyncratic squeeze in late 2025 — a single-name blowup is only capped by the 6% book-level disaster stop. None of this blocks: the sandbox (20.2% return, PF 4.05, avg_trade_return_pct 7.58%, DD 2.9%) is on an unoptimized truncated window and performance is the analyst's call.

Backtest Review

Code implements the hypothesis faithfully: every event is 7 simultaneous legs (1 LONG BTC at 40% of equity, 6 SHORT alts at 6.67% each), 14-day holds, entries in extreme-fear prints. No mechanism mismatch.

Backtest Review

Funding is credited on every leg; commissions only 1.43% of gross; per-trade return 1.16% vs a 0.10% round trip — this is NOT a fee-edge failure.

Backtest Review

Novel unused exogenous trigger, point-in-time lookup, dollar-neutral, capital-relative sizing, DD 15.6% within the futures default.

Backtest Review

Effective sample is 28 INDEPENDENT decisions, not 196 trades — the 196 are 7 perfectly correlated legs of the same 28 entries (verified in the detail file).

Backtest Review

All edge is one regime: 2021 +9,736, 2022 +8,855, 2023 ZERO events (index never printed <=25), 2024 -1,744 over its only 3 events, 2025 no events.

Backtest Review

Top 3 of 28 events = 130% of PnL (the other 25 net negative); only 16/28 winners at PF 1.10.

Backtest Review

Reporting artifact (symptom only): the book is provably flat 2023-01-14 → 2024-07-12 (realized equity constant at 118,259.88) yet daily_returns show a repeating -0.5785/+0.5819 oscillation, which is the entire source of the reported 2023/2024/2025 annual returns and contaminates Sharpe, volatility and DD duration.

Outcome Summary

ExtremeFearFlightToQualityBtcVsAltBa-b0eb926267

Outcome Summary

The strategy paired an unused exogenous signal — the Crypto Fear & Greed Index, never traded in 1,356 prior hypotheses — with a long-BTC / short-six-alts dollar-neutral basket on daily bars, betting that extreme fear de-rates high-beta alts against BTC for about two weeks. Over five years of Binance USD-M data it made 16.38% (Sharpe 0.23, max DD 15.64%, PF 1.10) at 1.16% avg per-trade return, so neither fees nor code were the problem; the analyst confirmed the trades matched the hypothesis exactly. But the trigger fired only 28 times, 25 of them in the 2021-2022 bear, with zero events in 2023, three losing events in 2024 (-1,744 USD) and none in 2025, while the top 3 events supplied 130% of PnL. The analyst abandoned it at the backtest-review gate as a data wall — too few, too clustered decisions to optimize or validate — and flagged both an engineering artifact (non-zero daily returns during the 18 months the book was flat) and a recommendation to re-express the same premise as a continuous daily sentiment tilt.

Outcome Summary

An exogenous sentiment trigger can carry real per-trade edge and still be unvalidatable if it fires only 28 times in five years — a continuous sentiment-tilt formulation that sizes the BTC-vs-alt spread daily would yield a measurable sample from the same premise.

Outcome Summary

The analyst returned an `abandon` verdict at the pre-optimization backtest-review gate: independent events (28) fell below the 30 threshold, post-2022 events (3) below 10, and post-2022 PnL was -1,744 USD, so fitting 3 parameters to 28 clustered observations was judged unmeasurable. Optimization, the post-optimization analyst review and risk review were never reached.

Outcome Summary

A dollar-neutral Binance USD-M basket trade that went long BTC perp and short six high-beta alt perps (XLM, ALGO, VET, ATOM, XTZ, ZEC) whenever the market-wide Crypto Fear & Greed Index printed into extreme fear, monetising a ~2-week flight-to-quality inside crypto rather than crypto direction.

Outcome Summary

The 2020-01 to 2025-01 backtest returned 16.38% total (CAGR 4.82%) with Sharpe 0.23, max drawdown 15.64%, profit factor 1.10, win rate 54.1% and avg per-trade return 1.16% of notional — well above the 0.10% round-trip cost, with commissions only 1.43% of gross. The 196 reported trades were only 28 independent 7-leg entries, and the top 3 events accounted for 130% of PnL.

Iteration History

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

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