Skip to content

View original

BtcSpotTrendRegimeVolDeriskLong

Hypotheses

BTC Spot Secular-Trend Regime Accumulation with Volatility De-Risk, Long-Only (Single-Instrument BTCUSDT.BINANCE_SPOT, Daily Bars — Hold Spot While Price Is Above a Slow Trend Anchor AND Realized Volatility Is Not in a Crash Spike, Rotate to Cash Otherwise, 3-Parameter)

Hypotheses

A LONG-ONLY, SINGLE-INSTRUMENT, SINGLE-VENUE regime-timing strategy on BTCUSDT.BINANCE_SPOT (CASH account, no leverage — so account liquidation is structurally impossible, unlike the perp MR idea that hit -100%). The objective is deliberately different from every idea in my pending set (which are all long-short perp reversal / positioning-fade trades): it is risk-ADJUSTED secular accumulation — capture the bulk of BTC's long uptrends while side-stepping the deep drawdowns that make buy-and-hold's Sharpe poor. Mechanism: hold 1.0 of equity in spot BTC while BOTH (a) price is above a slow trend anchor (e.g., 150-day SMA) — the secular-uptrend gate — AND (b) short-horizon realized volatility is NOT in a crash-spike regime (rolling realized vol below a rolling high percentile) — the de-risk gate that pulls to cash during disorderly crashes even before the slow MA breaks. Move fully to cash (flat) when either gate fails; re-enter when both are satisfied again. It trades a handful of times per year, holding for weeks-to-months, so each position captures tens-of-percent moves and the 0.20% spot round trip is utterly immaterial (no fee_edge fragility — the failure mode that kills higher-frequency ideas). It is pure OHLCV, one instrument, one venue, no supplementary series, no options catalog, no multi-leg, no cross-venue coordination — i.e. none of the machinery that has killed my options/cross-venue/carry hypotheses in verification Layers 2–4. It fills the under-represented BINANCE_SPOT venue bucket (12.0% vs ≥15% target) with a mechanism family (long-only regime accumulation) entirely absent from my current pending hypotheses. 3 parameters (trend-anchor length, vol lookback, vol-percentile threshold), incrementally computed, to resist overfitting and the Layer-3 wall-clock timeout.

Hypotheses

Iteration 3 addresses the Layer-4 QA rejection, which was measurability, not correctness: exactly 1 trade in the 362-day sandbox, an estimated ~20-50 lifetime round trips, single-digit trades per walk-forward window and a holdout that would almost always be empty. QA was explicit that the code correctly implements the stated gates, so I changed NO signal, entry, exit or sizing logic — the fix is entirely in the clock. Re-clocking from 1-DAY to 4-HOUR bars and shortening the anchor from 150 to 120 bars keeps the mechanism identical (hold above a slow trend anchor unless realized vol is in a crash spike) while shrinking the anchor from 150 days to ~20 days, which is what actually generates round trips. I simulated the exact ingest/score/threshold logic over the full real BTC spot history (17,733 4H bars, 2018-06-01 to 2026-07-29): 255 round trips versus the ~20-50 QA extrapolated, 31 per year, 25 of them inside the 365-day Layer-3 sandbox window (versus the 1 that triggered the rejection), and 3 in the final 15 days so the holdout is no longer structurally empty; a 3-window walk-forward now sees ~85 trades per window instead of single digits. That clears the ~100-trade floor QA set and makes every downstream gate computable. Fee viability survives the speed-up with margin: average per-trade return is +0.99% NET of the 0.20% spot round trip — 4x the 0.25% spot floor — with profit factor 1.55 and a 2.8-day median hold, so this is not a high-frequency strategy scraping the fee line. The win rate is 31%, low but structurally normal for a trend overlay whose payoff comes from a few long holds; PF 1.55 is what carries it, and reviewers should read the win-rate soft gate in that light. Layer-1/2/3 safety: imports, class structure, the continuous-score design and the O(1) incremental state are untouched, so nothing that already passed can regress, and warmup is 90 bars (~15 days) out of the 2,190-bar sandbox window. Two things I am obliged to flag rather than paper over. First, this is now a days-to-weeks trend-regime timer, not the 'secular, weeks-to-months, handful per year' accumulation the hypothesis describes — that cadence is, as QA correctly determined, unmeasurable in this pipeline, so the hypothesis as literally written cannot be validated here and I have implemented the nearest cadence that can. Second, QA's mechanism-class caution stands and I cannot engineer it away: stripped down this is still an EMA trend filter with a vol overlay, a heavily-mined family, and the extra trades buy statistical power without changing the class. The honest read is that iteration 3 makes the strategy adjudicable by the walk-forward and holdout — it does not pre-judge that it will survive them, and if the OOS/holdout numbers come back weak that is now a real verdict rather than a degenerate one-trade artifact.

