XrpDollarBarClockTimeSeriesMomentumLS
Hypotheses
Volume-Clock (Equal-Dollar-Bar) Time-Series Momentum on XRPUSDT.BINANCE USD-M — Resample the Tape So Every Bar Contains the SAME Amount of Traded Value, Then Take the Sign of Trailing Momentum in That Clock; Always-In Long-Short, Never Flat, Pure OHLCV, No Gate, No Supplementary Feed
Hypotheses
A SINGLE-INSTRUMENT, SINGLE-LEG, always-in long-short directional strategy on XRPUSDT.BINANCE USD-M perpetual. The novelty is NOT the instrument, the venue, the indicator or a confirmation gate — it is the CLOCK the signal is measured on. Every prior momentum/TSMOM hypothesis in this factory (1,371 of them) measures the trend over a fixed span of CALENDAR time: a 56-day return, a 4H-vs-1D confluence, a 10-week sign. This hypothesis discards calendar time entirely and rebuilds the price series in TRANSACTION time: the 15-minute tape is accumulated into synthetic bars that each close after the SAME amount of traded dollar value has changed hands, and the position is the sign of the trailing return measured over a fixed number of those equal-value bars.
CONSTRUCTION (deterministic, no look-ahead):
1. Subscribe to XRPUSDT.BINANCE-15-MINUTE-LAST-EXTERNAL (catalog verified: continuous coverage 2020-01-06 -> 2026-09-17, ~235k bars, 9.1 MB; this is the primary and ONLY data stream).
2. Per 15m bar compute dollar volume dv = bar.volume.as_double() * bar.close.as_double(). Accumulate dv into a running total, and track running open/high/low/close of the in-progress synthetic bar.
3. When the running total >= V*, EMIT a synthetic dollar bar (open = first 15m open since last emission, high/low = extremes over the span, close = the closing 15m bar's close, timestamp = that 15m bar's ts_init) and reset the accumulator with the overflow carried forward.
4. V* is ADAPTIVE and strictly trailing, which is essential over a 6.7-year span in which XRP's daily turnover grew by more than an order of magnitude: once per UTC day, at the first bar of the day, set V* = (median daily dollar volume over the trailing 30 completed UTC days) / bars_per_day_target. A fixed constant threshold would emit almost no bars in 2020 and hundreds per day in 2025 and would make the study meaningless. With bars_per_day_target = 6, a synthetic bar spans ~4 hours of MEDIAN activity, but completes in 15-45 minutes during a repricing burst and can take a full day or more during a dormant tape.
5. SIGNAL: s = sign(log(C_t / C_{t-L})) over the last L = 72 synthetic dollar bars (~12 days at median activity). Position = +1 (long) if s > 0, -1 (short) if s < 0. Always in the market; there is no flat state, no regime filter, no volatility deadband, no supplementary confirmation and no rarity gate.
6. SIZING: inverse-volatility. realized_vol is the stdev of the last 72 synthetic-bar log returns, annualized using the MEASURED average calendar duration of those bars (not an assumed one). notional = equity * clamp(0.20 / realized_vol_ann, 0.25, 1.5). Hard cap 1.5x leverage, max 30% of equity at risk via the stop.
7. EXIT: reverse on signal flip (the normal path), plus a chandelier stop at 4 x ATR(20 synthetic bars) from the favourable extreme to cap tail losses. The stop exits to FLAT and the book re-enters on the next synthetic bar whose signal is non-zero.
DECLARED FITTED CHOICES (per lesson 122 — these are stated, not hidden behind a '3-parameter' claim): bars_per_day_target = 6 (chosen so the synthetic bar is on the same order as the 4H bar the factory's surviving momentum strategies use, making the clock the ONLY changed variable), L = 72 (chosen to equal ~12 median-activity days, the same order as the surviving ETH/ADA confluence horizon), ATR multiple 4 (wide, tail-capping only, not a profit mechanism). Instrument, venue and base timeframe are justified economically below rather than swept.
Hypotheses
The hypothesis's only novel variable is the CLOCK, so everything else is the plain TSMOM shape: sign of a trailing return, inverse-vol sizing, reverse on flip. The dollar bar is built incrementally in calculate_signal (running day-volume total, in-progress OHLC accumulator, bounded deques with maxlen) so per-bar cost is O(1) and independent of the backtest span; the only non-O(1) work is a 72-element stdev per emission (~6/day) and a 30-element median once per UTC day. V* uses only COMPLETED trailing UTC days and never the day in progress, so there is no look-ahead; emissions start after min_history_days=3 completed days. Annualization uses the measured mean synthetic-bar duration as the hypothesis specifies, not an assumed 4 hours. leverage=1.5 is wired into position_size via min(lev_max, self.config.leverage), so the margin cap and the in-strategy notional agree. Per-position state (trailing extreme, direction, stop flag, re-entry block) is kept as plain scalars so a paper restart cannot re-anchor it. Dry-run on the real 209-day sandbox window (20,064 XRPUSDT 15m bars): 1,508 synthetic bars emitted (7.2/day vs the 6 target), signal continuous with 1,436 distinct values in [-0.22, +0.31], 82 momentum sign flips -> roughly 90-170 round trips in the window, and 0.9 s wall clock (~11 s for the full 235k-bar history), so neither the zero-trade nor the 300 s timeout gate is at risk. One reservation, stated per the scope rule and implemented as specified anyway: with no deadband the raw zero-crossing flips about once every 2.5 days, i.e. ~290 round trips a year and ~0.29 of notional per year in taker fees, so the per-trade edge has to clear 0.10% on a ~2.5-day hold; a small hysteresis band on the momentum sign (or a longer L) is the obvious first iteration lever if the gross signal is positive but the net is not.
Hypotheses
abandon_class=negative_expectancy on a reliable 1,368-trade sample and specifically a GROSS signal failure — removing 100% of commission and funding still leaves -$95k on $100k; QA's reversion read is confirmed on full history, and the volume clock reduces to a jittered 4H calendar clock (~7.2 synthetic bars/day), so the single novel variable is itself falsified rather than untested.
Implementation
Always-in long/short time-series momentum on XRPUSDT.BINANCE USD-M perpetual measured in TRANSACTION time rather than calendar time. Each 15-minute bar's dollar volume (volume x close) is accumulated into a synthetic 'dollar bar' that closes once a threshold V* of traded value has changed hands; the overflow is carried forward and the synthetic bar's OHLC spans the 15m bars consumed. V* is strictly trailing and adaptive: on the first bar of each UTC day it is reset to (median daily dollar volume over the trailing 30 completed UTC days) / bars_per_day_target (6), so the clock keeps ~6 bars a day of MEDIAN activity across a sample in which XRP turnover grew by an order of magnitude, completing in minutes during a repricing burst and in more than a day on a dormant tape. The signal is the trailing log return over the last L=72 synthetic bars (~10-12 days of median activity), returned raw every bar; position = sign(signal), long if positive, short if negative, never flat by choice. Sizing is inverse-volatility: the stdev of the last 72 synthetic-bar log returns is annualized with the MEASURED average calendar duration of those bars, and notional = equity * clamp(0.20 / vol_ann, 0.25, 1.5), further capped so the chandelier stop risks at most 30% of equity. Exit is a reversal on momentum sign flip, plus a wide chandelier stop at 4 x ATR(20 synthetic bars) from the favourable extreme; after a stop the book stays flat until the volume clock ticks again. Pure OHLCV, single leg, no supplementary feed, no regime gate.
Verification Results
Either raise target_vol toward the instrument's own vol scale (0.35-0.50) or lower lev_min to ~0.10 so the inverse-vol term is actually load-bearing, and let the optimizer search it (_param_bounds already covers both). Report what fraction of bars the clamp binds.
Verification Results
The inverse-volatility sizing is largely clamped away on this instrument. target_vol=0.20 against XRP perp realized vol (typically 0.55-1.00 annualized) gives 0.20/vol = 0.20-0.36, i.e. at or below lev_min=0.25 for much of the sample, so the 'inverse-vol' mechanism degenerates into a near-constant 0.25x notional in exactly the high-vol regimes it is supposed to de-risk. Sandbox corroborates: avg_position_pct 42.3% with strategy annualized_volatility 23.1%, so the clamp binds a large fraction of the time. The hypothesis's stated clamp(0.20/vol, 0.25, 1.5) is implemented faithfully, so this is a parameter-realism note, not a mismatch.
Verification Results
Add a momentum deadband (require |signal| > k * stdev(signal) before flipping, holding the prior position inside the band) or lengthen L. Both are cheap and directly attack the 14.4% commission-of-gross figure. The developer already names this as the first iteration lever in the config rationale.
Verification Results
No hysteresis / deadband on the raw zero crossing of the momentum sign, on an always-in book. The developer's own dry run measured 82 sign flips in 209 days (~one flip per 2.5 days), and the sandbox delivered 84 round trips with commission at 14.41% of gross PnL. Every flip pays a full taker round trip (~0.10% of notional) plus impact ($4,013 modeled in the sandbox, comparable to the $3,196 commission), so the gross per-trade edge must clear roughly 0.15-0.20% of notional on a 2.3-day hold just to break even. A 2.3-day move on XRP is ~1.5-2% at the observed vol so this is not arithmetically impossible, but the cost load is the dominant term.
Verification Results
No code change required. Noted so the backtest review does not read the six green synthetic tests as evidence the signal path is exercised; the full-history backtest is the first real test of the clock.
Verification Results
Layer 2 provided zero coverage of the signal logic: all six synthetic scenarios reported a frozen signal of exactly 0.0 across all 481 bars. That is expected and correct behaviour (min_history_days=3 completed UTC days before V* exists, then 73 synthetic bars at ~6-7/day before _ready, i.e. roughly 1,100-1,400 15m bars of warmup vs 481 supplied), and the strategy correctly refuses to trade while not ready. But it means the synthetic suite validated nothing beyond 'does not crash', and the only functional evidence for the clock, the momentum, the ATR and the stop is the single 209-day sandbox run.
Verification Results
Optional: bucket on (ts_ns - 1) // _NS_PER_DAY so a close-stamped bar is attributed to the day it actually traded in. Leave the gap handling as-is unless the full-history run shows V* jumps around known XRPUSDT outages.
Verification Results
Daily dollar-volume bookkeeping skips gaps rather than zero-filling them: _roll_calendar_day appends at most one entry per observed day transition and only when _cur_day_dv > 0, so a multi-day data outage contributes a single day to the trailing-30 median window instead of the elapsed number of days. Also, because bars are close-stamped, the 23:45-00:00 bar carries ts == 00:00 of the next day and is bucketed into that next day. Neither introduces look-ahead (V* is built strictly from COMPLETED prior days and _refresh_vstar runs before the current bar's dv is added), and both effects on the median are small.
Verification Results
Sandbox shape is a momentum-premise failure, not (as far as I can verify) a polarity bug, but the analyst should confirm on full history before spending an optimize. 84 round trips / 209 days: PF 0.479, win_rate 29.8%, avg_win $887 vs avg_loss $786 (payoff 1.13). A trend-following book with a 30% hit rate needs payoff >> 1; at 1.13 the expectancy is structurally negative, and the MIRROR of this ledger (70% win, payoff 0.88) would have made roughly +$283/trade. That is the L125 shape. I checked the code polarity and it is correct as written per the hypothesis (long when log(C_t/C_{t-72}) > 0), and the loss is two-sided (long win 28.6%, short win 31.0%), so this is not a sign-flip defect — it reads as genuine mean reversion at the ~12-median-day transaction-time horizon on XRP over this particular 209-day window. Two things to check at backtest review: (1) whether GROSS price PnL before the $3,196 commission (14.41% of gross) and $4,013 modeled impact is positive — commission alone is ~1.5x the net loss, so the turnover may be the whole story; (2) whether the volume clock is doing anything the calendar clock is not — the dry run emitted 7.2 synthetic bars/day vs a 6 target, i.e. ~3.3h median span, so the clock's only real effect is compressing bars during repricing bursts. If the equivalent calendar-time 4H TSMOM has the same sign and similar PF, the hypothesis's single novel variable has contributed nothing and iterating on L/deadband is retuning a dead mechanism. Turnover is the first-order economic risk: ~147 round trips/yr at a 0.10% taker round trip on ~1.0-1.5x notional is ~15-22% of equity/yr in fees before any edge.
Backtest Review
Clean, deterministic volume-clock implementation (adaptive trailing V*, no look-ahead, measured bar duration used for annualization)
Backtest Review
Large reliable sample: 1,368 round trips over 2,414 days / 231,903 bars
Backtest Review
Trades match the hypothesis (always-in, 667 long / 701 short, ~1d18h holds) — not a mechanism mismatch
Backtest Review
Account LIQUIDATED: equity 0 from 2023-07, total_return -100%, max_drawdown 100%
Backtest Review
GROSS failure: summed price_pnl = -$94,956 BEFORE the $45,120 commission and -$9,998 funding; mean gross -0.172%/trade, median -0.93%, t = -0.98
Backtest Review
Sharpe -0.457, PF 0.866, expectancy -$77/trade, win_rate 0.311 at payoff 1.92
Backtest Review
avg_trade_return_pct 0.0789% vs the 0.15% BINANCE floor
Backtest Review
Losing gross in 6 of 7 years (only 2020 positive); loss is two-sided (SHORT -$86.3k, LONG -$8.7k gross)
Backtest Review
Sizing has no equity floor — notional/equity reaches 694x as equity collapses, turning a losing edge into a wipeout
Outcome Summary
XrpDollarBarClockTimeSeriesMomentumL-96dd229aae
Outcome Summary
The strategy's one novel claim was the clock: rebuild XRPUSDT's 15-minute tape into equal-dollar-value bars with a trailing 30-day adaptive threshold, and take the sign of a 72-bar trailing return as an always-in long/short position. Implementation was clean and the trades matched the thesis (1,368 round trips, 667 long / 701 short, ~1d18h holds), but the result was a liquidated account: -100% total return, Sharpe -0.457, profit factor 0.866, and 0.0789% avg per-trade return against the 0.15% venue floor. Critically the loss was gross — -$94,956 of price PnL before any of the $45,120 commission or -$9,998 funding — and losing in 6 of 7 years on both sides, so no cost tuning could have saved it. The analyst abandoned it at backtest review before optimization, noting the volume clock had degenerated into roughly a jittered 4H calendar clock, which means the hypothesis's only new variable was falsified rather than merely untested.
Outcome Summary
An adaptive equal-dollar-volume clock calibrated to ~6 bars/day reproduces a ~4H calendar clock rather than changing the sampling, so a future iteration must both verify the clock actually differs from calendar time and add an equity floor to sizing — notional/equity reached 694x as equity collapsed, turning a losing edge into a full wipeout.
Outcome Summary
The analyst's backtest-review verdict was abandon at the pre-optimization gate (abandon_class=negative_expectancy), so optimization, the post-optimization analyst stage and risk review never ran. The decisive points were a reliable 1,368-trade sample with negative gross edge and the finding that the volume clock collapsed to roughly a jittered 4H calendar clock (~7.2 synthetic bars/day), falsifying the single novel variable rather than leaving it untested.
Outcome Summary
Resample XRPUSDT.BINANCE USD-M 15m bars into equal-dollar-volume (transaction-time) synthetic bars with an adaptive daily threshold, then run always-in long/short time-series momentum on the sign of the trailing 72-bar log return, sized inverse-vol with a 4x ATR chandelier tail stop.
Outcome Summary
Over 1,281 data days and 231,903 bars it took 1,368 round trips (667 long / 701 short, ~1d 17h average hold) for a total return of -100% (account liquidated 2025-11-10), Sharpe -0.457, profit factor 0.866, win rate 31.1%, expectancy -$76.72/trade and avg_trade_return_pct of 0.0789% against the 0.15% BINANCE floor. The backtest review found the failure was gross, not cost-driven: summed price PnL was -$94,956 before $45,120 of commission and -$9,998 of funding, with losses in 6 of 7 years and on both sides (short -$86.3k, long -$8.7k gross).
Backtest and paper results are hypothetical. Trading involves risk of loss.