# D48-XSMOM-28D-V1 Hypothesis Contract

Frozen at: `2026-07-29T10:39:32Z`

Research repository SHA: `6661ed375d976bcf35ad73568cf89131b1cb7232`

This contract must not be edited in response to a backtest, audit, chart, or forward
result. A formula or threshold change requires a new hypothesis ID.

## Question and causal stage

Question: among the frozen 12-pair universe, does a slow cross-sectional momentum
entry gate improve the current D48 portfolio by allowing relatively stronger long
candidates and relatively weaker short candidates?

First potentially changed stage:

```text
authentic D48 raw signal -> XSMOM gate -> existing risk/exposure gate
-> order -> fill -> unchanged RiskCap exit path
```

Baseline is remote runtime-verified `VolatilityBreakoutRiskCap`, version
`5.4-d48-riskcap-forward`. The remote source, config, image, data, and baseline result
hashes remain `PENDING_REMOTE_INVENTORY` in `experiment-ledger.md`.

Exactly one factor changes: the entry-eligibility gate below. Donchian, ATR expansion,
ADX, EMA200, BTC 200DMA/regime logic, stake sizing, protections, order pricing,
stoploss, trailing exit, and exposure limits remain identical.

## Causal time definitions

- `signal_eligible_time` is the timestamp at which the completed 5m candle and all
  authentic D48 signal inputs are available to the strategy.
- `last_complete_utc_day` is the UTC calendar day immediately before the UTC calendar
  date containing `signal_eligible_time`.
- `C_i(d)` is pair `i`'s close for completed UTC day `d`. It may be used only after
  that daily candle has closed.
- No intraday partial daily candle, later corrected value, future funding value, order
  outcome, fill, trade result, or subsequent price path may enter the rank.

## Sole registered XSMOM formula

For each eligible pair `i`:

```text
d = last_complete_utc_day(signal_eligible_time)
M_i = ln(C_i(d) / C_i(d - 28 calendar days))
```

This is a 28-completed-day close-to-close log return. It requires both positive,
finite endpoint closes and all expected completed daily candles from `d-28` through
`d`. It is not the original paper's 12-month specification; it is the sole
pre-registered crypto adaptation for this ID.

No 7/14/56/90-day alternative, ensemble, skip period, BTC residual, volatility
normalization, funding adjustment, or parameter optimization may be evaluated under
this ID.

## Point-in-time eligibility and missing data

At each signal:

1. Start with the frozen 12-pair universe in `experiment-ledger.md`.
2. A pair is rank-eligible only if it was exchange-tradable at
   `signal_eligible_time` and has the complete causal daily history required above.
3. A rank snapshot is valid only when at least 10 of the 12 pairs are rank-eligible.
4. A raw signal on a pair that is not rank-eligible is blocked and tagged
   `xsmom_missing_pair`.
5. If fewer than 10 pairs are eligible, all candidate signals using that snapshot are
   blocked and tagged `xsmom_snapshot_unavailable`.
6. Missing values are never forward-filled, backfilled, replaced by zero, or inferred
   from a later candle.

Before PnL testing, at least `98%` of authentic raw D48 signals must have a valid rank
snapshot and an eligible signal pair. If not, the hypothesis is `INCONCLUSIVE`; the
missingness gate must not be presented as XSMOM evidence.

## Deterministic ranking and gate

For every valid snapshot:

1. Sort pairs by `M_i` descending.
2. Resolve exact ties by canonical pair string ascending.
3. Assign ordinal ranks `1..N`, where rank 1 has the highest `M_i`.
4. `top4` is ranks `1,2,3,4`.
5. `bottom4` is ranks `N-3,N-2,N-1,N`.
6. A D48 long raw signal passes only if its pair is in `top4`.
7. A D48 short raw signal passes only if its pair is in `bottom4`.

The top and bottom bucket sizes are exactly four. No percentile interpolation,
side-specific lookback, tie expansion, or discretionary exception is allowed.

## Evidence layers

Every run must preserve:

1. all authentic baseline D48 raw signals;
2. XSMOM score, eligible universe, rank, decision, and reason at each raw signal;
3. existing exposure/risk-gate decision;
4. submitted order and fill evidence;
5. position and exit evidence;
6. fixed-horizon shadow outcomes for pass and blocked raw signals;
7. full baseline and candidate portfolio equity paths.

An improvement in portfolio PnL without supportive raw-signal cohort behavior must be
reported as path rearrangement, not proven XSMOM alpha.

## PATH DIVERGENCE episode

A `PATH_DIVERGENCE` episode is the causal attribution unit for a path-dependent
portfolio comparison.

### Start

An episode starts at the earliest event where baseline and candidate, having the same
pre-event active state, make different entry decisions because of the XSMOM gate and
that difference produces a different submitted/pending order or open position.

A raw signal that both variants would be unable to act on for the same pre-existing
exposure reason is recorded as a gate disagreement but does not start a portfolio
episode.

### Active state

For convergence purposes, active state contains:

- active orders, including pair, side, amount, price, status, and remaining amount;
- open positions, including pair, side, amount, entry time, entry price, and active
  stop state;
- same-side and major-group slot occupancy derived from those positions.

