Commit Graph

6121 Commits

Author SHA1 Message Date
Matthias 4f968b4a6f
Merge pull request #4926 from rokups/rk/misc-fixes
Two fixes
2021-05-15 15:11:07 +02:00
Rokas Kupstys 2d5f465f1b Fix protections being loaded multiple times for first strategy when backtesting. 2021-05-15 13:37:03 +03:00
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
Matthias e1447f955c /locks should always respond, even if there's no locks
closes #4942
2021-05-15 10:50:00 +02:00
Matthias 0ace35bf3d Fix unreferenced error 2021-05-15 08:14:50 +02:00
Matthias a6c644161d
Merge pull request #4930 from freqtrade/hyperopt_memory
Hyperopt memory problems
2021-05-15 07:12:57 +02:00
Matthias 5e73195b30 Use linux lineseperator at all times 2021-05-15 07:01:32 +02:00
Matthias 4bc018a456 Change rate back to "open" for custom_sell
closes #4920
2021-05-14 07:18:10 +02:00
Matthias 09756e3007 Subplots should always be included in responses 2021-05-14 06:36:50 +02:00
Matthias ecee42f561 Read pickle file in mmap mode 2021-05-13 20:13:04 +02:00
Matthias 1055862bc0 Extract data-load + dump from hyperopt
(Reduces memory-usage as the dataframes go out of scope)
2021-05-12 21:15:01 +02:00
Matthias 24a1d5a96f Change default hyperopt-name to be shorter 2021-05-12 19:06:13 +02:00
Matthias 3cbe40875d read hyperopt results from pickle or json 2021-05-12 06:06:30 +02:00
Matthias 06bf1aa274 Store epochs as json per line 2021-05-12 05:58:25 +02:00
Matthias 7398ea88e0 Change optimize_reports to convert dates to string earlier 2021-05-11 20:37:49 +02:00
Matthias b81f24d9c6
Merge pull request #4851 from rokups/rk/backtest-dataprovider
Data provider support in backtesting
2021-05-10 19:11:05 +02:00
Matthias 92186d89a2 Add some changes to strategytemplate 2021-05-09 09:56:36 +02:00
Matthias 2157923aee have edge send multiple messages if necessary
closes #4519
2021-05-08 19:45:34 +02:00
Rokas Kupstys 8d8c782bd0 Slice dataframe in backtesting, preventing access to rows past current time. 2021-05-08 18:40:49 +03:00
Rokas Kupstys f1eb653545 Fix strategy protections not being loaded in backtesting. 2021-05-08 10:29:47 +03:00
Rokas Kupstys 1b01ad6f85 Make exchange parameter optional and do not use it as parameter in backtesting. 2021-05-08 10:29:47 +03:00
Matthias 4b6cd69c81 Add test for no-exchange dataprovider 2021-05-08 10:29:47 +03:00
Rokas Kupstys d344194b36 Fix dataprovider in hyperopt. 2021-05-08 10:29:47 +03:00
Rokas Kupstys 9b4f6b41a2 Use correct datetime. 2021-05-08 10:29:47 +03:00
Rokas Kupstys 6fb4d83ab3 Fix dataprovider in hyperopt. 2021-05-08 10:29:47 +03:00
Rokas Kupstys 6af4de8fe8 Remove dataframe parameter from docs. 2021-05-08 10:29:47 +03:00
Rokas Kupstys cdfa6adbe5 Store pair datafrmes in dataprovider for backtesting. 2021-05-08 10:29:47 +03:00
Rokas Kupstys dc6e702fec Pass current_time to confirm_trade_entry/confirm_trade_exit. 2021-05-08 10:29:47 +03:00
Rokas Kupstys d34da3f981 Revert "Add dataframe parameter to custom_stoploss() and custom_sell() methods."
This reverts commit 595b8735f8.

# Conflicts:
#	freqtrade/optimize/backtesting.py
#	freqtrade/strategy/interface.py
2021-05-08 10:29:47 +03:00
Matthias 513be11fd9 Fix hyperopt output
closes #4892
2021-05-07 20:23:11 +02:00
Matthias 554f5f14b6 Raise exception if no data is left 2021-05-07 06:41:15 +02:00
Matthias 4f529fe424 Don't use Arrow to get min/max backtest dates 2021-05-06 19:43:14 +02:00
Matthias 32577cc0cd
Merge pull request #4836 from bzed/telegram-locks
Telegram rpc: split too long /locks messages
2021-05-05 20:15:13 +02:00
Matthias 431cb5313f Support informative pairs in edge positioning 2021-05-05 19:58:45 +02:00
Matthias da47f4e1a4 Fix Kraken balance update error
closes #4873
2021-05-05 06:47:26 +02:00
Matthias da574e4e69 Small style fixes 2021-05-03 06:30:41 +02:00
Matthias fc110ea418 Support csv export for new and old versions 2021-05-02 20:41:45 +02:00
Matthias 303895b33e Add support for filters to new hyperopt-results 2021-05-02 20:07:22 +02:00
Matthias 287b43e999 Output strategy results including non-optimized parameters 2021-05-02 11:30:53 +02:00
Matthias d069ad43d8 Small reformatting in hyperopt 2021-05-02 11:01:26 +02:00
Matthias 8ee0b0d8e8 Store not optimized parameters (if applicable) 2021-05-02 10:46:04 +02:00
Matthias 9049d6b779 Reformat hyper to cache parameters 2021-05-02 10:45:21 +02:00
Matthias 46f0f66039 Keep dimensions stored in hyperopt class
There is no point in regenerating them and it will cause some
overhead as all space classes will be recreated for every epoch.
2021-05-02 09:48:37 +02:00
Matthias ced5cc7ce2 Don't recalculate min/max date - they won't change between epochs 2021-05-02 09:46:27 +02:00
Matthias ecdfb6e5ed Fix output of % for new format 2021-05-02 09:46:27 +02:00
Matthias 881cba336a Show backtesting result in hyperopt-show 2021-05-02 09:46:27 +02:00
Matthias 420e75af65 Extract show_backtest_result for one strategy 2021-05-02 09:46:27 +02:00
Matthias 97478abb9d Move format explanation string to HyperoptTools 2021-05-02 09:46:27 +02:00
Matthias f2e182002d Simplify calling backtesting by returning the proper result 2021-05-02 09:46:27 +02:00
Matthias e2e1d34828 Extract stake_currency param from hyperopt-explanationstring 2021-05-02 09:46:27 +02:00