class_docstr: Abstract interface for defining a slippage model.
      
class_docstr_tok: ["Abstract","interface","for","defining","a","slippage","model","."]
code: def simulate(self, data, asset, orders_for_asset):
      self._volume_for_bar = 0
      volume = data.current(asset, "volume")
  
      if volume == 0:
          return
  
      # can use the close price, since we verified there's volume in this
      # bar.
      price = data.current(asset, "close")
  
      # BEGIN
      #
      # Remove this block after fixing data to ensure volume always has
      # corresponding price.
      if isnull(price):
          return
      # END
      dt = data.current_dt
  
      for order in orders_for_asset:
          if order.open_amount == 0:
              continue
  
          order.check_triggers(price, dt)
          if not order.triggered:
              continue
  
          txn = None
  
          try:
              execution_price, execution_volume = self.process_order(
                  data, order
              )
  
              if execution_price is not None:
                  txn = create_transaction(
                      order,
                      data.current_dt,
                      execution_price,
                      execution_volume,
                  )
  
          except LiquidityExceeded:
              break
  
          if txn:
              self._volume_for_bar += abs(txn.amount)
              yield order, txn
  
imports: from __future__ import division
  from abc import abstractmethod
  import math
  import numpy
  from pandas import isnull
  from six import with_metaclass
  from toolz import merge
  from catalyst.assets import Equity, Future
  from catalyst.errors import HistoryWindowStartsBeforeData
  from catalyst.finance.constants import ROOT_SYMBOL_TO_ETA
  from catalyst.finance.shared import AllowedAssetMarker, FinancialModelMeta
  from catalyst.finance.transaction import create_transaction
  from catalyst.utils.cache import ExpiringCache
  from catalyst.utils.dummy import DummyMapping
label_desc: Use image node_id 4 for calling the SlippageModel obj's underlying member method code with example usage: obj.simulate(data, asset, orders_for_asset) without return types