Slippage measures how far the executed average price moved from the pre-trade spot price.
Implement slippage_bps.
Use:
(spot_price_bps - execution_price_bps) * 10_000 / spot_price_bpsFor:
20_00018_100Then:
(20_000 - 18_100) * 10_000 / 20_000 = 950