Closed luca-palese closed 2 months ago
Hello,
QV3 is not backtestable like this, you need the backtestable version of the file, which is available in the FreqAI discord in the #strats-library channel.
However, in general, this is a very computationally intense strategy to backtest. It is recommended to run dry instead.
Cheers,
Rob
It is the backtestable model; here you can see what I was referring earlier, either the key error or no trades are made.
C:\Users\Luca Palese\ft_userdata>docker compose -f docker-compose-ai.yml run --rm freqtrade backtesting --config user_data/config.json --strategy QuickAdapterV3 --freqaimodel XGBoostRegressorQuickAdapterV3 --timerange 20240501-20240505
2024-09-20 18:32:47,376 - freqtrade - INFO - freqtrade 2024.8
2024-09-20 18:32:47,401 - freqtrade.configuration.load_config - INFO - Using config: user_data/config.json ...
2024-09-20 18:32:47,412 - freqtrade.loggers - INFO - Verbosity set to 0
2024-09-20 18:32:47,412 - freqtrade.configuration.configuration - WARNING - `force_entry_enable` RPC message enabled.
2024-09-20 18:32:47,413 - freqtrade.configuration.configuration - INFO - Using max_open_trades: 3 ...
2024-09-20 18:32:47,413 - freqtrade.configuration.configuration - INFO - Parameter --timerange detected: 20240501-20240505 ...
2024-09-20 18:32:47,824 - freqtrade.configuration.configuration - INFO - Using user-data directory: /freqtrade/user_data ...
2024-09-20 18:32:47,826 - freqtrade.configuration.configuration - INFO - Using data directory: /freqtrade/user_data/data/binance ...
2024-09-20 18:32:47,827 - freqtrade.configuration.configuration - INFO - Parameter --cache=day detected ...
2024-09-20 18:32:47,827 - freqtrade.configuration.configuration - INFO - Filter trades by timerange: 20240501-20240505
2024-09-20 18:32:47,827 - freqtrade.configuration.configuration - INFO - Using freqaimodel class name: XGBoostRegressorQuickAdapterV3
2024-09-20 18:32:47,829 - freqtrade.exchange.check_exchange - INFO - Checking exchange...
2024-09-20 18:32:47,845 - freqtrade.exchange.check_exchange - INFO - Exchange "binance" is officially supported by the Freqtrade development team.
2024-09-20 18:32:47,846 - freqtrade.configuration.configuration - INFO - Using pairlist from configuration.
2024-09-20 18:32:47,846 - freqtrade.configuration.config_validation - INFO - Validating configuration ...
2024-09-20 18:32:47,853 - freqtrade.commands.optimize_commands - INFO - Starting freqtrade in Backtesting mode
2024-09-20 18:32:47,855 - freqtrade.exchange.exchange - INFO - Instance is running with dry_run enabled
2024-09-20 18:32:47,856 - freqtrade.exchange.exchange - INFO - Using CCXT 4.3.88
2024-09-20 18:32:47,856 - freqtrade.exchange.exchange - INFO - Applying additional ccxt config: {'options': {'defaultType': 'swap'}}
2024-09-20 18:32:47,871 - freqtrade.exchange.exchange - INFO - Applying additional ccxt config: {'options': {'defaultType': 'swap'}}
2024-09-20 18:32:47,888 - freqtrade.exchange.exchange - INFO - Using Exchange "Binance"
2024-09-20 18:32:56,459 - freqtrade.resolvers.exchange_resolver - INFO - Using resolved exchange 'Binance'...
2024-09-20 18:32:57,149 - freqtrade.resolvers.iresolver - WARNING - Could not import /freqtrade/user_data/strategies/GodStra.py due to 'No module named 'ta''
2024-09-20 18:32:57,167 - freqtrade.resolvers.iresolver - WARNING - Could not import /freqtrade/user_data/strategies/Heracles.py due to 'No module named 'ta''
2024-09-20 18:32:57,218 - freqtrade.resolvers.iresolver - WARNING - Could not import /freqtrade/user_data/strategies/MacheteV8b_Fixed.py due to 'No module named 'finta''
2024-09-20 18:32:57,744 - freqtrade.resolvers.iresolver - INFO - Using resolved strategy QuickAdapterV3 from '/freqtrade/user_data/strategies/QuickAdapterV3.py'...
2024-09-20 18:32:57,746 - freqtrade.strategy.hyper - INFO - Found no parameter file.
2024-09-20 18:32:57,747 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'timeframe' with value in config file: 3m.
2024-09-20 18:32:57,747 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'stake_currency' with value in config file: USDT.
2024-09-20 18:32:57,747 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'stake_amount' with value in config file: unlimited.
2024-09-20 18:32:57,747 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'unfilledtimeout' with value in config file: {'entry': 10, 'exit': 30, 'exit_timeout_count': 0, 'unit': 'minutes'}.
2024-09-20 18:32:57,747 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'max_open_trades' with value in config file: 3.
2024-09-20 18:32:57,747 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using minimal_roi: {'0': 0.03, '5000': -1}
2024-09-20 18:32:57,747 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using timeframe: 3m
2024-09-20 18:32:57,748 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using stoploss: -0.04
2024-09-20 18:32:57,748 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using trailing_stop: False
2024-09-20 18:32:57,748 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using trailing_stop_positive_offset: 0.0
2024-09-20 18:32:57,748 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using trailing_only_offset_is_reached: False
2024-09-20 18:32:57,748 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using use_custom_stoploss: False
2024-09-20 18:32:57,749 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using process_only_new_candles: True
2024-09-20 18:32:57,750 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using order_types: {'entry': 'limit', 'exit': 'market', 'emergency_exit': 'market', 'force_exit': 'market', 'force_entry': 'market', 'stoploss': 'market', 'stoploss_on_exchange': False, 'stoploss_on_exchange_interval': 120}
2024-09-20 18:32:57,750 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using order_time_in_force: {'entry': 'GTC', 'exit': 'GTC'}
2024-09-20 18:32:57,750 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using stake_currency: USDT
2024-09-20 18:32:57,750 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using stake_amount: unlimited
2024-09-20 18:32:57,750 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using protections: [{'method': 'CooldownPeriod', 'stop_duration_candles': 4}, {'method': 'MaxDrawdown', 'lookback_period_candles': 48, 'trade_limit': 20, 'stop_duration_candles': 4, 'max_allowed_drawdown': 0.2}]
2024-09-20 18:32:57,751 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using startup_candle_count: 80
2024-09-20 18:32:57,751 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using unfilledtimeout: {'entry': 10, 'exit': 30, 'exit_timeout_count': 0, 'unit': 'minutes'}
2024-09-20 18:32:57,751 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using use_exit_signal: True
2024-09-20 18:32:57,752 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using exit_profit_only: False
2024-09-20 18:32:57,752 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using ignore_roi_if_entry_signal: False
2024-09-20 18:32:57,752 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using exit_profit_offset: 0.0
2024-09-20 18:32:57,753 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using disable_dataframe_checks: False
2024-09-20 18:32:57,753 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using ignore_buying_expired_candle_after: 0
2024-09-20 18:32:57,753 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using position_adjustment_enable: False
2024-09-20 18:32:57,753 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using max_entry_position_adjustment: 1
2024-09-20 18:32:57,753 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using max_open_trades: 3
2024-09-20 18:32:57,753 - freqtrade.configuration.config_validation - INFO - Validating configuration ...
2024-09-20 18:32:57,792 - freqtrade.resolvers.iresolver - INFO - Using resolved pairlist StaticPairList from '/freqtrade/freqtrade/plugins/pairlist/StaticPairList.py'...
2024-09-20 18:32:57,805 - freqtrade.optimize.backtesting - INFO - Using fee 0.0500% - worst case fee from exchange (lowest tier).
2024-09-20 18:32:57,807 - freqtrade.data.dataprovider - INFO - Increasing startup_candle_count for freqai on 3m to 6800
2024-09-20 18:32:57,825 - freqtrade.data.history.history_utils - INFO - Using indicator startup period: 6800 ...
2024-09-20 18:32:58,186 - freqtrade.optimize.backtesting - INFO - Loading data from 2024-04-16 20:00:00 up to 2024-05-05 00:00:00 (18 days).
2024-09-20 18:32:58,285 - freqtrade.optimize.backtesting - INFO - Dataload complete. Calculating indicators
2024-09-20 18:32:58,304 - freqtrade.optimize.backtesting - INFO - Running backtesting for Strategy QuickAdapterV3
2024-09-20 18:32:58,644 - freqtrade.resolvers.iresolver - INFO - Using resolved freqaimodel XGBoostRegressorQuickAdapterV3 from '/freqtrade/user_data/freqaimodels/XGBoostRegressorQuickAdapterV3.py'...
2024-09-20 18:32:58,650 - freqtrade.freqai.freqai_interface - INFO - Backtesting module configured to save all models.
2024-09-20 18:32:58,662 - freqtrade.freqai.data_drawer - INFO - Could not find existing historic_predictions, starting from scratch
2024-09-20 18:32:58,664 - freqtrade.freqai.data_drawer - INFO - Could not find existing metric tracker, starting from scratch
2024-09-20 18:32:58,664 - freqtrade.freqai.freqai_interface - INFO - Set existing queue from trained timestamps. Best approximation queue: {best_queue}
2024-09-20 18:32:58,676 - freqtrade.strategy.hyper - INFO - No params for buy found, using default values.
2024-09-20 18:32:58,677 - freqtrade.strategy.hyper - INFO - No params for sell found, using default values.
2024-09-20 18:32:58,677 - freqtrade.strategy.hyper - INFO - No params for protection found, using default values.
2024-09-20 18:32:58,684 - freqtrade.freqai.freqai_interface - INFO - Training 2 timeranges
2024-09-20 18:32:58,690 - freqtrade.freqai.freqai_interface - INFO - Training BTC/USDT:USDT, 1/1 pairs from 2024-04-17 00:00:00 to 2024-05-01 00:00:00, 1/2 trains
2024-09-20 18:32:58,706 - freqtrade.freqai.data_kitchen - INFO - Found backtesting prediction file at /freqtrade/user_data/models/quickadapter-xgboost/backtesting_predictions/cb_btc_1714521600_prediction.feather
2024-09-20 18:32:58,845 - freqtrade.data.dataprovider - INFO - Increasing startup_candle_count for freqai on 5m to 4112
2024-09-20 18:32:58,845 - freqtrade.data.dataprovider - INFO - Loading data for BTC/USDT:USDT 5m from 2024-04-16 17:20:00 to 2024-05-05 00:00:00
2024-09-20 18:32:59,902 - freqtrade.data.dataprovider - INFO - Increasing startup_candle_count for freqai on 15m to 1424
2024-09-20 18:32:59,903 - freqtrade.data.dataprovider - INFO - Loading data for BTC/USDT:USDT 15m from 2024-04-16 04:00:00 to 2024-05-05 00:00:00
2024-09-20 18:33:00,273 - freqtrade.data.dataprovider - INFO - Increasing startup_candle_count for freqai on 1h to 416
2024-09-20 18:33:00,274 - freqtrade.data.dataprovider - INFO - Loading data for BTC/USDT:USDT 1h from 2024-04-13 16:00:00 to 2024-05-05 00:00:00
2024-09-20 18:33:00,541 - freqtrade.freqai.freqai_interface - INFO - Training BTC/USDT:USDT, 1/1 pairs from 2024-04-19 00:00:00 to 2024-05-03 00:00:00, 2/2 trains
2024-09-20 18:33:00,634 - freqtrade.freqai.data_kitchen - INFO - Found backtesting prediction file at /freqtrade/user_data/models/quickadapter-xgboost/backtesting_predictions/cb_btc_1714694400_prediction.feather
2024-09-20 18:33:00,667 - freqtrade.freqai.freqai_interface - INFO - Applying fit_live_predictions in backtesting
2024-09-20 18:33:00,749 - freqtrade - ERROR - Fatal exception!
Traceback (most recent call last):
File "/freqtrade/freqtrade/main.py", line 45, in main
return_code = args["func"](args)
^^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/commands/optimize_commands.py", line 60, in start_backtesting
backtesting.start()
File "/freqtrade/freqtrade/optimize/backtesting.py", line 1621, in start
min_date, max_date = self.backtest_one_strategy(strat, data, timerange)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/optimize/backtesting.py", line 1531, in backtest_one_strategy
preprocessed = self.strategy.advise_all_indicators(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/strategy/interface.py", line 1587, in advise_all_indicators
pair: self.advise_indicators(pair_data.copy(), {"pair": pair}).copy()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/strategy/interface.py", line 1645, in advise_indicators
return self.populate_indicators(dataframe, metadata)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/freqtrade/user_data/strategies/QuickAdapterV3.py", line 239, in populate_indicators
dataframe = self.freqai.start(dataframe, metadata, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/freqai/freqai_interface.py", line 161, in start
dk = self.start_backtesting(dataframe, metadata, self.dk, strategy)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/freqai/freqai_interface.py", line 387, in start_backtesting
self.backtesting_fit_live_predictions(dk)
File "/freqtrade/freqtrade/freqai/freqai_interface.py", line 891, in backtesting_fit_live_predictions
dk.full_df.at[index, f"{label}_mean"] = self.dk.data["labels_mean"][
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '&s-extrema'
C:\Users\Luca Palese\ft_userdata>docker compose -f docker-compose-ai.yml run --rm freqtrade backtesting --config user_data/config.json --strategy QuickAdapterV3 --freqaimodel XGBoostRegressorQuickAdapterV3 --timerange 20240501-20240504
2024-09-20 18:33:20,036 - freqtrade - INFO - freqtrade 2024.8
2024-09-20 18:33:20,057 - freqtrade.configuration.load_config - INFO - Using config: user_data/config.json ...
2024-09-20 18:33:20,063 - freqtrade.loggers - INFO - Verbosity set to 0
2024-09-20 18:33:20,063 - freqtrade.configuration.configuration - WARNING - `force_entry_enable` RPC message enabled.
2024-09-20 18:33:20,063 - freqtrade.configuration.configuration - INFO - Using max_open_trades: 3 ...
2024-09-20 18:33:20,063 - freqtrade.configuration.configuration - INFO - Parameter --timerange detected: 20240501-20240504 ...
2024-09-20 18:33:20,359 - freqtrade.configuration.configuration - INFO - Using user-data directory: /freqtrade/user_data ...
2024-09-20 18:33:20,362 - freqtrade.configuration.configuration - INFO - Using data directory: /freqtrade/user_data/data/binance ...
2024-09-20 18:33:20,362 - freqtrade.configuration.configuration - INFO - Parameter --cache=day detected ...
2024-09-20 18:33:20,363 - freqtrade.configuration.configuration - INFO - Filter trades by timerange: 20240501-20240504
2024-09-20 18:33:20,363 - freqtrade.configuration.configuration - INFO - Using freqaimodel class name: XGBoostRegressorQuickAdapterV3
2024-09-20 18:33:20,364 - freqtrade.exchange.check_exchange - INFO - Checking exchange...
2024-09-20 18:33:20,381 - freqtrade.exchange.check_exchange - INFO - Exchange "binance" is officially supported by the Freqtrade development team.
2024-09-20 18:33:20,382 - freqtrade.configuration.configuration - INFO - Using pairlist from configuration.
2024-09-20 18:33:20,382 - freqtrade.configuration.config_validation - INFO - Validating configuration ...
2024-09-20 18:33:20,388 - freqtrade.commands.optimize_commands - INFO - Starting freqtrade in Backtesting mode
2024-09-20 18:33:20,388 - freqtrade.exchange.exchange - INFO - Instance is running with dry_run enabled
2024-09-20 18:33:20,389 - freqtrade.exchange.exchange - INFO - Using CCXT 4.3.88
2024-09-20 18:33:20,389 - freqtrade.exchange.exchange - INFO - Applying additional ccxt config: {'options': {'defaultType': 'swap'}}
2024-09-20 18:33:20,405 - freqtrade.exchange.exchange - INFO - Applying additional ccxt config: {'options': {'defaultType': 'swap'}}
2024-09-20 18:33:20,424 - freqtrade.exchange.exchange - INFO - Using Exchange "Binance"
2024-09-20 18:33:29,007 - freqtrade.resolvers.exchange_resolver - INFO - Using resolved exchange 'Binance'...
2024-09-20 18:33:29,446 - freqtrade.resolvers.iresolver - WARNING - Could not import /freqtrade/user_data/strategies/GodStra.py due to 'No module named 'ta''
2024-09-20 18:33:29,462 - freqtrade.resolvers.iresolver - WARNING - Could not import /freqtrade/user_data/strategies/Heracles.py due to 'No module named 'ta''
2024-09-20 18:33:29,508 - freqtrade.resolvers.iresolver - WARNING - Could not import /freqtrade/user_data/strategies/MacheteV8b_Fixed.py due to 'No module named 'finta''
2024-09-20 18:33:29,976 - freqtrade.resolvers.iresolver - INFO - Using resolved strategy QuickAdapterV3 from '/freqtrade/user_data/strategies/QuickAdapterV3.py'...
2024-09-20 18:33:29,978 - freqtrade.strategy.hyper - INFO - Found no parameter file.
2024-09-20 18:33:29,979 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'timeframe' with value in config file: 3m.
2024-09-20 18:33:29,979 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'stake_currency' with value in config file: USDT.
2024-09-20 18:33:29,979 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'stake_amount' with value in config file: unlimited.
2024-09-20 18:33:29,979 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'unfilledtimeout' with value in config file: {'entry': 10, 'exit': 30, 'exit_timeout_count': 0, 'unit': 'minutes'}.
2024-09-20 18:33:29,979 - freqtrade.resolvers.strategy_resolver - INFO - Override strategy 'max_open_trades' with value in config file: 3.
2024-09-20 18:33:29,979 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using minimal_roi: {'0': 0.03, '5000': -1}
2024-09-20 18:33:29,979 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using timeframe: 3m
2024-09-20 18:33:29,980 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using stoploss: -0.04
2024-09-20 18:33:29,980 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using trailing_stop: False
2024-09-20 18:33:29,980 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using trailing_stop_positive_offset: 0.0
2024-09-20 18:33:29,980 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using trailing_only_offset_is_reached: False
2024-09-20 18:33:29,980 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using use_custom_stoploss: False
2024-09-20 18:33:29,980 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using process_only_new_candles: True
2024-09-20 18:33:29,980 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using order_types: {'entry': 'limit', 'exit': 'market', 'emergency_exit': 'market', 'force_exit': 'market', 'force_entry': 'market', 'stoploss': 'market', 'stoploss_on_exchange': False, 'stoploss_on_exchange_interval': 120}
2024-09-20 18:33:29,981 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using order_time_in_force: {'entry': 'GTC', 'exit': 'GTC'}
2024-09-20 18:33:29,981 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using stake_currency: USDT
2024-09-20 18:33:29,981 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using stake_amount: unlimited
2024-09-20 18:33:29,981 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using protections: [{'method': 'CooldownPeriod', 'stop_duration_candles': 4}, {'method': 'MaxDrawdown', 'lookback_period_candles': 48, 'trade_limit': 20, 'stop_duration_candles': 4, 'max_allowed_drawdown': 0.2}]
2024-09-20 18:33:29,981 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using startup_candle_count: 80
2024-09-20 18:33:29,981 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using unfilledtimeout: {'entry': 10, 'exit': 30, 'exit_timeout_count': 0, 'unit': 'minutes'}
2024-09-20 18:33:29,981 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using use_exit_signal: True
2024-09-20 18:33:29,981 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using exit_profit_only: False
2024-09-20 18:33:29,981 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using ignore_roi_if_entry_signal: False
2024-09-20 18:33:29,982 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using exit_profit_offset: 0.0
2024-09-20 18:33:29,982 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using disable_dataframe_checks: False
2024-09-20 18:33:29,982 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using ignore_buying_expired_candle_after: 0
2024-09-20 18:33:29,982 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using position_adjustment_enable: False
2024-09-20 18:33:29,982 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using max_entry_position_adjustment: 1
2024-09-20 18:33:29,982 - freqtrade.resolvers.strategy_resolver - INFO - Strategy using max_open_trades: 3
2024-09-20 18:33:29,982 - freqtrade.configuration.config_validation - INFO - Validating configuration ...
2024-09-20 18:33:30,012 - freqtrade.resolvers.iresolver - INFO - Using resolved pairlist StaticPairList from '/freqtrade/freqtrade/plugins/pairlist/StaticPairList.py'...
2024-09-20 18:33:30,025 - freqtrade.optimize.backtesting - INFO - Using fee 0.0500% - worst case fee from exchange (lowest tier).
2024-09-20 18:33:30,026 - freqtrade.data.dataprovider - INFO - Increasing startup_candle_count for freqai on 3m to 6800
2024-09-20 18:33:30,043 - freqtrade.data.history.history_utils - INFO - Using indicator startup period: 6800 ...
2024-09-20 18:33:30,254 - freqtrade.optimize.backtesting - INFO - Loading data from 2024-04-16 20:00:00 up to 2024-05-04 00:00:00 (17 days).
2024-09-20 18:33:30,320 - freqtrade.optimize.backtesting - INFO - Dataload complete. Calculating indicators
2024-09-20 18:33:30,335 - freqtrade.optimize.backtesting - INFO - Running backtesting for Strategy QuickAdapterV3
2024-09-20 18:33:30,455 - freqtrade.resolvers.iresolver - INFO - Using resolved freqaimodel XGBoostRegressorQuickAdapterV3 from '/freqtrade/user_data/freqaimodels/XGBoostRegressorQuickAdapterV3.py'...
2024-09-20 18:33:30,460 - freqtrade.freqai.freqai_interface - INFO - Backtesting module configured to save all models.
2024-09-20 18:33:30,471 - freqtrade.freqai.data_drawer - INFO - Could not find existing historic_predictions, starting from scratch
2024-09-20 18:33:30,473 - freqtrade.freqai.data_drawer - INFO - Could not find existing metric tracker, starting from scratch
2024-09-20 18:33:30,474 - freqtrade.freqai.freqai_interface - INFO - Set existing queue from trained timestamps. Best approximation queue: {best_queue}
2024-09-20 18:33:30,481 - freqtrade.strategy.hyper - INFO - No params for buy found, using default values.
2024-09-20 18:33:30,481 - freqtrade.strategy.hyper - INFO - No params for sell found, using default values.
2024-09-20 18:33:30,482 - freqtrade.strategy.hyper - INFO - No params for protection found, using default values.
2024-09-20 18:33:30,488 - freqtrade.freqai.freqai_interface - INFO - Training 2 timeranges
2024-09-20 18:33:30,491 - freqtrade.freqai.freqai_interface - INFO - Training BTC/USDT:USDT, 1/1 pairs from 2024-04-17 00:00:00 to 2024-05-01 00:00:00, 1/2 trains
2024-09-20 18:33:30,505 - freqtrade.freqai.data_kitchen - INFO - Found backtesting prediction file at /freqtrade/user_data/models/quickadapter-xgboost/backtesting_predictions/cb_btc_1714521600_prediction.feather
2024-09-20 18:33:30,592 - freqtrade.data.dataprovider - INFO - Increasing startup_candle_count for freqai on 5m to 4112
2024-09-20 18:33:30,592 - freqtrade.data.dataprovider - INFO - Loading data for BTC/USDT:USDT 5m from 2024-04-16 17:20:00 to 2024-05-04 00:00:00
2024-09-20 18:33:31,210 - freqtrade.data.dataprovider - INFO - Increasing startup_candle_count for freqai on 15m to 1424
2024-09-20 18:33:31,211 - freqtrade.data.dataprovider - INFO - Loading data for BTC/USDT:USDT 15m from 2024-04-16 04:00:00 to 2024-05-04 00:00:00
2024-09-20 18:33:31,580 - freqtrade.data.dataprovider - INFO - Increasing startup_candle_count for freqai on 1h to 416
2024-09-20 18:33:31,580 - freqtrade.data.dataprovider - INFO - Loading data for BTC/USDT:USDT 1h from 2024-04-13 16:00:00 to 2024-05-04 00:00:00
2024-09-20 18:33:31,765 - freqtrade.freqai.freqai_interface - INFO - Training BTC/USDT:USDT, 1/1 pairs from 2024-04-19 00:00:00 to 2024-05-03 00:00:00, 2/2 trains
2024-09-20 18:33:31,785 - freqtrade.freqai.data_kitchen - INFO - A new backtesting prediction file is required. (Number of predictions is different from dataframe length or old prediction file version).
2024-09-20 18:33:34,120 - freqtrade.freqai.freqai_interface - INFO - Found model at /freqtrade/user_data/models/quickadapter-xgboost/sub-train-BTC_1714694400/cb_btc_1714694400
2024-09-20 18:33:37,336 - freqtrade.freqai.freqai_interface - INFO - Applying fit_live_predictions in backtesting
2024-09-20 18:34:25,434 - freqtrade.optimize.backtesting - INFO - Backtesting with data from 2024-05-01 00:00:00 up to 2024-05-04 00:00:00 (3 days).
2024-09-20 18:34:25,559 - freqtrade.misc - INFO - dumping json to "/freqtrade/user_data/backtest_results/backtest-result-2024-09-20_18-34-25.meta.json"
2024-09-20 18:34:25,575 - freqtrade.misc - INFO - dumping json to "/freqtrade/user_data/backtest_results/backtest-result-2024-09-20_18-34-25.json"
2024-09-20 18:34:25,592 - freqtrade.misc - INFO - dumping json to "/freqtrade/user_data/backtest_results/.last_result.json"
Result for strategy QuickAdapterV3
BACKTESTING REPORT
┏━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Pair ┃ Trades ┃ Avg Profit % ┃ Tot Profit USDT ┃ Tot Profit % ┃ Avg Duration ┃ Win Draw Loss Win% ┃
┡━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━┩
│ BTC/USDT:USDT │ 0 │ 0.0 │ 0.000 │ 0.0 │ 0:00 │ 0 0 0 0 │
│ TOTAL │ 0 │ 0.0 │ 0.000 │ 0.0 │ 0:00 │ 0 0 0 0 │
└───────────────┴────────┴──────────────┴─────────────────┴──────────────┴──────────────┴────────────────────────┘
LEFT OPEN TRADES REPORT
┏━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Pair ┃ Trades ┃ Avg Profit % ┃ Tot Profit USDT ┃ Tot Profit % ┃ Avg Duration ┃ Win Draw Loss Win% ┃
┡━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━┩
│ TOTAL │ 0 │ 0.0 │ 0.000 │ 0.0 │ 0:00 │ 0 0 0 0 │
└───────┴────────┴──────────────┴─────────────────┴──────────────┴──────────────┴────────────────────────┘
ENTER TAG STATS
┏━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Enter Tag ┃ Entries ┃ Avg Profit % ┃ Tot Profit USDT ┃ Tot Profit % ┃ Avg Duration ┃ Win Draw Loss Win% ┃
┡━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━┩
│ TOTAL │ 0 │ 0.0 │ 0.000 │ 0.0 │ 0:00 │ 0 0 0 0 │
└───────────┴─────────┴──────────────┴─────────────────┴──────────────┴──────────────┴────────────────────────┘
EXIT REASON STATS
┏━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Exit Reason ┃ Exits ┃ Avg Profit % ┃ Tot Profit USDT ┃ Tot Profit % ┃ Avg Duration ┃ Win Draw Loss Win% ┃
┡━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━┩
│ TOTAL │ 0 │ 0.0 │ 0.000 │ 0.0 │ 0:00 │ 0 0 0 0 │
└─────────────┴───────┴──────────────┴─────────────────┴──────────────┴──────────────┴────────────────────────┘
MIXED TAG STATS
┏━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Enter Tag ┃ Exit Reason ┃ Trades ┃ Avg Profit % ┃ Tot Profit USDT ┃ Tot Profit % ┃ Avg Duration ┃ Win Draw Loss Win% ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━┩
│ TOTAL │ │ 0 │ 0.0 │ 0.000 │ 0.0 │ 0:00 │ 0 0 0 0 │
└───────────┴─────────────┴────────┴──────────────┴─────────────────┴──────────────┴──────────────┴────────────────────────┘
No trades made. Your starting balance was 1000 USDT, and your stake was unlimited.
Backtested 2024-05-01 00:00:00 -> 2024-05-04 00:00:00 | Max open trades : 1
STRATEGY SUMMARY
┏━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Strategy ┃ Trades ┃ Avg Profit % ┃ Tot Profit USDT ┃ Tot Profit % ┃ Avg Duration ┃ Win Draw Loss Win% ┃ Drawdown ┃
┡━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QuickAdapterV3 │ 0 │ 0.00 │ 0.000 │ 0.0 │ 0:00 │ 0 0 0 0 │ 0 USDT 0.00% │
└────────────────┴────────┴──────────────┴─────────────────┴──────────────┴──────────────┴────────────────────────┴───────────────┘
I was experiencing the same error. Resolved it by deleting the previous backtesting prediction files:
rm /freqtrade/user_data/models/quickadapter-xgboost/backtesting_predictions/*
Describe your environment
python -V
)pip freeze | grep ccxt
)freqtrade -V
ordocker compose run --rm freqtrade -V
for Freqtrade running in docker)Note: All issues other than enhancement requests will be closed without further comment if the above template is deleted or not filled out.
Describe the problem:
Explain the problem you have encountered Hello, first of all, thanks for all your amazing work and support! I’ve just started working with FreqAI and I’m still trying to grasp everything.
While running backtesting, I either encounter an error, or the backtesting finishes, but no trades are made. I made small modifications to the config file to reduce the amount of data processed during training, but nothing else. I also tried backtesting without the confirm_trade_entry function because it calls Trade.get_trades(), which is not supported in backtesting. I haven’t touched the XGBRegressor file, even though the error seems to originate from there.
Steps to reproduce:
Observed Results:
I either get the error or no trades are made
Relevant code exceptions or logs
The logs
The config:
The strat:
The model: