Adverse drift analysis on live crypto_shortterm data to establish the publish→fill latency budget for the Phase-1 emit path. Derived from crates/analysis/src/bin/latency_budget.rs, commit 2f5fb4d.
Context
The crypto-shortterm-phase0-depthaware analysis confirmed the edge survives realistic depth-capped fills and established the remaining open risk as latency survival: does the quoted top-of-book price at signal time still exist by the time the fill arrives? This analysis quantifies how long you have before adverse drift wipes the 0.5¢ latency buffer.
Candidate Regime
- τ ∈ [60, 150)s
- |p_cal − 0.5| ≥ 0.30
- Same 20-bin calibration as the
depthawarerun
Data
- 823k total rows in
crypto_shortterm - 3,162 outcomes
- 143,228 consecutive observation pairs analyzed (adjacent rows within the same window)
Key Findings
Ask-Price Movement at 1s Cadence
29.21% of 1s steps already exceed a 0.5¢ absolute move in ask price. Sub-second latency is not a nice-to-have — over a quarter of ticks cross the budget threshold in a single polling interval.
Adverse Drift Distribution (ask rising only, ¢/sec)
| Percentile | Drift (¢/sec) |
|---|---|
| median (p50) | 0.97 |
| p75 | 1.95 |
| p90 | 3.91 |
| p95 | 5.84 |
Implied Latency Budget (0.5¢ / drift_rate)
| Drift percentile used | Implied budget |
|---|---|
| median (0.97 ¢/s) | ~513ms |
| p90 (3.91 ¢/s) | ~128ms |
| p95 (5.84 ¢/s) | ~86ms |
Recommendation
Publish→fill target: 128ms (p90 of adverse drift), treated as an upper bound. At p90 drift the 0.5¢ buffer is consumed in 128ms; anything slower is gambling on a favorable tail.
Strongly Recommended
Target <50ms end-to-end. The p90 budget of 128ms leaves no margin for network jitter, NATS publish latency, or pmv2 order routing. The p95 budget is 86ms.
Sensitivity Verdict
HIGH. 29.2% of 1s steps already breach the 0.5¢ threshold. Sub-second latency is mandatory; the system has no slack at 1s poll cadence.
Important Caveat
Poll Cadence Limitation
The
observebinary polls at ~1s cadence. Intra-candle drift faster than 1s is not captured — the true sub-second drift distribution is unobservable from this data. The real latency budget may be tighter than these numbers suggest. The 29.2% figure and the drift percentiles are lower bounds on realized adverse movement.
Files
crates/analysis/src/bin/latency_budget.rs— analysis binarydocs/superpowers/phase1-latency-budget-report.md— full report- Commit:
2f5fb4d(feat(analysis): latency budget — publish→fill target from adverse drift in candidate regime)
Related
- crypto-shortterm-phase0-depthaware — established the edge survives depth caps; latency cost is the remaining open risk
- crypto-shortterm-phase1-emit — the emit binary this budget governs
- crypto-shortterm-emit-prelive-pass2 — pre-live hardening pass; NATS publish path and staleness gates
- crypto-shortterm-phase0-selectivity — candidate regime definition (τ∈[60,150)s, c≥0.30)
- crypto-shortterm