Skip to content

Commit dce5b1e

Browse files
Guillaume De Saint MartinGuillaumeDSM
authored andcommitted
[Backtesting] fix futures backtesting ref market
1 parent 431f0ae commit dce5b1e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

octobot/backtesting/independent_backtesting.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,9 @@ def _find_reference_market(self):
370370
self.logger.error(f"Mixed inverse and linear contracts backtesting are not supported yet")
371371
self.octobot_backtesting.futures_contract_type = trading_enums.FutureContractType.LINEAR_PERPETUAL
372372
# in inverse contracts, use BTC for BTC/USD trading as reference market
373-
return symbol.settlement_asset
373+
if symbol.settlement_asset:
374+
# only use settlement asset if available
375+
return symbol.settlement_asset
374376
for symbol in symbols:
375377
quote = symbol.quote
376378
if ref_market_candidate is None:

0 commit comments

Comments
 (0)