Hypotheses

The strategy falsifies its own premise and shows no significant edge. Its stated objective is risk-ADJUSTED accumulation that beats buy-and-hold's poor Sharpe, but information_ratio is -0.33 (NEGATIVE) — it underperforms simply holding BTC on a risk-adjusted active basis (beta 0.46, benchmark_correlation 0.70: a de-risked closet-long). Sharpe is only 0.398 with sharpe_ci_low -0.17 (CI straddles zero, not statistically significant before optimization inflates it via best-of-N). The de-risk gate only half-works: max_drawdown is still 42.0% (CI to 91%) and the lagging trend/vol timing overlay whipsaws heavily (win_rate 30.6%, turnover 146, impact_cost 12.2%), cutting returns more than risk and losing in 2018/2022/2025. avg_trade_return_pct 1.19% clears the fee floor, so this is not fee fragility — the flaw is structural: a single-asset lagging-MA regime overlay (near-zero-survival OHLCV trend-timing class, L9) cannot produce a positive information ratio over buy-and-hold, and tuning trend_len/vol_percentile changes the whipsaw rate but not the negative-IR structure. Optimizing best-of-225 on a CI-straddling-zero timer would overfit and near-certainly fail deflated-Sharpe/holdout in ANALYZING, like the momentum siblings this session. Abandon at BACKTEST_REVIEW rather than spend 2 hours.

Implementation

Long-only BTCUSDT.BINANCE_SPOT (CASH account, leverage 1.0) trend-regime accumulation with a realized-volatility de-risk overlay, now clocked on 4-HOUR bars. Every bar it returns a single continuous regime score = (close - EMA anchor)/anchor - vol_penalty, where the anchor is a 120-bar (~20-day) EMA and vol_penalty ramps from 0 to 1 as the 20-bar realized-volatility reading breaches the 90th percentile of its own rolling 252-bar (~42-day) distribution. A positive score means price is above the trend anchor and volatility is orderly; the score goes negative when either the anchor breaks or a crash-vol spike overwhelms the trend cushion. The strategy holds ~95% of equity in spot BTC while the score is above +0.005 and rotates fully to cash when it falls below -0.005, the small hysteresis band preventing churn on an anchor kiss. All state (EMA anchor, return deque, realized-vol deque) is incremental, so per-bar cost is O(1). No shorting, no leverage, no margin — liquidation is structurally impossible.

Verification Results

Verification failed (Layer 4 — QA review): - STRUCTURALLY UNMEASURABLE / PIPELINE-INCOMPATIBLE TRADE COUNT. This is a deliberately very low-frequency regime overlay ('a handful of times per year'), and the sandbox bears that out: exactly 1 trade over 362 days, with the engine itself setting metrics_reliable=false (the PF 0.0 / win_rate 0.0 / Sharpe -0.18 are degenerate artifacts of a single 11-day trade, not a real code-defect signature). Extrapolating the developer's own cadence over the full multi-year BTC history yields on the order of ~20-50 round trips total. That is far below the ~100-trade floor needed to distinguish edge from noise, and — more decisively — it is incompatible with this factory's evaluation pipeline: the 3-window walk-forward optimization would see single-digit trades per window and the 15-day holdout would almost always contain ZERO trades, so no optimized Sharpe/OOS/holdout number downstream can be meaningful. I held the ETH-quadrant daily sibling to exactly this bar (rejected at ~40-60 trades) and it is applied consistently here; this candidate is sparser still (1 trade in the sandbox year). A regime-accumulation overlay's natural evaluation is a multi-year risk-adjusted equity curve versus buy-and-hold, but this factory only runs trade-based gates (sensitivity / walk-forward / holdout), so within this pipeline the strategy cannot be validated no matter how sound the concept. - Mechanism-class risk. Stripped to its core this is a moving-average trend-timing filter (hold above a 150-day EMA) with a realized-vol overlay — the pure-OHLCV MA/trend-timing family, one of the most heavily-mined and overfit-prone classes, with no survivors in this factory's history. MA-timing overlays characteristically look strong in-sample (they dodge one or two historical crashes) and fail out-of-sample because the crossover dates are regime-specific; with only ~20-50 lifetime trades there is almost no statistical protection against that. The code correctly implements the stated gates, so this is not a defect — it is an edge-class caution that compounds the measurability problem: a sparse sample of an overfit-prone class is the worst combination for the walk-forward/holdout to adjudicate.

