Skip to content

View original

BtcCmeWeekendGapFillReversionLS

Hypotheses

BTC Perp CME Weekend Gap-Fill Reversion, Long-Short Event-Driven (Single-Instrument BTCUSDT.BINANCE USD-M — Measure BTC's Move During the CME-Closed Weekend Window; at Monday CME Reopen Fade It Toward the Friday CME-Close Anchor, Defined-Risk, 3-Parameter)

Hypotheses

A LONG-SHORT, SINGLE-INSTRUMENT, PURE-OHLCV, EVENT-DRIVEN strategy on BTCUSDT.BINANCE USD-M that exploits the well-documented CME weekend GAP-FILL — a BTC-specific, mechanically-grounded pattern absent from my entire batch and from the visible failure history (which is momentum/reversal/carry/microstructure/funding). BTC's regulated CME futures market is CLOSED from Friday ~22:00 UTC to Sunday ~23:00 UTC, but the crypto perp trades continuously; whatever price move BTC makes during that CME-closed window is a 'gap' relative to the Friday CME settlement anchor, and when CME reopens Monday, institutional participants re-anchor to the Friday level, so price tends to REVERT and 'fill the gap' back toward Friday's CME close. The strategy measures BTC's move over the CME-closed weekend window and, at/after Monday CME reopen, FADES it: if BTC gapped UP over the weekend it SHORTS toward the Friday-close anchor, if it gapped DOWN it goes LONG toward the anchor, exiting when the gap fills (price reaches the anchor), on a defined-risk stop if it extends, or on a time-stop. This is NOT day-of-week seasonality (which died as a calendar artifact) — it is anchored to a MECHANICAL market-structure event (a specific exchange's closure creating a real re-anchoring reference), a structural cause of flow. It is single-instrument BTC (where CME futures and the gap-fill effect are strongest and most-documented), single-venue on the perp, pure OHLCV (define the anchor and weekend move from perp prices at CME session boundaries in UTC — no external CME data required), defined-risk (stop + time-stop, low leverage, no averaging down) so it cannot blow up, and LOW-FREQUENCY (one setup per week, only when the weekend gap is meaningful) with 1-3% typical BTC gaps that clear the 0.10% round trip with large margin (no fee_edge fragility). It fills the short-horizon bucket (8.9% vs ≥10%). 3 parameters (minimum gap size to act, fill/target definition, stop distance).

Hypotheses

Iteration 3, minimal change from previous_code. QA's Layer-4 rejection was not a code defect (the DST anchor fix was accepted as correct) but a claim that the reversion mechanism is absent and significantly inverted, measured as the TERMINAL 24-hour gross return of the faded direction. The one thing that measurement does not test, and the only lever left inside this hypothesis, is the HORIZON: the re-anchoring the hypothesis describes is an execution impulse at the CME reopen auction, not a 24-hour path, so a fade that targets a partial fill and is out within the first session is a different trade from the 24-hour hold the study priced. I therefore changed defaults only -- fill_frac 1.0 -> 0.5 (partial fill toward the anchor instead of the full gap), stop_pct 0.02 -> 0.01, entry_window_hours 4 -> 2 (enter at the reopen impulse, not hours later), max_hold_hours 48 -> 12 (exit inside the first CME session before the multi-day continuation dominates), and risk_frac/max_notional_frac trimmed to 0.0075/0.75 so a single trade never exceeds 75% of equity notional. No polarity flip (the mirror/continuation variant belongs to the Research Lead, as QA said), no new indicator, no new gate, no import change, and the signal, calendar, anchor derivation and intrabar exit logic are byte-identical to the previously-passing code, so Layers 1-3 stay green. One-sentence dissent as required by scope: I agree with QA that the underlying premise is likely falsified -- if this horizon-compressed version still shows negative avg_trade_return_pct, the hypothesis should be abandoned rather than iterated further, because no parameter setting can rescue a negative gross expectancy.

Hypotheses

Negative-expectancy event-driven fade with no edge to optimize. Over 299 trades: avg_trade_return_pct -0.172% (NEGATIVE), profit_factor 0.571, expectancy -$173/trade, Sharpe -0.477 (CI [-1.23,0.25]), PSR 0.31, information_ratio -1.07. It loses in EVERY year 2020-2026 (-3% to -18.5%, total_return -52.9%) and in every vol regime, so the CME weekend gap-fill premise has the wrong sign on the BTC perp — fading the weekend move loses systematically as gaps extend rather than fill (avg_loss $704 > avg_win $545, tail_ratio 0.40). max_drawdown 54.7% (CI to 82%) is past the L19 hard-abandon line. The strategy was already iterated three times (iteration 3 recentered the trade to the reopen session) and remains decisively negative, so the mechanism is falsified rather than mistuned; no search over min_gap_pct/fill_frac/stop_pct flips a negative per-trade edge positive. Failure pattern: no_edge/wrong-sign calendar-event fade with >50% DD. Not worth 2 hours of optimization.

Implementation

