Risk management

Fees and slippage assumptions

How the engine charges fees and applies slippage in backtests, and what to set in live.

1 min readUpdated Jun 19, 2026

fees percent and slippage percent live in risk management. They apply to every fill in the backtest and serve as documentation in live trading.

Defaults

  • fees_pct: 0.05 - 5bps per fill (entry and exit each pay).
  • slippage_pct: 0.03 - 3bps slippage on market fills.

Backtest math

For each fill:

fee_cost      = fill_value × fees_pct / 100
slippage_cost = fill_value × slippage_pct / 100  (only on market)
net_pnl       = gross_pnl - fee_cost - slippage_cost

Both costs are subtracted from the gross trade P&L. Entry pays, exit pays - fees double up.

Live trading

The engine doesn't apply these in live trading (the exchange does). They're informational; set them close to your venue's actual rates so backtests and live results align.

Maker vs taker

LucraX uses a single fees number. If your live trading mixes maker and taker fills (limit fills are usually maker), the backtest will over-estimate fees on the limit side. For accurate modeling, set fees percent to your blended rate.

Pitfalls

  • Zero fees + zero slippage = backtests that look great and live performance that doesn't. Always assume realistic costs.
  • High-frequency strategies are dominated by fees. A 5bps round-trip on a 10bps target is half your edge.
Fees and slippage assumptions | Help Center | LucraX · LucraX