tensortrade.slippage.slippage_model module

class tensortrade.slippage.slippage_model.SlippageModel[source]

Bases: object

A model for simulating slippage on an exchange trade.

abstract fill_order(trade, **kwargs)[source]

Simulate slippage on a trade ordered on a specific exchange.

Parameters
  • trade (Trade) – The trade executed on the exchange.

  • **kwargs – Any other arguments necessary for the model.

Return type

Trade

Returns

A filled Trade with the price and amount adjusted for slippage.