{
  "study": "BTC/USDT H1 recovery with a negative taker-volume delta",
  "data": {
    "venue": "Binance Spot public market data",
    "instrument": "BTCUSDT",
    "raw_interval": "15m",
    "warmup_start_utc": "2020-12-01T00:00:00Z",
    "exclusive_archive_end_utc": "2026-10-01T00:00:00Z",
    "timestamp": "Normalize spot epoch milliseconds or microseconds to integer epoch milliseconds. Require unique aligned 15m timestamps and valid OHLCV; reject malformed prices, negative volumes and taker buy base volume outside [0, total]. Record missing slots and zero-volume records as unavailable. Preserve observed candles and leave those slots empty.",
    "hourly": "Aggregate four consecutive positive-volume 15m bars into one complete UTC H1. Use first open, maximum high, minimum low, last close and exact volume sums. Mark any incomplete H1 unavailable.",
    "checksums": "For every monthly ZIP, verify its publisher SHA-256 CHECKSUM and the CSV calendar, source row count and coverage. Record source URL, byte count and SHA-256."
  },
  "periods": [
    {
      "key": "development",
      "start_utc": "2021-01-01T00:00:00Z",
      "end_exclusive_utc": "2025-01-01T00:00:00Z"
    },
    {
      "key": "holdout",
      "start_utc": "2025-01-01T00:00:00Z",
      "end_exclusive_utc": "2026-10-01T00:00:00Z"
    }
  ],
  "signal": {
    "side": "long",
    "previous_hours": 3,
    "low_rule": "Signal low is strictly below the lows of each of the three previous completed H1 bars.",
    "close_rule": "Signal range is positive and signal close is at or above low + 0.75 × (high − low).",
    "delta": "Exact base-volume delta = 2 × taker buy base volume − total base volume on the completed signal hour.",
    "filter": "Negative delta strictly below zero. Zero belongs to the base-only subset.",
    "cooldown_hours": 16,
    "cooldown_rule": "Every eligible setup starts a shared fixed 16-hour cooldown from its H1 close. Compare the new setup's close time to the preceding eligible setup's close plus 16h; accept equality. Start cooldown regardless of later invalidation, confirmation or filter. Restart cooldown at each period boundary.",
    "period_rule": "Signal H1 open must belong to the period. Include only signals whose close plus 15h is strictly before the period end. The previous three hourly candles may be from warm-up or the preceding period.",
    "gap_rule": "Require the signal and each of the previous three H1 bars to be complete. Other hours are unavailable for setup detection."
  },
  "confirmation": {
    "max_following_closed_hours": 3,
    "invalidate": "Inspect each of the next three completed H1 bars chronologically. If low <= the signal low, cancel before checking its close. Otherwise the first close strictly above signal high confirms. If none qualifies, expire after the third close.",
    "gap_rule": "If a following H1 is incomplete before confirmation or invalidation, mark confirmation unavailable and end that setup. Keep the shared cooldown."
  },
  "entry": {
    "time": "At the confirming H1 close, model the entry from the next H1 open (the first 15m open).",
    "reference": "The next 15m bar's observed open, with modeled adverse slippage applied separately.",
    "risk_min_fraction": "0.003",
    "risk_rule": "R price distance = entry reference open − signal low. Skip if the distance is less than 0.3% of entry reference or is nonpositive. Stop and target are based on the unslipped price and are shared across cost scenarios.",
    "gap_rule": "If the entry 15m bar is unavailable, mark entry unavailable."
  },
  "exit": {
    "stop": "Signal low",
    "target_r": "2",
    "max_hold_hours": 12,
    "evaluation": "Scan the 48 consecutive 15m bars starting with the entry bar. At each open check stop then target, using open as the exit reference if the open is at or beyond the level. Otherwise low <= stop or high >= target triggers at that level. Exit at the 49th bar's open if still active.",
    "same_bar": "When both levels are within a 15m bar and its open lies between them, primary model uses stop first. Also publish target-first sensitivity for this exact ambiguous subset.",
    "market_model": "All exits model a market order at the reference adjusted for adverse sell slippage. Bar touches determine trigger conditions; OHLC alone supplies no observed fill or intrabar ordering.",
    "gap_rule": "If a 15m bar becomes unavailable before the exit can be resolved, or if the time-exit opening is unavailable, mark the trade outcome unavailable. Report it separately and exclude it from R statistics of both arms. An observed exit before a later gap is valid."
  },
  "costs": {
    "per_side_base_fee": "0.001",
    "per_side_base_slippage": "0.0002",
    "per_side_stress_fee": "0.002",
    "per_side_stress_slippage": "0.0004",
    "formula": "entry_fill = entry_reference × (1+slippage); exit_fill = exit_reference × (1−slippage); fees charged on each fill notional; net R = [exit_fill × (1−fee) − entry_fill × (1+fee)] / R_price."
  },
  "comparison": {
    "arms": [
      "all valid fills on the shared setup schedule",
      "the exact subset of those fills whose signal delta is negative"
    ],
    "metrics": [
      "setup and exclusion counts",
      "executed trades",
      "net R total and mean",
      "positive net R count",
      "closed-trade max drawdown in R",
      "yearly net R",
      "stress cost and target-first sensitivity"
    ],
    "test_policy": "Rules and period split are frozen before the archive replay. Publish both periods and both arms with the primary net total, average and max drawdown. Report each arm's net R change separately and retain the skipped cohort."
  },
  "examples": {
    "selection": [
      "earliest holdout filtered trade with positive base net R",
      "earliest holdout filtered trade with nonpositive base net R",
      "earliest holdout base-only trade"
    ],
    "fallback": "If an outcome group is empty, show the earliest available holdout trade for that arm and state the absent group.",
    "hourly_context": "H1 from eight bars before signal open through eight bars after the exit hour (within archive).",
    "exit_context": "M15 from eight bars before exit bar to eight bars after, plus exact entry/exit event information and signal/confirm references."
  }
}
