Some small restructuring

This commit is contained in:
Matthias 2019-09-24 07:05:30 +02:00
parent cc9fc41318
commit 6aa1ec2a4c
2 changed files with 16 additions and 9 deletions

View File

@ -3,7 +3,7 @@
This page explains how to validate your strategy performance by using Backtesting. This page explains how to validate your strategy performance by using Backtesting.
Backtesting requires historic data to be available. Backtesting requires historic data to be available.
To learn how to get data for the pairs and exchange you're interrested in, head over to the [Data Downloading](data-download.md) section of the documentation. To learn how to get data for the pairs and exchange you're interested in, head over to the [Data Downloading](data-download.md) section of the documentation.
## Test your strategy with Backtesting ## Test your strategy with Backtesting
@ -15,7 +15,7 @@ Backtesting will use the crypto-currencies (pairs) from your config file
and load ticker data from `user_data/data/<exchange>` by default. and load ticker data from `user_data/data/<exchange>` by default.
If no data is available for the exchange / pair / ticker interval combination, backtesting will If no data is available for the exchange / pair / ticker interval combination, backtesting will
ask you to download them first using `freqtrade download-data`. ask you to download them first using `freqtrade download-data`.
For details on downloading, please refer to the [Downloading data](data-download.md) section in the documentation. For details on downloading, please refer to the [Data Downloading](data-download.md) section in the documentation.
The result of backtesting will confirm if your bot has better odds of making a profit than a loss. The result of backtesting will confirm if your bot has better odds of making a profit than a loss.
@ -84,8 +84,8 @@ freqtrade backtesting --timerange=20190501-
#### Advanced use of timerange #### Advanced use of timerange
Doing `--timerange=20190101-` will all available data starting with January 1st, 2019 from your inputdata. Using `--timerange=20190101-` will use all available data starting with January 1st, 2019 from your inputdata.
You can also specify specific dates, or a range span indexed by start and stop. You can also specify particular dates or a range span indexed by start and stop.
The full timerange specification: The full timerange specification:

View File

@ -4,21 +4,26 @@
To download data (candles / OHLCV) needed for backtesting and hyperoptimization use the `freqtrade download-data` command. To download data (candles / OHLCV) needed for backtesting and hyperoptimization use the `freqtrade download-data` command.
If no additional parameter is specified, freqtrade will download data for `"1m"` and `"5m"` timeframes. If no additional parameter is specified, freqtrade will download data for `"1m"` and `"5m"` timeframes for the last 30 days.
Exchange and pairs will come from `config.json` (if specified using `-c/--config`). Otherwise `--exchange` becomes mandatory. Exchange and pairs will come from `config.json` (if specified using `-c/--config`).
Otherwise `--exchange` becomes mandatory.
Alternatively, a `pairs.json` file can be used. ### Pairs file
In alternative to the whitelist from `config.json`, a `pairs.json` file can be used.
If you are using Binance for example: If you are using Binance for example:
- create a directory `user_data/data/binance` and copy `pairs.json` in that directory. - create a directory `user_data/data/binance` and copy or create the `pairs.json` file in that directory.
- update the `pairs.json` to contain the currency pairs you are interested in. - update the `pairs.json` file to contain the currency pairs you are interested in.
```bash ```bash
mkdir -p user_data/data/binance mkdir -p user_data/data/binance
cp freqtrade/tests/testdata/pairs.json user_data/data/binance cp freqtrade/tests/testdata/pairs.json user_data/data/binance
``` ```
### start download
Then run: Then run:
```bash ```bash
@ -27,6 +32,8 @@ freqtrade download-data --exchange binance
This will download ticker data for all the currency pairs you defined in `pairs.json`. This will download ticker data for all the currency pairs you defined in `pairs.json`.
### Other Notes
- To use a different directory than the exchange specific default, use `--datadir user_data/data/some_directory`. - To use a different directory than the exchange specific default, use `--datadir user_data/data/some_directory`.
- To change the exchange used to download the tickers, please use a different configuration file (you'll probably need to adjust ratelimits etc.) - To change the exchange used to download the tickers, please use a different configuration file (you'll probably need to adjust ratelimits etc.)
- To use `pairs.json` from some other directory, use `--pairs-file some_other_dir/pairs.json`. - To use `pairs.json` from some other directory, use `--pairs-file some_other_dir/pairs.json`.