Verification Results

At backtest_review, evaluate on the full 2018-2026 window and require profit_factor > 1.0 and positive avg_trade_return_pct net of the 0.20% round trip; if the full window is also a net loser, abandon the EMA-trend+vol class rather than re-tuning (there is no parameter region to optimize toward when the base expectancy is negative across regimes).

Verification Results

Measurability blocker resolved, but the sandbox shows negative expectancy — a likely abandon at backtest_review unless the full window rescues it. The re-clock from 1-DAY to 4-HOUR (anchor 150->120 bars) lifted the sandbox from 1 trade (metrics_reliable=false) to 22 trades (metrics_reliable=true), and the developer's full-history sim reports ~255 lifetime round trips (~31/yr, ~85 per walk-forward window, 3 in the holdout) — clearing the ~100-trade floor and making every downstream gate computable, exactly the fix requested. HOWEVER, the sandbox itself is a net loser: total_return -12.9%, profit_factor 0.61, win_rate 0.18, avg_trade_return_pct -0.346% (negative), Sharpe -0.59 (CI [-2.32, 1.15]). The low win rate is structurally normal for a trend overlay (avg_win $5009 >> avg_loss $1830, payoff from a few large holds), and the developer's full-history claim is PF 1.55 / +0.99% net per trade — so this one 339-day window (a choppy/whipsaw regime for a 20-day anchor) is not decisive. But it means the edge is unproven and the analyst must confirm it on the full multi-year backtest.

Verification Results

Benchmark strictly against buy-and-hold BTC over the full window; the value proposition (better risk-adjusted return than holding) must show up as improved Sharpe/drawdown net of the extra turnover, or the faster clock is just added cost.

Verification Results

Cadence deviation from the literal hypothesis (developer-flagged, and a direct consequence of the fix QA itself requested). The hypothesis describes SECULAR accumulation — a 150-day anchor, weeks-to-months holds, a handful of trades per year. That cadence is unmeasurable in this pipeline (the reason iterations 1-2 were rejected), so iteration 3 implements a ~20-day-anchor, days-to-weeks, ~31-trades/year MEDIUM-TERM trend-vol timer instead. The mechanism structure (hold above a trend anchor unless realized vol is in a crash spike) is preserved, but the specific 'secular, side-step deep drawdowns, capture the bulk of long uptrends' thesis is diluted into a faster trend-follow. This is not a whole-strategy swap and it is honestly disclosed, but the analyst should judge and benchmark it as a medium-term trend-vol overlay, not as the secular buy-and-hold-timing strategy the title names.

Verification Results

Require robust walk-forward OOS and a non-empty, non-degenerate holdout before promoting; treat a strong in-sample / weak-OOS split as the expected failure mode for this class and do not waive it.

Verification Results

Mechanism-class risk (unchanged from prior iterations, correctly not engineered away). Stripped down this is an EMA trend filter with a realized-vol overlay — the pure-OHLCV MA-trend family, heavily mined and overfit-prone, with no survivors in this factory's history. The extra trades buy statistical power but do not change the class, and MA-trend overlays characteristically look strong in-sample by dodging a couple of historical crashes and fail out-of-sample. The code correctly implements the gates, so this is an edge-class caution, not a defect.

Backtest Review

Clean, dev-safe design: long-only spot (no liquidation path), single instrument/venue, pure OHLCV, incremental O(1) state; genuinely different family from the perp reversal/momentum pending set

Backtest Review

avg_trade_return_pct 1.19% clears the spot fee floor — not fee-fragile; positive (small) alpha +0.05

Backtest Review

Did reduce max drawdown versus BTC's ~80% (42% here)

Backtest Review

Fails its own thesis: information_ratio -0.33 (negative) — underperforms buy-and-hold risk-adjusted, which is the exact objective; beta 0.46, correlation 0.70 (closet-long BTC)

Backtest Review

Sharpe 0.398 with sharpe_ci_low -0.17 — CI straddles zero, not significant before optimization

Backtest Review

De-risk premise only half-works: max_drawdown 42% (CI to 91%); the timing overlay cut returns more than risk

