Skip to content

View original

BtcCmInverseUsSessionMomentumContinuationLS

Hypotheses

BTC COIN-M US-Session Momentum-Continuation Seasonality, Long-Short (Single-Instrument BTCUSD_PERP.BINANCE_CM, 1h Bars OHLCV-Only, Enter in the Direction of a Significant Early-US-Session Impulse and Ride Intraday Continuation to Session Close, 3-Parameter)

Hypotheses

A LONG-SHORT, single-instrument, calendar/seasonality strategy on the Binance COIN-M inverse perpetual BTCUSD_PERP.BINANCE_CM (BTC-margined, ~0.06% round-trip taker, OHLCV-only — single-leg, so it dodges the COIN-M multi-leg/funding data_unavailable trap in L20/L34; BTC CM perp bars have full catalog history). The edge is NOT mean-reversion, NOT a range breakout, NOT funding, NOT liquidations, and NOT cross-sectional — it is an intraday TIME-OF-DAY anomaly: the directional impulse formed at the US-desk open tends to PERSIST through the US session. Mechanism: each day, measure BTC's return over a fixed early-US-session signal window (13:00->15:00 UTC). If |window return| exceeds an entry threshold (fresh, significant directional impulse rather than noise), enter at the 15:00 UTC bar close in the SAME direction and hold the continuation until the session-close exit hour (21:00 UTC), max one position per day. Deliberately routed to COIN-M for two reasons: (1) the ~0.10% CM fee floor is lower than the 0.15% USD-M floor, giving a modest intraday continuation edge more room to clear costs; (2) BINANCE_CM is under-represented (3.4% vs >=5% target) and this is a legal single-leg-BTC-OHLCV CM use per L20. Only 3 parameters (signal-window length, entry threshold, ATR-stop multiple) to resist the overfit deaths that killed 248 prior hypotheses.

Hypotheses

Restart iteration. The feedback states the prior abandonment was a pipeline artifact (Layer-2 staticmethod mis-binding, QA performance verdicts on an unoptimized smoke test, backtest-slot starvation), so the mechanism is intentionally untouched: same latched-13:00-UTC reference, same continuation-direction entry, same calendar exit, same COIN-M whole-contract sizing, same three tunables and clamps. Because resubmitting byte-identical code fails the unchanged-hash check, I made one substantive change where the code was genuinely weakest: the protective ATR stop is now tested against the bar's LOW/HIGH instead of only its CLOSE. On 1-hour bars a close-only stop never fires on a bar that pierces the level and closes back inside it, so a losing session could ride an arbitrarily large excursion until the 21:00 calendar exit - the stop is the only thing bounding that risk, and understating it is exactly the bar-close-stop failure the coding rules warn about. The trigger is intra-bar; the exit still executes at the bar close through the base template's market exit, so no intra-bar fill price is assumed. I also declared _param_bounds for the three clamped parameters (signal_window_hours [1,5], entry_threshold [0.002,0.02], atr_stop_mult [1.0,4.0]) so the optimizer cannot search values the code silently rewrites - the docstring already promised this mirroring. Checked against the catalog for the sandbox window (BTCUSD_PERP.BINANCE_CM 1-hour bars, last ~830 days): the 13:00->15:00 UTC impulse clears the 0.6% threshold on 296 of 726 days, so entries are frequent and the run cannot starve for trades; median absolute impulse is 0.46%, comfortably above the ~0.10% CM round trip that the continuation must clear.

Hypotheses

Negative expectancy on a reliable 748-trade / 6.1-year sample: avg_trade_return_pct is -0.109% (below zero, before the ~0.10% CM round-trip even applies), profit_factor 0.84, Sharpe -0.81, account liquidated to -100%. The build faithfully implements the hypothesis and the entry pipeline is healthy, so this is a market verdict: the early-US-session impulse gates direction but the realized intraday continuation is net-negative in every vol regime and nearly every year. Optimization cannot lift an edge that is below zero pre-cost; the three parameters (window, threshold, ATR stop) have no region that turns a negative continuation premium positive. QA's edge concern is borne out at full history. abandon_class=negative_expectancy.

Implementation

Long-short intraday time-of-day seasonality on the BTC COIN-M inverse perpetual (BTCUSD_PERP.BINANCE_CM, 1-hour bars, OHLCV only). Each UTC day the close of the bar ending 13:00 UTC is latched as the US-session reference; two hours later (the bar ending 15:00 UTC) the early-US-session impulse is measured as close/reference - 1. If its magnitude clears entry_threshold (0.6% default) the strategy enters in the SAME direction - long on an up-impulse, short on a down-impulse - to ride the intraday continuation, at most one entry per UTC day. Exit is the US session close (bar ending 21:00 UTC), a fixed atr_stop_mult x ATR stop from the entry price now tested intra-bar against the bar low/high, or a max_hold_bars safety cap if the 21:00 bar is missing. Sizing is inverse-contract correct: risk_pct of equity divided by the stop fraction gives a USD notional, capped at max_gross_frac of equity, converted to WHOLE $100 contracts via contracts_for_notional (never the linear equity/price formula). Three tunables: signal_window_hours, entry_threshold, atr_stop_mult.

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

