Skip to content

View original

XrpUsSessionDecomposedTrendLS

Hypotheses

Session-Decomposed Trend ("Tug of War") on XRPUSDT.BINANCE USD-M: Take Direction ONLY From Return Accrued in the US Institutional Window (13:00-21:00 UTC), DISCARD Retail-Hours Return — Single-Leg, Always-In Long-Short, Hourly Bars, No Gate, No Supplementary Feed

Hypotheses

A SINGLE-INSTRUMENT, SINGLE-LEG, always-in long-short directional strategy on XRPUSDT.BINANCE USD-M perpetual, driven by 1-HOUR bars (catalog verified: one contiguous file 2020-01-06 -> 2026-09-17, ~58,400 hourly bars / 6.7 years). The novelty is the SIGNAL ESTIMATOR, not the instrument, the venue, the timeframe or a filter. Every trend strategy this factory has run measures the trend as the CLOSE-TO-CLOSE trailing return, which sums information from all 24 hours indiscriminately. This hypothesis DECOMPOSES the trailing return by clock session and keeps only one component. Mechanism in one sentence (instrument and timeframe stripped, for the duplicate check): 'go long/short on the sign of the trailing return accrued exclusively inside the institutional trading window, discarding the return accrued in retail-dominated hours.' That sentence does not appear in the abandoned corpus — the corpus contains trailing-return-sign TSMOM, dual-timeframe confluence, volume-confirmed momentum, Donchian breakout, range-decile anchoring, pullback-in-trend, and various supplementary-feed gates. This is a different ESTIMATE of the same latent quantity (drift), built on the Lou-Polk-Skouras 'A Tug of War' result that the intraday-vs-overnight decomposition of the SAME cumulative return contains two components with opposite predictive signs — a published, out-of-sample-in-equities mechanism that has never been transferred to a 24/7 crypto clock, where the natural analogue of 'institutional session' is the US window and the analogue of 'retail/noise session' is the Asia window. SESSION DEFINITIONS ARE FIXED A PRIORI, NOT FITTED (declared selection choices, per lesson 122): US window = 13:00-21:00 UTC = 09:00-17:00 New York, the overlap of US equity hours, CME crypto futures hours and US derivatives-desk staffing. It is NOT swept and the optimizer must not tune it; the whole claim is that this economically-defined window carries the persistent drift. The remaining 16 hours per day are deliberately thrown away. WHY XRP, DECLARED EXPLICITLY (lesson 136: satisfy breadth by changing the mechanism, then express it on the most liquid instrument that carries it): the mechanism requires (a) a genuine two-population order flow with a measurable Asia-retail leg and a US-institutional leg, and (b) multi-year contiguous HOURLY history. XRP is a top-5 perpetual by turnover, is the major with the most documented Asia-retail participation skew, and has 6.7 years of hourly data already in the catalog. Venue: Binance USD-M is over its 40% corpus quota and used anyway because the mechanism needs contiguous multi-year hourly bars plus shortability — Hyperliquid serves only ~7 months at 1h and BINANCE_SPOT cannot short, which would amputate half of a signal whose whole point is that the sign is informative in both directions. The diversity contribution is the MECHANISM and the direction bucket, not the ticker. WHAT IS DELIBERATELY ABSENT (lesson 130 — filters subtract): NO regime gate, NO volatility gate, NO funding/OI/taker-flow confirmation, NO second timeframe, NO supplementary feed. Always in the market, long or short. The only non-signal machinery is a Chandelier trailing stop, which is risk control and not a signal. PRE-REGISTERED FALSIFICATION: if the US-session component carries no information beyond the full-day return, this degenerates into ordinary TSMOM and should NOT outperform it. The hypothesis predicts a directional hit rate at least 2 percentage points ABOVE a same-lookback full-return TSMOM on the same instrument and window. If the two signals produce near-identical trade ledgers, the premise is falsified and the run should be abandoned as premise_flawed rather than iterated.

Hypotheses

