Entry execution

Slippage modeling

How apply_slippage affects backtest fill prices and live execution math.

1 min readUpdated Jun 19, 2026

apply slippage toggles whether the engine simulates slippage on fills. When true, every market fill in the backtest is adjusted against the trade direction by risk_management.slippage_pct.

Default

true for market orders, false for limit orders.

Math

adjusted_fill = close × (1 + slippage_pct / 100)   (long)
adjusted_fill = close × (1 - slippage_pct / 100)   (short)

In backtest, this widens entry costs by slippage percent. In live trading, the value is informational - actual slippage is whatever the venue gave you.

When to disable

  • Limit orders - you already pay or refuse a specific price; no adjustment needed.
  • Backtesting against tick data that already includes spread - double-counts otherwise.

Pitfalls

  • slippage_pct: 0 is unrealistic for any meaningful order size. 1-5bps is typical for liquid crypto markets; more for small-cap or news bars.
  • Slippage is independent of fees. Both are subtracted from the trade P&L; don't conflate them.
Slippage modeling | Help Center | LucraX · LucraX