No code change needed; note the metrics-field inconsistency for the analyst.

Verification Results

avg_holding_bars is reported as 0.0 while avg_holding_period is '5h 13m' — a metrics reporting quirk, not a code fault. Holding logic itself (enter at 15:00-close bar, exit at 21:00-close bar or on intra-bar ATR stop, ~6-bar horizon) is correct and consistent with the 5h13m average.

Verification Results

Optionally add an explicit flat-check in should_enter() for defensiveness; behavior is correct as-is given base-template entry suppression.

Verification Results

should_enter() does not itself gate on being flat; it relies on the base template to suppress entry while a position is open. Because the entry bar (ts hour 14) occurs once per UTC day and the hold runs to the same-day 21:00 exit, only one entry opportunity exists per day, so the intended 'max one position per day' holds in practice — but the guarantee is implicit in the base template rather than explicit here.

Verification Results

Unoptimized sandbox is negative: total_return -22%, Sharpe -0.55, avg_trade_return_pct -0.139% (below zero, not just below the fee floor), profit_factor 0.79, and commission is 19.16% of gross over 296 intraday trades. This is the classic 'intraday continuation edge does not clear round-trip cost' signature — the 0.6% signal impulse gates entries but says nothing about the realized continuation move, and here the per-trade continuation return is net-negative after the ~0.06-0.10% CM cost plus high turnover. It is NOT a code defect (win_rate 0.43, PF 0.79, Sharpe -0.55 are ordinary numbers, not the polarity/inverse-sizing bug signature). regime_performance shows the edge only appears in the 'normal' vol tercile (+7.1%, Sharpe 0.54) and is sharply negative in calm/stressed. Analyst should verify at full history whether any parameter region (entry_threshold, signal_window_hours) produces a per-trade continuation return that decisively clears the CM round trip; if not, the time-of-day continuation premise is unsupported. This is advisory and does not block.

Backtest Review

Faithful implementation: trades match the hypothesized long-short US-session continuation mechanism (748 trades, ~373 long / 375 short, one entry/day, correct 13:00->15:00 signal window / 21:00 exit).

Backtest Review

Reliable, large sample over 6.1 years (50,537 bars) — the result is statistically meaningful, not noise.

Backtest Review

Entry pipeline is healthy (875 signaled = 875 submitted, no size-zero / min-notional / cash drops), so this is a market verdict, not a code defect.

Backtest Review

Negative expectancy: avg_trade_return_pct -0.109% is BELOW ZERO, not merely below the ~0.10% CM fee floor — the intraday continuation move is net-negative before costs even matter.

Backtest Review

profit_factor 0.84 (<1), win_rate 0.42, expectancy -$42.64/trade, Sharpe -0.81, Sortino -0.74.

Backtest Review

Account liquidated (total_return -100%, max_drawdown 100%) on 2025-05-18.

Backtest Review

Loses across every vol regime (calm -53%, normal -100%, stressed -16%) and every calendar year except 2022 — no parameter region shows a persistent edge.

Backtest Review

Commission 16.66% of gross confirms the classic 'edge does not clear round-trip cost' signature QA flagged; the impulse threshold gates entries but says nothing about the realized continuation, which is net-negative.

Analysis

Backtest gate: - metrics unreliable: 648 trades / 1409 data days is too little evidence (need >=5 trades over >=10 days) — increase signal frequency or widen the window

Iteration History

Verification failed (Layer 4 — QA review) [class=premise_falsified]: - The US-session momentum-continuation premise is refuted: entering in the direction of the 13:00-15:00 UTC impulse and holding to the 21:00 close is a net LOSER. profit_factor 0.757 (<1), total_return -43.11%, avg_trade_return_pct -0.169% (negative), expectancy -$105, Sharpe -0.145, alpha -0.107, over 296 well-measured trades. win_rate 0.432 with a symmetric payoff (avg_win $760 ~= avg_loss $765) — the early-US impulse continues only ~43% of the time, so the effect the strategy harvests is absent (mildly inverted), and after the ~0.10% CM round-trip on a ~6h hold it bleeds. Leverage 2.0 amplifies it to a 61.7% drawdown (CI to 90%). Direction is implemented correctly (continuation as specified; no polarity/sequencing bug), so this is a faithful implementation whose seasonality premise the data refutes. - Leverage 2.0 with avg_position ~87% turns the absent-edge session bet into a 61.7% drawdown (CI to 90.2%) and end_unrealized -11.9% — added risk with negative expectancy.
Strategy report

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