Merge pull request #404 from gcarq/fix/doc

Fix markdown mistakes in backtesting doc
This commit is contained in:
Gérald LONLAS 2018-01-18 21:28:54 -08:00 committed by GitHub
commit a4b8db38ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 27 deletions

View File

@ -136,8 +136,8 @@ to understand the requirements before sending your pull-requests.
### Bot commands ### Bot commands
```bash ```bash
usage: main.py [-h] [-c PATH] [-v] [--version] [--dynamic-whitelist [INT]] usage: main.py [-h] [-v] [--version] [-c PATH] [--dry-run-db] [--datadir PATH]
[--dry-run-db] [--dynamic-whitelist [INT]]
{backtesting,hyperopt} ... {backtesting,hyperopt} ...
Simple High Frequency Trading Bot for crypto currencies Simple High Frequency Trading Bot for crypto currencies
@ -149,16 +149,17 @@ positional arguments:
optional arguments: optional arguments:
-h, --help show this help message and exit -h, --help show this help message and exit
-c PATH, --config PATH
specify configuration file (default: config.json)
-v, --verbose be verbose -v, --verbose be verbose
--version show program's version number and exit --version show program's version number and exit
--dynamic-whitelist [INT] -c PATH, --config PATH
dynamically generate and update whitelist based on 24h specify configuration file (default: config.json)
BaseVolume (Default 20 currencies)
--dry-run-db Force dry run to use a local DB --dry-run-db Force dry run to use a local DB
"tradesv3.dry_run.sqlite" instead of memory DB. Work "tradesv3.dry_run.sqlite" instead of memory DB. Work
only if dry_run is enabled. only if dry_run is enabled.
--datadir PATH path to backtest data (default freqdata/tests/testdata
--dynamic-whitelist [INT]
dynamically generate and update whitelist based on 24h
BaseVolume (Default 20 currencies)
``` ```
More details on: More details on:
- [How to run the bot](https://github.com/gcarq/freqtrade/blob/develop/docs/bot-usage.md#bot-commands) - [How to run the bot](https://github.com/gcarq/freqtrade/blob/develop/docs/bot-usage.md#bot-commands)

View File

@ -52,37 +52,43 @@ python3 ./freqtrade/main.py backtesting --datadir freqtrade/tests/testdata-20180
``` ```
**Running backtest with smaller testset** **Running backtest with smaller testset**
Use the --timerange argument to change how much of the testset Use the `--timerange` argument to change how much of the testset
you want to use. The last N ticks/timeframes will be used. you want to use. The last N ticks/timeframes will be used.
Example:
Example:
```bash ```bash
python3 ./freqtrade/main.py backtesting --timerange=-200 python3 ./freqtrade/main.py backtesting --timerange=-200
``` ```
***Advanced use of timerange*** ***Advanced use of timerange***
Doing --timerange=-200 will get the last 200 timeframes Doing `--timerange=-200` will get the last 200 timeframes
from your inputdata. You can also specify specific dates, from your inputdata. You can also specify specific dates,
or a range span indexed by start and stop. or a range span indexed by start and stop.
The full timerange specification: The full timerange specification:
Not implemented yet! --timerange=-20180131 - Use last 123 tickframes of data: `--timerange=-123`
Not implemented yet! --timerange=20180101- - Use first 123 tickframes of data: `--timerange=123-`
Not implemented yet! --timerange=20180101-20181231 - Use tickframes from line 123 through 456: `--timerange=123-456`
Last 123 tickframes of data: --timerange=-123
First 123 tickframes of data: --timerange=123-
Tickframes from line 123 through 456: --timerange=123-456
**Update testdata directory Incoming feature, not implemented yet:
- `--timerange=-20180131`
- `--timerange=20180101-`
- `--timerange=20180101-20181231`
**Update testdata directory**
To update your testdata directory, or download into another testdata directory: To update your testdata directory, or download into another testdata directory:
```bash ```bash
mkdir freqtrade/tests/testdata-20180113 mkdir -p user_data/data/testdata-20180113
cp freqtrade/tests/testdata/pairs.json freqtrade/tests/testdata-20180113 cp freqtrade/tests/testdata/pairs.json user_data/data-20180113
cd freqtrade/tests/testdata-20180113 cd user_data/data-20180113
```
Possibly edit pairs.json file to include/exclude pairs Possibly edit pairs.json file to include/exclude pairs
python download_backtest_data.py -p pairs.json ```bash
python freqtrade/tests/testdata/download_backtest_data.py -p pairs.json
``` ```
The script will read your pairs.json file, and download ticker data The script will read your pairs.json file, and download ticker data