Defaults
Commission models
Slippage models
Setting costs on a run
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.