Removed backtesting funding-fee code
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user