stable/freqtrade
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
..
commands Support csv export for new and old versions 2021-05-02 20:41:45 +02:00
configuration Don't use Arrow to get min/max backtest dates 2021-05-06 19:43:14 +02:00
data Add some changes to strategytemplate 2021-05-09 09:56:36 +02:00
edge have edge send multiple messages if necessary 2021-05-08 19:45:34 +02:00
exchange Fix Kraken balance update error 2021-05-05 06:47:26 +02:00
mixins Improve wording, fix bug 2020-12-07 15:48:06 +01:00
optimize Fix exception when few pairs with no data do not result in aborting backtest. 2021-05-15 13:37:03 +03:00
persistence Move static Trade functions to right class 2021-04-28 06:37:40 +02:00
plot Use correct variable in pairlist_manager 2021-04-25 11:01:04 +02:00
plugins Reduce log-frequency of AgeFilter 2021-04-30 19:42:41 +02:00
resolvers NameErrors should not stop loading a different strategy 2021-04-23 19:36:26 +02:00
rpc have edge send multiple messages if necessary 2021-05-08 19:45:34 +02:00
strategy Remove dataframe parameter from docs. 2021-05-08 10:29:47 +03:00
templates Add some changes to strategytemplate 2021-05-09 09:56:36 +02:00
vendor Apply isort to freqtrade codebase 2020-09-28 19:40:46 +02:00
__init__.py fix typo in comment 2020-04-14 08:05:46 +02:00
__main__.py Remove support for 3.6 2020-12-14 19:18:54 +01:00
constants.py Small adjustments 2021-04-22 19:41:01 +02:00
exceptions.py Introduce insufficientFunds Exception 2020-08-14 09:56:48 +02:00
freqtradebot.py Use correct datetime. 2021-05-08 10:29:47 +03:00
loggers.py Fix double logging 2020-11-25 14:31:34 +01:00
main.py Remove support for 3.6 2020-12-14 19:18:54 +01:00
misc.py Add chunks function. 2021-04-29 22:21:04 +02:00
state.py reload_conf & reload_config now both accepted, code is more consistent now 2020-06-10 19:28:02 +02:00
wallets.py Fix wallet calls 2021-04-26 14:12:52 +02:00
worker.py Apply isort to freqtrade codebase 2020-09-28 19:40:46 +02:00