Removed backtesting funding-fee code

This commit is contained in:
Sam Germain
2021-09-16 03:36:48 -06:00
parent e827ba1388
commit a8657bb1ce
7 changed files with 2 additions and 195 deletions

View File

@@ -707,7 +707,6 @@ class LocalTrade():
return float(self._calc_base_close(amount, rate, fee) - total_interest)
elif (trading_mode == TradingMode.FUTURES):
self.add_funding_fees()
funding_fees = self.funding_fees or 0.0
return float(self._calc_base_close(amount, rate, fee)) + funding_fees
else:
@@ -786,19 +785,6 @@ class LocalTrade():
else:
return None
def add_funding_fees(self):
if self.trading_mode == TradingMode.FUTURES:
# TODO-lev: Calculate this correctly and add it
# if self.config['runmode'].value in ('backtest', 'hyperopt'):
# self.funding_fees = getattr(Exchange, self.exchange).calculate_funding_fees(
# self.exchange,
# self.pair,
# self.amount,
# self.open_date_utc,
# self.close_date_utc
# )
return
@staticmethod
def get_trades_proxy(*, pair: str = None, is_open: bool = None,
open_date: datetime = None, close_date: datetime = None,