chore: Simplify futures backtest

This commit is contained in:
Matthias 2024-08-12 14:51:28 +02:00
parent 10f0522a6b
commit 980b81f009

View File

@ -329,15 +329,15 @@ class Backtesting:
else: else:
self.detail_data = {} self.detail_data = {}
if self.trading_mode == TradingMode.FUTURES: if self.trading_mode == TradingMode.FUTURES:
self.funding_fee_timeframe: str = self.exchange.get_option("funding_fee_timeframe") funding_fee_timeframe: str = self.exchange.get_option("funding_fee_timeframe")
self.funding_fee_timeframe_secs: int = timeframe_to_seconds(self.funding_fee_timeframe) self.funding_fee_timeframe_secs: int = timeframe_to_seconds(funding_fee_timeframe)
mark_timeframe: str = self.exchange.get_option("mark_ohlcv_timeframe") mark_timeframe: str = self.exchange.get_option("mark_ohlcv_timeframe")
# Load additional futures data. # Load additional futures data.
funding_rates_dict = history.load_data( funding_rates_dict = history.load_data(
datadir=self.config["datadir"], datadir=self.config["datadir"],
pairs=self.pairlists.whitelist, pairs=self.pairlists.whitelist,
timeframe=self.funding_fee_timeframe, timeframe=funding_fee_timeframe,
timerange=self.timerange, timerange=self.timerange,
startup_candles=0, startup_candles=0,
fail_without_data=True, fail_without_data=True,