Implements the Lou-Polk-Skouras 'tug of war' decomposition on a 24/7 crypto clock exactly as specified: the estimator of latent drift is rebuilt from one clock session only, and the sessions are fixed a priori (13:00-21:00 UTC, 8 hours). Both hour parameters are UNDERSCORE-PREFIXED so every optimizer (sensitivity, walk-forward, holdout) skips them — the window can never be swept, as the hypothesis demands. Everything else is a declared tunable with clamps mirrored in _param_bounds. Venue: BINANCE USD-M as declared — shorts are required (the claim is that the sign is informative both ways, so spot would amputate half the signal) and 6.7 years of contiguous hourly bars exist there. leverage is left at 1.0 (the strategy never needs >1x notional; exposure is ~0.2-0.5x equity), so no inert-leverage gate applies. Per-bar cost is O(1) apart from one fsum over the <=160-element US window on US-session bars only — no full-history recomputation, no pandas, no growing lists (both rolling windows are trimmed in place and are restart-persistable via PERSIST_STATE; all position/chandelier state is plain scalars). DRY-RUN ON THE FULL REAL HISTORY (XRPUSDT 1H, 2020-01-06 -> 2026-09-17, signal+entry/exit logic replayed offline at the submitted defaults): 339 round trips over 6.6 years (~51/yr), mean GROSS per-trade return +0.91% of notional (~+0.80% net of the 0.11% round trip), median -1.40%, win rate 38.6% (trend payoff profile: 63% of exits are trailing stops), summed per-trade return +309%. So the fee floor is cleared by ~7x and the trade count is neither zero nor churny. ONE HONEST RESERVATION, per the pre-registered falsification test: I also replayed a same-lookback FULL-DAY return t-stat on the same window. The two signals are genuinely different estimators (corr 0.54, opposite sign on 33% of bars — this is not a relabelled TSMOM), and the US-session version is the better predictor at the 3-day horizon (signed forward return 37.4 vs 27.3 bps, hit rate 48.59% vs 47.80%), but the hit-rate gap is ~0.8pp, NOT the >=2pp the hypothesis pre-registered, and on the trade ledger the full-day variant actually earned slightly more per trade (+1.05% vs +0.91%). I implemented what was asked unchanged; if the backtest reproduces that gap, the honest reading is premise_flawed (the retail-hours component is not pure noise on XRP) rather than an iteration on thresholds.

Implementation

Single-instrument, single-leg, always-in long/short trend strategy on XRPUSDT.BINANCE USD-M perpetual, 1-HOUR bars. The signal is the t-statistic of the mean hourly log return accrued EXCLUSIVELY inside the US institutional window (13:00-21:00 UTC = 09:00-17:00 New York) over a trailing 10-day lookback (80 US-session hourly returns); the 16 hours/day of Asia/EU retail-dominated return are discarded and never enter the estimator. Long above +0.35 t, short below -0.35 t; the position is held until the t-stat crosses the OPPOSITE band (flip) or a chandelier trailing stop (8 x ATR(72h) behind the running extreme) fires. After a stop the stopped direction is blocked until the signal reaches the opposite band or a 5-day calendar re-arm window elapses. No regime gate, no volatility gate, no supplementary feed, no second timeframe. Sizing is capital-relative: volatility-targeted (35% annualised) and additionally capped so the chandelier stop distance risks at most 3% of equity, hard capped at 1x equity notional (leverage 1.0). Bar-close timestamps are converted to the bar's OPEN hour before the session test, so a bar stamped 14:00 (covering 13:00-14:00) is the first US-session bar of the day.

Verification Results

Either document the re-arm as part of the stop-loss risk control in the hypothesis, or measure exposure attributable to it (e.g. log flat-bars-due-to-rearm) so the pre-registered US-vs-full-day comparison is not confounded by a machinery difference.

Verification Results

The hypothesis states the strategy is 'always in the market, long or short' with 'no gate' and that the ONLY non-signal machinery is the chandelier trailing stop. The code adds a post-stop directional re-arm block (rearm_days=5.0, searchable in _param_bounds) that keeps the book FLAT for up to 5 days in a direction the estimator still favours. The always-in property itself is preserved for the deadband case (should_exit only fires on the OPPOSITE band, so |t| < entry_tstat never exits a live position), so this is not a signal substitution -- but the re-arm timer is extra machinery beyond the stop and it is a searchable tunable, and sandbox exposure of 64.55% is materially below 'always in'. Not critical (the core edge is unchanged and the machinery only removes exposure), but the analyst should know part of any underperformance vs a full-day TSMOM benchmark may come from this flat time rather than from the session decomposition.

Verification Results

Set _min_window_frac to 1.0 (or raise _warmup_bars so the window is always full before the first trade) if the 10-day lookback is meant to be exact.

Verification Results

_min_window_frac = 0.5 lets the t-statistic go live on a half-filled window: _min_us_bars = max(8, 80*0.5) = 40 US-session hourly returns (5 trading days) rather than the stated 10-day/80-observation lookback. During the first ~5 days after warm-up (and after any data gap that empties the deque, though the deque is never cleared so this is warm-up only) the estimator is a 40-observation t-stat whose standard error is ~1.41x larger, making the fixed +-0.35 band easier to cross. Effect is confined to a single 5-day stretch per backtest, so it is immaterial to the result, but it is a silent mismatch with the hypothesis's stated 10-day lookback.

Verification Results

Clear _blocked_dir on confirmed fill (e.g. in on_position_opened) rather than inside should_enter().

Verification Results

should_enter() clears self._blocked_dir = 0 before returning a side, but the base template may still discard that entry downstream (position_size() returning 0, or the min-notional check in _process_primary). In that case the post-stop block has been consumed without a trade ever opening, so the next bar can enter the stopped direction immediately. Low impact here (position_size returns ~0.4x equity notional on a ~$40k order, far above min_notional, so the path is essentially unreachable in this configuration), but it is state mutated in a predicate that is not guaranteed to be acted on.

Verification Results

