Slippage
When a market order is placed, the price that you receive is dependent on the other side of the transaction (either buyers or sellers), the difference between the price you transact at the the fill-price is called Slippage.
Slippage can be modelled directly through looking through order books. Though this is out of scope for Dejavu currently. Instead, Dejavu provides a few simple slippage models out the box. But, like everything in Dejavu, you can extend and create the perfect slippage model for your backtest.
dejavu.execution.orders.NoSlippage
¶
Bases: SlippageModel
Simple slippage that assumes no slippage occurs. In other words, the market price is the fill price.
dejavu.execution.orders.VolumeWeightedSlippage
¶
Bases: SlippageModel
Volume-weighted slippage model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
SlippageModel
|
_type_
|
description |
required |