stable/freqtrade/optimize
Rokas Kupstys 29fed37df3 Fix exception when few pairs with no data do not result in aborting backtest.
Exception is triggered by backtesting 20210301-20210501 range with BAKE/USDT pair (binance). Pair data starts on 2021-04-30 12:00:00 and after adjusting for startup candles pair dataframe is empty.

Solution: Since there are other pairs with enough data - skip pairs with no data and issue a warning.

Exception:
```
Traceback (most recent call last):
  File "/home/rk/src/freqtrade/freqtrade/main.py", line 37, in main
    return_code = args['func'](args)
  File "/home/rk/src/freqtrade/freqtrade/commands/optimize_commands.py", line 53, in start_backtesting
    backtesting.start()
  File "/home/rk/src/freqtrade/freqtrade/optimize/backtesting.py", line 502, in start
    min_date, max_date = self.backtest_one_strategy(strat, data, timerange)
  File "/home/rk/src/freqtrade/freqtrade/optimize/backtesting.py", line 474, in backtest_one_strategy
    results = self.backtest(
  File "/home/rk/src/freqtrade/freqtrade/optimize/backtesting.py", line 365, in backtest
    data: Dict = self._get_ohlcv_as_lists(processed)
  File "/home/rk/src/freqtrade/freqtrade/optimize/backtesting.py", line 199, in _get_ohlcv_as_lists
    pair_data.loc[:, 'buy'] = 0  # cleanup from previous run
  File "/home/rk/src/freqtrade/venv/lib/python3.9/site-packages/pandas/core/indexing.py", line 692, in __setitem__
    iloc._setitem_with_indexer(indexer, value, self.name)
  File "/home/rk/src/freqtrade/venv/lib/python3.9/site-packages/pandas/core/indexing.py", line 1587, in _setitem_with_indexer
    raise ValueError(
ValueError: cannot set a frame with no defined index and a scalar
```
2021-05-15 13:37:03 +03:00
..
space Use 3 decimals for ROI space 2021-04-15 21:38:20 +02:00
__init__.py Small adjustments for moved commands 2020-01-26 13:46:01 +01:00
backtesting.py Fix exception when few pairs with no data do not result in aborting backtest. 2021-05-15 13:37:03 +03:00
default_hyperopt_loss.py Don't use profit_percent for backtesting results anymore 2021-01-24 08:58:41 +01:00
edge_cli.py Allow edge to use dynamic pairlists 2021-03-30 20:20:24 +02:00
hyperopt_auto.py Don't use _set_value for autoOpt-Spaces 2021-04-10 09:53:48 +02:00
hyperopt_interface.py Use 3 decimals for ROI space 2021-04-15 21:38:20 +02:00
hyperopt_loss_interface.py Add config to hyperopt_loss_function documentation 2021-02-17 07:04:29 +01:00
hyperopt_loss_onlyprofit.py Don't use profit_percent for backtesting results anymore 2021-01-24 08:58:41 +01:00
hyperopt_loss_sharpe_daily.py Don't use profit_percent for backtesting results anymore 2021-01-24 08:58:41 +01:00
hyperopt_loss_sharpe.py Don't use profit_percent for backtesting results anymore 2021-01-24 08:58:41 +01:00
hyperopt_loss_sortino_daily.py Don't use profit_percent for backtesting results anymore 2021-01-24 08:58:41 +01:00
hyperopt_loss_sortino.py Don't use profit_percent for backtesting results anymore 2021-01-24 08:58:41 +01:00
hyperopt_tools.py Fix hyperopt output 2021-05-07 20:23:11 +02:00
hyperopt.py Add test for no-exchange dataprovider 2021-05-08 10:29:47 +03:00
optimize_reports.py Don't use Arrow to get min/max backtest dates 2021-05-06 19:43:14 +02:00