BUG: reduced the commission and slippage values to account for lower volume transactions. These models are still simple approximations. More work required to closely model exchange fees.

This commit is contained in:
fredfortier
2017-10-31 21:40:12 -04:00
parent 30eea4b8f7
commit e6ff7ee4fc
+4 -11
View File
@@ -11,10 +11,10 @@ log = Logger('exchange_blotter', level=LOG_LEVEL)
# It seems like we need to accept greater slippage risk in cryptos
# Orders won't often close at Equity levels.
# TODO: consider adjusting dynamically based on trading pair
DEFAULT_SLIPPAGE_SPREAD = 0.02
DEFAULT_MAKER_FEE = 0.001
DEFAULT_TAKER_FEE = 0.002
# TODO: should work with set_commission and set_slippage
DEFAULT_SLIPPAGE_SPREAD = 0.0001
DEFAULT_MAKER_FEE = 0.15
DEFAULT_TAKER_FEE = 0.25
class TradingPairFeeSchedule(CommissionModel):
@@ -100,13 +100,6 @@ class TradingPairFixedSlippage(SlippageModel):
transaction = create_transaction(
order, dt, execution_price, execution_volume
)
# transaction = Transaction(
# asset=order.asset,
# amount=abs(execution_volume),
# dt=dt,
# price=execution_price,
# order_id=order.id
# )
self._volume_for_bar += abs(transaction.amount)
yield order, transaction