Skip to main content
Every fill pays a commission and a slippage model, and commission reaches the cost basis and realised P&L, not only cash. What a run charges by default depends on how you start it.

Defaults

ziplime run charges no equity commission by default. Pass --commission-per-share for any run whose numbers you intend to trust.

Commission models

Slippage models

Setting costs on a run

Costs belong to the run, not to the strategy. context.set_commission(...) and context.set_slippage(...) exist for Zipline compatibility; prefer the run’s parameters so the cost model is visible next to the result.

Vectorized runs

The vectorized kernel applies the same commission and slippage models. A cost model the kernel can’t apply stops the run by name — unpaid costs would otherwise show up as a higher return, not as an error.
A realistic cost model narrows the gap between backtest and live results, but doesn’t close it. No backtest reproduces the future.