Event-driven long-short fade of BTC's CME-closed weekend move on BTCUSDT.BINANCE USD-M 1H bars. The Friday CME-close perp price (16:00 America/Chicago, resolved per-bar to 21:00 UTC under CDT / 22:00 UTC under CST by pure integer DST arithmetic on the bar's own timestamp) is the ANCHOR. The signal is the continuous live gap versus that anchor, (close/anchor - 1) * 100, recomputed every bar. In the first entry_window_hours after the Sunday CME reopen, if |gap| >= min_gap_pct the strategy fades it: gapped up -> SHORT, gapped down -> LONG. Exits are a PARTIAL gap fill (fill_frac of the way back to the anchor, tested intrabar against the bar high/low), a tight stop_pct stop if the move extends, or a max_hold_hours time stop inside the first CME session. All scheduling is a pure function of ts_event and the anchor is re-derived from the bar buffer each bar, so the schedule is restart/replay-identical. Sizing is capital-relative: notional = min(equity * risk_frac / stop_pct, equity * max_notional_frac), leverage 1.0, no averaging down.

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.

Verification Results

Negative, well-sampled edge (93 trades, PF 0.47, Sharpe CI entirely below zero, avg_trade_return_pct -0.21%, commission 32% of gross): the weekend gap-fill fade is wrong-signed on BTC — the weekend perp move continues more than it reverts at the reopen. Code faithfully implements the hypothesis, so a performance/premise finding for the analyst. Abandon at backtest-review per the developer's pre-registered condition; do not optimize and do not invert the sign inside this hypothesis (that's a separate Research-Lead continuation hypothesis).

Backtest Review

Clean pure-OHLCV single-instrument implementation, no data_unavailable risk (DST-aware session boundaries, restart-safe scheduling)

Backtest Review

Defined-risk, never liquidates (exposure only 2.16%, low leverage); 299 trades is a measurable sample

Backtest Review

avg_trade_return_pct -0.172% (NEGATIVE), profit_factor 0.571, expectancy -$173/trade — no edge; the fade has the wrong sign on BTC

Backtest Review

Loses in ALL seven years (2020-2026) and in every vol regime; total_return -52.9%, Sharpe -0.477 (CI [-1.23,0.25]), IR -1.07, PSR 0.31

Backtest Review

max_drawdown 54.7% (CI to 82%) — past the L19 hard-abandon line; recovery_factor -0.96, max DD duration 2373 days

Backtest Review

avg_loss ($704) > avg_win ($545), tail_ratio 0.40 — gaps extend rather than fill, so stops book losses while wins are capped at the partial-fill target

Backtest Review

Already iterated 3 times (horizon recentered to the reopen session) and still decisively negative — the mechanism is falsified, not mistuned

Iteration History

Verification failed (Layer 4 — QA review): - THE GAP-FILL REVERSION PREMISE IS FALSIFIED — the fade has NEGATIVE gross edge at every gap threshold, before fees. The developer's event study over 343 weekends (2019-12 to 2026-07) measures the mean 24h post-reopen return of the faded direction as -0.4174% at |gap|>=0.5% (t=-1.70), -0.5064% at >=1.0% (t=-1.71), -0.2466% at >=1.5%, and -0.3503% at >=2.0% — negative at every gate, so no stop or target choice can rescue it. The headline 67.3% 'gap-fill rate' that makes the setup look real is an artifact of tiny gaps mechanically filling: fill rate is INVERSELY related to gap size (95% for |gap|<0.5%, but only 45-46% above 1.5% — worse than a coin flip). The gaps large enough to clear the round trip are precisely the ones that do NOT fill, while the impressive aggregate comes from sub-0.5% gaps that any tradeable min_gap_pct excludes. The sandbox confirms the falsification: total_return -2.85%, profit_factor 0.87, win_rate 0.46, Sharpe -0.44, and avg_trade_return_pct +0.014% (essentially zero) over 46 trades. This is not a code polarity bug — the code faithfully implements the hypothesis's stated fade — it is the hypothesis's mechanism (institutional re-anchoring / gap-fill reversion) that does not exist in BTC data at tradeable gap sizes. - Fee viability: the reversion effect cannot clear the round trip because it is negative gross, and the only positive variant is neither significant nor this strategy. avg_trade_return_pct in the sandbox is +0.014% (an order of magnitude below the 0.15% floor and effectively zero). The developer notes the MIRROR (continuation) direction is positive (+0.32-0.41% net at 24h) and would clear the fee floor — but it is not significant (t=1.70 on n=205), it decays in the recent regime (2025 -0.16%, 2026 -0.79% after positive 2020-2024), and it is a weekend-momentum clone, a class with no survivors here. So there is no fee-viable, significant, non-decayed version to advance: the reversion loses gross, and the continuation is a different (insignificant, decaying, momentum-class) strategy that belongs to the Research Lead, not a rescue of this one. - DST anchor drift (developer-flagged, minor). The CME session boundaries are hardcoded as fixed UTC hours (Friday 22:00 / Sunday 23:00), but the true CME close is 16:00 America/Chicago, which is 21:00 UTC in US summer (CDT) and 22:00 UTC in winter (CST) — so the fixed-UTC anchor is off by an hour for roughly half the year. The hypothesis specified UTC boundaries so the code is faithful to it, but a DST-aware anchor would more accurately mark the actual re-anchoring reference. This does not change the verdict (the effect is falsified even at the specified boundary), but it is a construction imperfection worth recording.

