Commit Graph

11753 Commits

Author SHA1 Message Date
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
84222c89ee
Merge pull request #4922 from rokups/rk/fix-docs
Docs update regarding dataframe access
2021-05-12 19:58:11 +02:00
Rokas Kupstys
9bb6ba086b
Update docs/strategy-advanced.md
Co-authored-by: Matthias <xmatthias@outlook.com>
2021-05-12 17:15:38 +03:00
Rokas Kupstys
ad4c51b3c5 * Added "Dataframe access" section showcasing how to obtain dataframe and use it to get last-available and trade-open candles.
* Fix custom_sell() example to use rsi from last-available instead of trade-open candle, add a pointer to "Dataframe access" section for more info.
* Simplify "Custom stoploss using an indicator from dataframe example" greatly, add a pointer to "Dataframe access" section for more info.
2021-05-12 09:30:35 +03:00
Matthias
6d232db1d8
Merge pull request #4918 from kamontat/patch-1
remove duplicate python3-pip
2021-05-11 20:16:26 +02:00
Kamontat Chantrachirathumrong
e53bbec285
remove duplicate python3-pip 2021-05-12 00:13:13 +07:00
Matthias
bcab44560a Fix doc typo 2021-05-11 06:25:23 +02:00
Matthias
c4a2de0fd5
Merge pull request #4915 from froggleston/develop
Small update custom_sell() doc
2021-05-11 06:16:49 +02:00
Robert Davey
ac95d577a5
Merge pull request #1 from froggleston/frog-custom-sell-doc
Update strategy-advanced.md
2021-05-10 19:48:09 +01:00
Robert Davey
425d97719a
Update strategy-advanced.md
Update custom_sell() example to comment that the current trade row is at trade open as written. Change "abstain" to something clearer for non-fluent English speakers.
2021-05-10 19:42:37 +01: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
91fd367287
Merge pull request #4906 from freqtrade/dependabot/pip/develop/ccxt-1.49.73
Bump ccxt from 1.49.30 to 1.49.73
2021-05-10 15:24:02 +02:00
Matthias
3d6b3f1d6a Add Issue config.yml 2021-05-10 15:08:28 +02:00
dependabot[bot]
8e6a95e11b
Bump ccxt from 1.49.30 to 1.49.73
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.49.30 to 1.49.73.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/doc/exchanges-by-country.rst)
- [Commits](https://github.com/ccxt/ccxt/compare/1.49.30...1.49.73)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-10 10:50:05 +00:00
Matthias
7e6d469511
Merge pull request #4913 from freqtrade/dependabot/pip/develop/fastapi-0.64.0
Bump fastapi from 0.63.0 to 0.64.0
2021-05-10 08:53:34 +02:00
Matthias
9cef2983e5
Merge pull request #4907 from freqtrade/dependabot/pip/develop/mkdocs-material-7.1.4
Bump mkdocs-material from 7.1.3 to 7.1.4
2021-05-10 08:52:02 +02:00
Matthias
3eb4cda975
Merge pull request #4911 from freqtrade/dependabot/pip/develop/pymdown-extensions-8.2
Bump pymdown-extensions from 8.1.1 to 8.2
2021-05-10 08:51:47 +02:00
Matthias
0fefa696cc
Merge pull request #4908 from freqtrade/dependabot/pip/develop/sqlalchemy-1.4.14
Bump sqlalchemy from 1.4.12 to 1.4.14
2021-05-10 08:50:42 +02:00
Matthias
837c05aa62
Merge pull request #4910 from freqtrade/dependabot/pip/develop/flake8-3.9.2
Bump flake8 from 3.9.1 to 3.9.2
2021-05-10 08:49:53 +02:00
Matthias
699b21064b
Merge pull request #4912 from freqtrade/dependabot/pip/develop/pytest-mock-3.6.1
Bump pytest-mock from 3.6.0 to 3.6.1
2021-05-10 08:49:25 +02:00
Matthias
158a4ea660
Merge pull request #4909 from freqtrade/dependabot/pip/develop/pytest-6.2.4
Bump pytest from 6.2.3 to 6.2.4
2021-05-10 08:49:13 +02:00
dependabot[bot]
43c7382d24
Bump fastapi from 0.63.0 to 0.64.0
Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.63.0 to 0.64.0.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](https://github.com/tiangolo/fastapi/compare/0.63.0...0.64.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-10 05:27:36 +00:00
dependabot[bot]
93268ba16d
Bump pytest-mock from 3.6.0 to 3.6.1
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock) from 3.6.0 to 3.6.1.
- [Release notes](https://github.com/pytest-dev/pytest-mock/releases)
- [Changelog](https://github.com/pytest-dev/pytest-mock/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-mock/compare/v3.6.0...v3.6.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-10 05:27:22 +00:00
dependabot[bot]
5ecd86ed56
Bump pymdown-extensions from 8.1.1 to 8.2
Bumps [pymdown-extensions](https://github.com/facelessuser/pymdown-extensions) from 8.1.1 to 8.2.
- [Release notes](https://github.com/facelessuser/pymdown-extensions/releases)
- [Commits](https://github.com/facelessuser/pymdown-extensions/compare/8.1.1...8.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-10 05:27:11 +00:00
dependabot[bot]
6eb47b0aeb
Bump flake8 from 3.9.1 to 3.9.2
Bumps [flake8](https://gitlab.com/pycqa/flake8) from 3.9.1 to 3.9.2.
- [Release notes](https://gitlab.com/pycqa/flake8/tags)
- [Commits](https://gitlab.com/pycqa/flake8/compare/3.9.1...3.9.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-10 05:27:03 +00:00
dependabot[bot]
0a82e2b061
Bump pytest from 6.2.3 to 6.2.4
Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.3 to 6.2.4.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/6.2.3...6.2.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-10 05:26:52 +00:00
dependabot[bot]
a7cd8fc578
Bump sqlalchemy from 1.4.12 to 1.4.14
Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.4.12 to 1.4.14.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/master/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-10 05:26:36 +00:00
dependabot[bot]
a7bd051f6b
Bump mkdocs-material from 7.1.3 to 7.1.4
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 7.1.3 to 7.1.4.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/docs/changelog.md)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/7.1.3...7.1.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-10 05:26:26 +00:00
Matthias
d495ea3693 Update docs about availability of get_analyzed 2021-05-09 19:53:41 +02:00
Matthias
1c408c0404 Add small tests for backtest mode 2021-05-09 19:47:37 +02:00
Matthias
00e93dad02 Fix mistake in the docs 2021-05-09 10:04:56 +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
17b9e898d2 Update docs displaying how to get last available and trade-open candles. 2021-05-08 18:40:49 +03:00
Rokas Kupstys
8d8c782bd0 Slice dataframe in backtesting, preventing access to rows past current time. 2021-05-08 18:40:49 +03:00
Matthias
0ca0ed4117
Merge pull request #4843 from docbobo/arm64-support
Docker support for arm64
2021-05-08 17:35:19 +02:00
Matthias
70189b1992 Move dockerfile and document M1 image existance 2021-05-08 17:24:41 +02: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
4a7d7a5779
Merge pull request #4887 from freqtrade/timerange_noarrow
Don't use Arrow to get min/max backtest dates
2021-05-07 06:51:16 +02:00
Matthias
554f5f14b6 Raise exception if no data is left 2021-05-07 06:41:15 +02:00