Applying Trading Slippage Costs to SMART_LIMIT Backtests
Summary
The document describes TradingSlippage as an execution cost applied during backtesting to SMART_LIMIT fills. It says slippage can be supplied at the strategy level, with separate lists for buy and sell orders. This lets a researcher model an assumed cost on both sides of a simulated trade when evaluating a strategy.
The example shows the object being passed into a strategy backtest configuration, but the page gives no definition of how the amount is interpreted, how it interacts with price or quantity, or how the fill model applies it. The stated scope is explicitly limited to backtesting; the document does not claim that this setting changes live execution. It offers no performance comparison or empirical evidence, so users must consult fuller implementation documentation to determine appropriate values and assess the assumptions.
Key ideas
- TradingSlippage represents an execution cost for SMART_LIMIT fills in backtests.
- Slippage can be configured at the strategy level.
- Buy and sell slippage settings are supplied separately.
- The document limits this feature to backtesting and gives no empirical validation.
Tags
Full text
# entities.trading slippage
Trading Slippage
-------------------------------
.. meta::
:description: TradingSlippage is a backtesting-only execution cost used by SMART_LIMIT fills. You can provide slippage at the strategy level: LumiBot documentation.
TradingSlippage is a backtesting-only execution cost used by SMART_LIMIT fills.
You can provide slippage at the strategy level:
.. code-block:: python
from lumibot.entities import TradingSlippage
slippage = TradingSlippage(amount=0.05)
MyStrategy.backtest(
...,
buy_trading_slippages=[slippage],
sell_trading_slippages=[slippage],
)
.. automodule:: lumibot.entities.trading_slippage
:noindex:
:members:
:undoc-members:
:show-inheritance:Shown in full with attribution under the source's licence. Licence: GPL-3.0
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.