Iteration History

Verification failed (Layer 4 — QA review): - REVERSION PREMISE DEFINITIVELY FALSIFIED — with the corrected DST anchor the fade's negative gross edge becomes STATISTICALLY SIGNIFICANT, i.e. BTC weekend gaps significantly CONTINUE, not fill. My iteration-1 review inferred the DST anchor drift 'does not change the verdict'; the developer measured it instead of assuming, and it strengthens the rejection. Re-running the 343-weekend event study with the true 16:00 America/Chicago boundary moves the mean 24h gross return of the faded direction from -0.4174% to -0.5623% at |gap|>=0.5%, -0.5064% to -0.5992% at >=1.0%, -0.2466% to -0.3730% at >=1.5%, and -0.3503% to -0.4206% at >=2.0% — worse at every gate — and the anti-edge crosses into significance (t = -2.34 at |gap|>=0.5%, versus -1.70 with the fixed-UTC anchor). So the mechanism the hypothesis rests on (institutional re-anchoring / gap-fill reversion) is not merely absent, it is significantly inverted in the data: the more accurately the CME close is marked, the more clearly weekend gaps continue. The sandbox confirms the fade loses harder at the corrected anchor: total_return -7.5%, profit_factor 0.66, win_rate 0.43, Sharpe -1.03, avg_trade_return_pct -0.20% over 46 trades. This is not a code polarity bug — the code faithfully implements the stated fade — the hypothesis's mechanism does not exist. - Fee non-viable, and now decisively so. avg_trade_return_pct is -0.20% (negative) in the sandbox — the faded direction has negative gross expectancy, so it cannot clear the 0.10% round trip at any configuration. The only positive-looking variant remains the MIRROR (weekend continuation), which the developer correctly did NOT ship under this hypothesis: it is a different, insignificant, recent-decaying momentum-class idea that belongs to the Research Lead, not a rescue of the reversion hypothesis. There is no fee-viable version of THIS strategy to advance. - The DST-aware anchor fix is correct and cleanly implemented (positive note). The CME close is 16:00 America/Chicago; the boundary hour is now selected per-bar as 21:00 UTC (CDT) / 22:00 UTC (CST) using pure integer arithmetic on the bar's own timestamp — a civil date recovered from the epoch-day count (_civil_year / _days_from_civil) and the second-Sunday-of-March / first-Sunday-of-November DST boundaries computed from it, verified against Python's calendar on the 2024/2025 transitions, with no new or banned imports. The scheduling remains a pure function of ts_event (day-of-week, hour, DST membership) with the anchor re-derived from the bar buffer rather than latched — restart/replay-safe per L28 — and the fade polarity and intrabar exits are unchanged. No code defect. The fix does exactly what QA asked and, by making the anchor accurate, produced the sharper falsification above.

Iteration History

Verification failed (Layer 4 — QA review): - PREMISE FALSIFIED AT THE COMPRESSED HORIZON TOO — the last untested lever is now exhausted. Iteration 3's only change is horizon compression (partial fill_frac 0.5, entry window 2h, max hold 12h, tighter stop), on the argument that the falsifying 24h event study did not price the reopen-impulse horizon. That lever fails: the sandbox is WORSE than the 24h version, not better — total_return -14.2%, profit_factor 0.336, avg_trade_return_pct -0.358% (vs -0.20% at 24h), Sharpe -1.92 (CI [-3.37, -0.15], probabilistic_sharpe 0.007) over 41 trades. So the post-settlement/reopen reversion does not exist at the reopen-session horizon any more than at 24h (where iteration 2 showed it significantly INVERTED, t=-2.34: gaps continue). The developer's OWN stated abandon criterion is now met verbatim ('if this horizon-compressed version still shows negative avg_trade_return_pct, the hypothesis should be abandoned rather than iterated further') — avg_trade_return_pct is -0.358%. This is not a code polarity bug; the fade is faithfully implemented and the mechanism is simply absent/inverted at every horizon tested. - No further iteration on this hypothesis is warranted. This is the third submission of the CME weekend gap-fill reversion; each has reconfirmed the mechanism is absent, and each backtest/sandbox cycle spent re-testing it is a cost. The construction (DST-aware, timestamp-derived CME session calendar; anchor re-derived from the buffer; intrabar-tested partial-fill target and stop; ts_opened time stop) is clean and correct and worth reusing, but the gap-fill-reversion EDGE is not present in BTC data. The remaining honest options are abandon (recommended) or, if the effect is pursued at all, a brand-new, explicitly-momentum CONTINUATION hypothesis owned by the Research Lead (which the developer correctly declined to smuggle in under this hypothesis's name), noting it is itself insignificant and recently decayed.
Strategy report

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