Live leakage-aware edge analysis of the Polymarket BTC 5-min pipeline against the crypto_shortterm Supabase schema, run on 129,109 rows / 530 windows. The numbers look strong, but the verdict is PROMISING but NOT confirmed — validation pending; likely contaminated by near-expiry outcome leakage. T19 exit gate is OPEN / validation-in-progress, NOT passed.

Correction (2026-06-11)

A prior write-up (commit 32d5cd4) recorded this as “T19 exit gate PASSED” with +7.28% / +19.46% as a confirmed tradeable edge. That verdict was wrong and overconfident. The factual numbers below are accurate, but the conclusion has been corrected: the directional signal is real, but a tradeable, after-cost edge is not established. See Why the verdict is NOT a pass.

Binary

crates/analysis/src/bin/edge.rs — added in commit 54ab6d0 on main of wowjeeez/pmv2-crypto-algo. Report written to docs/superpowers/phase0-edge-report.md.

Design Decisions

Leakage-Aware Train/Test Split

All distinct window_id values sorted ascending. Train = earliest 70%, test = latest 30%. The boundary window is purged (not assigned to either split) to eliminate any overlap leakage.

Calibration Map

20-bin calibration map fitted on TRAIN data only. Bins with fewer than 20 rows fall back to raw p_fair rather than the calibrated value — prevents sparse-bin noise from inflating test scores.

Trade Model

  • UP token only
  • Entry: buy-at-ask; exit: sell-at-bid
  • Fee: 0.07 * p * (1 - p) (mirrors the live Polymarket taker fee structure)
  • No-trade if both edges (long and short) are ≤ 0

Schema Note

window_id is TEXT in the live DB

The window_id column is TEXT in the deployed crypto_shortterm schema — not UUID. Use String in Rust, not uuid::Uuid. Discovered during live analysis run.

Live Results

Dataset: 129,109 rows after spread < 0.5 filter; 530 total windows.

SplitWindowsRows
Train37189,766
Test15939,083

Test-Set Performance

MetricAll Trades (calibrated)Best τ-bucket (0–30s, calibrated)
Avg net PnL/trade+7.28%+19.46%
n_trades34,2632,097
Hit rate54.4%65.4%
Sharpe0.17460.4962

All-trades baseline (raw, forced): avg = +2.08%. Calibration lifts the hit-rate from ~30% (raw) to 54% (calibrated).

What IS and ISN’T established

For Agents

  • ESTABLISHED: the model’s directional signal is real — the calibration map is monotonic; higher p_fair reliably maps to higher realized Up-frequency. That is a genuine forecasting property.
  • NOT ESTABLISHED: a tradeable, after-cost edge. The PnL numbers are very likely contaminated by leakage and optimistic fills. Do not treat +7.28% / +19.46% as bankable.

Why the verdict is NOT a pass

🚩 The +2.08% baseline is a red flag, not a confirmation

A genuinely no-edge strategy paying fees should net ≈ −fee (negative). A positive all-trades baseline (+2.08%) means there is a systematic bias in the measurement. The most likely cause is near-expiry outcome leakage.

The leakage mechanism (τ→0)

As time-to-expiry τ→0, P_fair = Φ(ln(Ŝ/K)/(σ√τ)) mechanically collapses onto the realized outcome: the denominator σ√τ → 0, so the Φ argument blows up to ±∞ and P_fair → 0 or 1 — i.e. it converges to where the price already sits relative to strike. “Trading on P_fair” in the final seconds is therefore partly reading an already-determined result, not forecasting it. This produces apparent profit that is unrealizable in practice.

The evidence is consistent with leakage

  • The edge concentrates exactly in the 0–30s leakage zone (+19.46%) and decays as τ grows. This is precisely the signature leakage would produce.
  • Caveat: this pattern is also partly consistent with the genuine thesis (fast Binance feed vs lagging Polymarket book / Chainlink oracle). The two explanations are not yet separated — that separation is the core validation task.

Fills are optimistic

  • PnL assumes top-of-book fills at 1s cadence, with no depth or slippage modeling.
  • Near-expiry book depth is thin (echoes the earlier ~$150–250 touch-depth and ~0.98-spread findings). A +19% that exists only in the final seconds at untradeable size is the classic binary-near-expiry mirage.

Required before any GO

Open gate — T19 status: OPEN / validation-in-progress

All of the following must be cleared before a GO decision or any capital:

  1. Explain or kill the +2% baseline. A no-edge baseline must be ≈ −fee. Until the +2% is explained, every PnL figure is suspect.
  2. Re-run excluding the last ~60s. If the edge largely vanishes, it was leakage.
  3. Realistic-fill model. Cap fills at recorded book depth; add slippage. No top-of-book free fills.
  4. Full purged/embargoed walk-forward + deflated Sharpe + t ≈ 3 significance.
  5. Forward paper-trade (live, out-of-sample, no capital) before any capital is committed.

Residual Risks & Open Questions

  • Sharpe (0.1746 overall) is modest even before leakage adjustment — and is likely overstated by the optimistic fills.
  • The 0.98 book-spread / thin near-expiry depth concern directly undercuts the 0–30s τ-bucket that drives the headline number; spread < 0.5 row-filtering does not substitute for a depth/slippage fill model.
  • The window_id TEXT vs UUID finding should be propagated to any future Rust tooling that queries this column.