Wallet cash and cumulative realized PnL are excluded from the convergence test so an
otherwise completed episode can close; their deltas are episode outcomes.

### Merge and end

- Any further baseline/candidate decision difference before convergence is merged
  into the current episode.
- The episode ends at the first common event boundary after all orders and positions
  attributable to its divergence are closed and the two active-state multisets are
  again identical.
- If convergence does not occur before the window ends, the episode is right-censored.
  Report realized PnL plus marked-to-market open exposure separately; a censored
  episode does not count toward the minimum completed-episode gate.
- Episodes cannot overlap. Attribution is performed at episode level, not by pairing
  downstream trades that no longer share the same opportunity set.

Required episode outputs include start/end, triggering signal, all merged differences,
baseline and candidate realized PnL, end mark if censored, maximum equity divergence,
drawdown contribution, affected pairs/sides, and convergence status.

## Frozen windows and common controls

Use the common protocol in `experiment-ledger.md`:

- training/development: `[2026-01-01T00:00:00Z, 2026-05-01T00:00:00Z)`;
- historical retrospective: `[2026-05-01T00:00:00Z, 2026-07-10T00:00:00Z)`;
- fresh forward: begins only at the pre-outcome timestamp defined in the ledger.

Baseline and candidate must use identical starting exposure, wallet, pair data,
timeframe, fee, protections, leverage, maximum trades, and execution assumptions.
The baseline must be rerun with the same runtime/data inventory; do not compare
against an old summary from a different environment.

## Evidence-adequacy gates

### Training/development

All are required:

- at least 30 closed candidate trades;
- at least 20 authentic raw signals whose XSMOM decision differs from baseline
  entry eligibility;
- at least 10 completed `PATH_DIVERGENCE` episodes;
- valid rank coverage for at least 98% of authentic raw signals;
- complete baseline/candidate order and portfolio paths.

### Historical retrospective

All are required:

- at least 20 closed candidate trades;
- at least 10 XSMOM-changed authentic raw signals;
- at least 10 completed `PATH_DIVERGENCE` episodes;
- valid rank coverage for at least 98% of authentic raw signals.

### Fresh forward

All are required:

- at least 30 closed candidate trades;
- at least 20 XSMOM-changed authentic raw signals;
- at least 15 completed `PATH_DIVERGENCE` episodes;
- identical or flat baseline/candidate starting state;
- no carried-in evidence from before `fresh_forward_start`.

Failure of an evidence-adequacy gate is `INCONCLUSIVE`, not `REJECTED`.

## Hard performance and risk gates

### Training/development pass

All are required:

- candidate profit factor is at least baseline profit factor plus `0.03`;
- candidate net profit is at least baseline net profit;
- candidate maximum drawdown is no more than `1.00` percentage point worse than
  baseline;
- candidate closed-trade count is at least `70%` of baseline;
- after removing the single largest positive-contribution pair from both variants,
  candidate-minus-baseline net-profit uplift remains positive;
- after removing the candidate's single largest profitable trade and its causally
  paired divergence episode from both variants, candidate-minus-baseline net-profit
  uplift remains positive.

Only a training/development `PASS` may proceed to the historical retrospective check.

### Historical retrospective pass

All are required:

- candidate profit factor is at least baseline profit factor;
- candidate net profit is at least baseline net profit;
- candidate maximum drawdown is no more than `1.00` percentage point worse than
  baseline;
- candidate closed-trade count is at least `70%` of baseline;
- both concentration-removal uplifts defined above remain positive.

This is historical consistency evidence, not fresh confirmation and not deployment
authorization.

### Fresh-forward pass

All are required:

- candidate profit factor is at least `1.10` and at least baseline profit factor;
- candidate net expectancy per closed trade is greater than baseline;
- candidate maximum drawdown is no more than `1.00` percentage point worse than
  baseline;
- candidate closed-trade count is at least `70%` of baseline;
- both concentration-removal uplifts remain positive;
- raw-signal shadow outcomes and episode outcomes support the registered
  relative-strength mechanism rather than only downstream slot rearrangement.

Only satisfaction of every applicable stage gate produces final `PASS`.

## Hard reject conditions

When evidence is adequate, any applicable condition produces `REJECTED`:

- candidate profit factor is below baseline in training/development or historical
  retrospective;
- candidate net profit is below baseline in either historical window;
- candidate maximum drawdown is more than `1.00` percentage point worse;
- candidate retains fewer than `70%` of baseline closed trades;
- either concentration-removal uplift is zero or negative;
- the formula uses information unavailable at `signal_eligible_time`;
- the executed rule differs from the sole registered formula or common protocol.

If a technical mismatch can be proven before any result is inspected, repair the run
and document it. If a formula or threshold is changed after result inspection, retire
this ID and register a new one.

## Outcome assignment

- `PASS`: all evidence-adequacy and hard pass gates through fresh forward are met.
- `REJECTED`: evidence is adequate and a hard reject condition is met.
- `INCONCLUSIVE`: runtime truth is pending/mismatched, causal data or path evidence is
  incomplete, the sample is below minimum, an episode cannot be classified, or the
  historical checks pass but fresh-forward evidence is not yet adequate.

Historical success alone therefore remains `INCONCLUSIVE` for final promotion.

