tensortrade.oms.services.slippage.slippage_model module

class tensortrade.oms.services.slippage.slippage_model.SlippageModel[source]

Bases: tensortrade.core.component.Component

A model for simulating slippage on an exchange trade.

adjust_trade(trade: tensortrade.oms.orders.trade.Trade, **kwargs) → tensortrade.oms.orders.trade.Trade[source]

Simulate slippage on a trade ordered on a specific exchange.

Parameters:
  • trade (Trade) – The trade executed on the exchange.
  • **kwargs (keyword arguments) – Any other arguments necessary for the model.
Returns:

Trade – A filled trade with the price and size adjusted for slippage.

registered_name = 'slippage'