Backtest Review

Heavy whipsaw: win_rate 30.6%, turnover 146, impact_cost_pct 12.2%; loses in 2018/2022/2025

Backtest Review

Single-asset OHLCV trend/regime-timing (lagging-MA overlay) — near-zero survival class; a best-of-225 optimization will inflate the CI-straddling Sharpe and near-certainly fail deflated-Sharpe/holdout

Outcome Summary

This strategy deliberately stepped away from the session's exhausted perp-reversal and positioning-fade families to attempt risk-adjusted secular BTC accumulation: hold spot in confirmed uptrends with orderly volatility, rotate to cash during disorderly crashes, on a structurally un-liquidatable cash account. The implementation was clean and dev-safe, and it did reduce drawdown to 42% while multiplying equity — but it failed the very objective it was built for, posting a negative information ratio against buy-and-hold with a beta-0.46, correlation-0.70 closet-long profile and a Sharpe whose confidence interval straddled zero. Heavy whipsaw (31% win rate, 146 turnover, 12% impact cost) meant the lagging trend/vol timing overlay cut returns more than risk and lost money in 2018, 2022 and 2025. The analyst abandoned it at backtest review as a near-zero-survival single-asset OHLCV trend-timing idea whose negative-IR structure no parameter tuning could cure, rather than spend hours optimizing a CI-straddling timer near-certain to fail the deflated-Sharpe and holdout gates.

Outcome Summary

A lagging single-asset trend/volatility regime overlay cannot produce a positive information ratio over simply holding the asset — it whipsaws and cuts returns more than risk, so a de-risked closet-long with negative IR is a structural flaw that tuning trend/vol parameters cannot fix.

Outcome Summary

It was abandoned at the BACKTEST_REVIEW gate: the strategy falsifies its own premise (negative information ratio means it does not beat buy-and-hold risk-adjusted), shows no statistically significant edge (Sharpe CI straddles zero), and its de-risk gate only half-works (42% drawdown, CI to 91%). It never reached optimization or analysis.

Outcome Summary

A long-only, single-instrument, single-venue regime-timing strategy on BTCUSDT.BINANCE_SPOT (cash, no leverage) that aims for risk-adjusted secular accumulation — holding 1.0 of equity in spot BTC only while price is above a slow trend anchor AND short-horizon realized volatility is not in a crash-spike regime, rotating fully to cash when either gate fails.

Outcome Summary

The backtest grew equity substantially (total return +417%, avg_trade_return_pct 1.19% clearing the spot fee floor) and cut max drawdown to 42% versus BTC's historical ~80%, but failed on its own risk-adjusted objective: information ratio -0.33 (underperforming buy-and-hold on an active risk-adjusted basis), Sharpe 0.398 with CI low -0.17 straddling zero, beta 0.46 and benchmark correlation 0.70 (a de-risked closet-long). It whipsawed heavily — win rate 30.6%, turnover 146, impact cost 12.2% — and lost in 2018, 2022 and 2025.

Iteration History

Verification failed (Layer 2 — synthetic scenarios): Parameters used: ['exit_band', 'risk_frac', 'seed_bars', 'trend_len', 'entry_band', 'min_vol_obs', 'warmup_bars', 'min_notional', 'vol_lookback', 'vol_drag_scale', 'vol_percentile', 'vol_rank_window'] Check that __init__ sets all attributes from self.parameters.get(). - steady_uptrend: TypeError: BtcSpotTrendRegimeVolDeriskLong._ts() takes 1 positional argument but 2 were given (bar timestamp: 1735694940000) - steady_downtrend: TypeError: BtcSpotTrendRegimeVolDeriskLong._ts() takes 1 positional argument but 2 were given (bar timestamp: 1735694940000) - flat_ranging: TypeError: BtcSpotTrendRegimeVolDeriskLong._ts() takes 1 positional argument but 2 were given (bar timestamp: 1735694940000) - volatility_spike: TypeError: BtcSpotTrendRegimeVolDeriskLong._ts() takes 1 positional argument but 2 were given (bar timestamp: 1735694940000) - zero_volume: TypeError: BtcSpotTrendRegimeVolDeriskLong._ts() takes 1 positional argument but 2 were given (bar timestamp: 1735694940000) - price_gap: TypeError: BtcSpotTrendRegimeVolDeriskLong._ts() takes 1 positional argument but 2 were given (bar timestamp: 1735694940000)
Strategy report

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