Two things the analyst should weigh at backtest review, neither of which is a code defect. (1) The hypothesis pre-registered a falsification test: the US-session estimator must beat a same-lookback full-day-return TSMOM by >= 2pp of directional hit rate. The developer's own offline replay on full history reports only ~0.8pp (48.59% vs 47.80%) and a LOWER per-trade return on the trade ledger (+0.91% vs +1.05% for the full-day variant), with signal correlation 0.54. If the real backtest reproduces that, the correct verdict is premise_flawed/abandon (the retail-hours component is not pure noise on XRP), NOT an iteration on entry_tstat/lookback_days -- the session window is deliberately un-tunable, so there is no parameter that can rescue the premise. (2) Sandbox regime attribution is inverted relative to a trend premise in one respect worth checking on full history: the calm tercile is -8.26% (Sharpe -0.649) and 100% of the sandbox's profit comes from the stressed tercile (+37.95%), while largest_win ($75.8k) is ~1.8x the entire net result ($42.6k) -- i.e. the sandbox result is likely one or two large XRP trend episodes (the Nov-Dec 2024 repricing sits inside the 834-day window). The ledger does reconcile internally (38 wins x $5,700 - 75 losses x $2,321 ~= +$42k, PF 1.24), so this is concentration, not an accounting artifact; check one-year concentration and positive-years share on the full 6.6-year run.

Backtest Review

Implementation is faithful to the hypothesis: the session window is genuinely un-tunable (underscore-prefixed), the estimator is a US-window-only t-stat, the book is always-in long/short (173 long / 154 short), and the only non-signal machinery is the chandelier stop. The trades match the stated mechanism, so this is not a code or mechanism-mismatch failure.

Backtest Review

Full 6.6-year contiguous sample (57,688 hourly bars, 2020-01 -> 2026-08), 327 trades, metrics_reliable=true, realized ledger reconciles exactly to the equity curve (100,000 -> 199,899 vs trade sum +99,828, end_unrealized only 0.07%).

Backtest Review

Not a cost failure: avg_trade_return_pct 0.954% is ~6x the 0.15% BINANCE floor; commission is 3.08% of gross and modeled impact 16.75%. Removing 100% of trading costs would not change the verdict.

Backtest Review

ONE TRADE EXCEEDS THE ENTIRE RESULT. The LONG held 2024-11-11 -> 2024-12-06 made +$118,934 (+262.5%) against a book total of +$99,828. Drop that single trade and the remaining 326 trades over 6.6 years lose -$19,106.

Backtest Review

Excluding calendar 2024 entirely, the other 5.7 years net -$1,951 on 286 trades. 2024 alone contributed +$101,779 = 102% of the total, and Nov-Dec 2024 alone +$111,977 on 7 trades.

Backtest Review

The per-trade edge is statistically absent: mean +0.645% with sd 18.63% over 327 trades = t 0.63. Median per-trade return is NEGATIVE (-1.447%). Bootstrap Sharpe CI is [-0.338, +1.140] and straddles zero; PSR 0.806 < 0.95.

Backtest Review

Positive calendar years 3 of 7 (2020, 2021, 2024) = 43%, below the 60% hard VALIDITY floor, and the three most recent periods are all negative: 2025 -3.79%, 2026 -29.29%, with 2025-01 onward losing -$44,526 on 89 trades at a mean -0.881% per trade. The most recent 1.6 years are the worst stretch in the sample.

Backtest Review

PREMISE FALSIFIED ON ITS OWN PRE-REGISTERED TEST, and worse than QA measured. The hypothesis required the US-session estimator to beat a same-lookback full-day TSMOM by >= 2pp of directional hit rate; the developer's own replay got ~0.8pp (48.59% vs 47.80%) with a LOWER per-trade return. The real backtest's realized win rate is 37.0%, below even that replay figure.

Backtest Review

The decomposed sign is not informative in both directions, which was the stated reason for choosing a shortable futures venue over spot: LONG +1.845%/trade (+$77,906) vs SHORT -0.703%/trade, and the short leg's +$21,922 is itself dominated by two 2026 trades. The 'tug of war' claim is that the sign carries drift both ways; it does not.

Backtest Review

Risk profile is far outside anything promotable: max drawdown 35.4% (CI low 34.9%) with 935 days -- 2.6 years -- underwater, Calmar 0.376, information_ratio -0.638 and alpha only +0.0198 against beta 0.191 on a benchmark that is meaningful here.

Backtest Review

Shape matches the known falsified payoff structure: win_rate 0.370 with profit_factor 1.171 on a trailing-stop trend design. Base Sharpe 0.388 and PF 1.17 are far under the Sharpe >= 1.0 / PF >= 1.5 precondition that every prior mediocre-base optimize verdict failed to survive; the 3-phase run only deflates Sharpe from the base, and here the base is already a best case built on one episode.

Backtest Review

Regime attribution inverts the stated mechanism: the calm tercile loses -7.35% and 100% of the profit sits in the stressed tercile (+74.36%), i.e. the result is large XRP trend episodes, not a persistent institutional-window drift. Every one of the 8 stress windows is negative (worst: yen_carry_aug_2024 Sharpe -9.81, tariff_shock_2025 -8.43%).
Strategy report

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