Codex
97a770da65
malkhut: online EWMA self-calibrating slippage model
Flight7 model underestimates by 80% in CWM dynamic book:
raw predicted: 0.034 bps, actual: 0.180 bps
Constant error across 22K episodes — no feedback loop.
Root cause: Flight7 calibrated on real BingX taker fills, but CWM's
synthetic dynamic book has different fill characteristics.
Fix: SlippageSelfCalibrator with EWMA feedback loop.
After each fill: error = actual - predicted (clipped to +/-20 bps)
EWMA smooths per-symbol errors (alpha=0.2)
Next prediction = raw_model + EWMA_correction
Bounded output: 0-50 bps absolute
Convergence (300 eps across 8 assets):
ETH: 9% error (from 80%)
SOL: 3.5%
DOGE: 6.7%
LINK: 5.7%
ADA: 9.7%
BTC: 48.6% (low fill count, converging)
AVAX: 28.6% (low fill count)
UNI: 52.5% (low fill count, early outlier)
Truthfulness guarantees:
- Correction is observable (CALIBRATOR.correction(symbol))
- Resets between runs (no hidden state)
- Only uses observed fills, no assumptions
- Error clipping prevents outlier domination
- Absolute bounds prevent runaway
2026-07-20 15:17:16 +02:00
..
2026-07-11 10:23:44 +02:00
2026-07-11 10:23:44 +02:00
2026-07-20 15:17:16 +02:00
2026-07-11 10:23:44 +02:00
2026-07-20 15:17:16 +02:00
2026-07-11 10:23:44 +02:00
2026-07-11 10:23:44 +02:00
2026-07-11 10:23:44 +02:00
2026-07-13 16:44:24 +02:00
2026-07-11 10:23:44 +02:00
2026-07-11 10:23:44 +02:00
2026-07-11 10:23:44 +02:00
2026-07-11 10:23:44 +02:00