Add --fee to documentation

This commit is contained in:
Matthias 2019-10-05 15:33:44 +02:00
parent 0664a8c0e6
commit 82d4051a39
2 changed files with 55 additions and 33 deletions

View File

@ -72,6 +72,17 @@ The exported trades can be used for [further analysis](#further-backtest-result-
freqtrade backtesting --export trades --export-filename=backtest_samplestrategy.json freqtrade backtesting --export trades --export-filename=backtest_samplestrategy.json
``` ```
#### Supplying custom fee value
Sometimes your account has certain fee rabates, which are not visible to ccxt.
To account for this in backtesting, you can use `--fee 0.001` to supply this value to backtesting.
This fee must be a percentage, and will be applied twice (once for trade entry, and once for trade exit).
```bash
freqtrade backtesting --fee 0.001
```
#### Running backtest with smaller testset by using timerange #### Running backtest with smaller testset by using timerange
Use the `--timerange` argument to change how much of the testset you want to use. Use the `--timerange` argument to change how much of the testset you want to use.

View File

@ -168,22 +168,25 @@ Backtesting also uses the config specified via `-c/--config`.
``` ```
usage: freqtrade backtesting [-h] [-i TICKER_INTERVAL] [--timerange TIMERANGE] usage: freqtrade backtesting [-h] [-i TICKER_INTERVAL] [--timerange TIMERANGE]
[--max_open_trades MAX_OPEN_TRADES] [--max_open_trades INT]
[--stake_amount STAKE_AMOUNT] [-r] [--eps] [--dmmp] [--stake_amount STAKE_AMOUNT] [--fee FLOAT]
[-l] [--eps] [--dmmp]
[--strategy-list STRATEGY_LIST [STRATEGY_LIST ...]] [--strategy-list STRATEGY_LIST [STRATEGY_LIST ...]]
[--export EXPORT] [--export-filename PATH] [--export EXPORT] [--export-filename PATH]
optional arguments: optional arguments:
-h, --help show this help message and exit -h, --help show this help message and exit
-i TICKER_INTERVAL, --ticker-interval TICKER_INTERVAL -i TICKER_INTERVAL, --ticker-interval TICKER_INTERVAL
Specify ticker interval (1m, 5m, 30m, 1h, 1d). Specify ticker interval (`1m`, `5m`, `30m`, `1h`,
`1d`).
--timerange TIMERANGE --timerange TIMERANGE
Specify what timerange of data to use. Specify what timerange of data to use.
--max_open_trades MAX_OPEN_TRADES --max_open_trades INT
Specify max_open_trades to use. Specify max_open_trades to use.
--stake_amount STAKE_AMOUNT --stake_amount STAKE_AMOUNT
Specify stake_amount. Specify stake_amount.
--fee FLOAT Specify fee %. Should be in %, will be applied twice
(on trade entry and exit).
--eps, --enable-position-stacking --eps, --enable-position-stacking
Allow buying the same pair multiple times (position Allow buying the same pair multiple times (position
stacking). stacking).
@ -193,19 +196,21 @@ optional arguments:
number). number).
--strategy-list STRATEGY_LIST [STRATEGY_LIST ...] --strategy-list STRATEGY_LIST [STRATEGY_LIST ...]
Provide a space-separated list of strategies to Provide a space-separated list of strategies to
backtest Please note that ticker-interval needs to be backtest. Please note that ticker-interval needs to be
set either in config or via command line. When using set either in config or via command line. When using
this together with --export trades, the strategy-name this together with `--export trades`, the strategy-
is injected into the filename (so backtest-data.json name is injected into the filename (so `backtest-
becomes backtest-data-DefaultStrategy.json data.json` becomes `backtest-data-
--export EXPORT Export backtest results, argument are: trades. Example DefaultStrategy.json`
--export=trades --export EXPORT Export backtest results, argument are: trades.
Example: `--export=trades`
--export-filename PATH --export-filename PATH
Save backtest results to this filename requires Save backtest results to the file with this filename
--export to be set as well Example --export- (default: `user_data/backtest_results/backtest-
filename=user_data/backtest_results/backtest_today.json result.json`). Requires `--export` to be set as well.
(default: user_data/backtest_results/backtest- Example: `--export-filename=user_data/backtest_results
result.json) /backtest_today.json`
``` ```
### Getting historic data for backtesting ### Getting historic data for backtesting
@ -222,13 +227,13 @@ to find optimal parameter values for your stategy.
``` ```
usage: freqtrade hyperopt [-h] [-i TICKER_INTERVAL] [--timerange TIMERANGE] usage: freqtrade hyperopt [-h] [-i TICKER_INTERVAL] [--timerange TIMERANGE]
[--max_open_trades INT] [--max_open_trades INT]
[--stake_amount STAKE_AMOUNT] [-r] [--stake_amount STAKE_AMOUNT] [--fee FLOAT]
[--customhyperopt NAME] [--hyperopt-path PATH] [--customhyperopt NAME] [--hyperopt-path PATH]
[--eps] [-e INT] [--eps] [-e INT]
[-s {all,buy,sell,roi,stoploss} [{all,buy,sell,roi,stoploss} ...]] [-s {all,buy,sell,roi,stoploss} [{all,buy,sell,roi,stoploss} ...]]
[--dmmp] [--print-all] [--no-color] [-j JOBS] [--dmmp] [--print-all] [--no-color] [--print-json]
[--random-state INT] [--min-trades INT] [--continue] [-j JOBS] [--random-state INT] [--min-trades INT]
[--hyperopt-loss NAME] [--continue] [--hyperopt-loss NAME]
optional arguments: optional arguments:
-h, --help show this help message and exit -h, --help show this help message and exit
@ -241,6 +246,8 @@ optional arguments:
Specify max_open_trades to use. Specify max_open_trades to use.
--stake_amount STAKE_AMOUNT --stake_amount STAKE_AMOUNT
Specify stake_amount. Specify stake_amount.
--fee FLOAT Specify fee %. Should be in %, will be applied twice
(on trade entry and exit).
--customhyperopt NAME --customhyperopt NAME
Specify hyperopt class name (default: Specify hyperopt class name (default:
`DefaultHyperOpts`). `DefaultHyperOpts`).
@ -260,6 +267,7 @@ optional arguments:
--print-all Print all results, not only the best ones. --print-all Print all results, not only the best ones.
--no-color Disable colorization of hyperopt results. May be --no-color Disable colorization of hyperopt results. May be
useful if you are redirecting output to a file. useful if you are redirecting output to a file.
--print-json Print best result detailization in JSON format.
-j JOBS, --job-workers JOBS -j JOBS, --job-workers JOBS
The number of concurrently running jobs for The number of concurrently running jobs for
hyperoptimization (hyperopt worker processes). If -1 hyperoptimization (hyperopt worker processes). If -1
@ -278,8 +286,8 @@ optional arguments:
generate completely different results, since the generate completely different results, since the
target for optimization is different. Built-in target for optimization is different. Built-in
Hyperopt-loss-functions are: DefaultHyperOptLoss, Hyperopt-loss-functions are: DefaultHyperOptLoss,
OnlyProfitHyperOptLoss, SharpeHyperOptLoss. OnlyProfitHyperOptLoss, SharpeHyperOptLoss.(default:
(default: `DefaultHyperOptLoss`). `DefaultHyperOptLoss`).
``` ```
## Edge commands ## Edge commands
@ -288,25 +296,28 @@ To know your trade expectancy and winrate against historical data, you can use E
``` ```
usage: freqtrade edge [-h] [-i TICKER_INTERVAL] [--timerange TIMERANGE] usage: freqtrade edge [-h] [-i TICKER_INTERVAL] [--timerange TIMERANGE]
[--max_open_trades MAX_OPEN_TRADES] [--max_open_trades INT] [--stake_amount STAKE_AMOUNT]
[--stake_amount STAKE_AMOUNT] [-r] [--fee FLOAT] [--stoplosses STOPLOSS_RANGE]
[--stoplosses STOPLOSS_RANGE]
optional arguments: optional arguments:
-h, --help show this help message and exit -h, --help show this help message and exit
-i TICKER_INTERVAL, --ticker-interval TICKER_INTERVAL -i TICKER_INTERVAL, --ticker-interval TICKER_INTERVAL
Specify ticker interval (1m, 5m, 30m, 1h, 1d). Specify ticker interval (`1m`, `5m`, `30m`, `1h`,
`1d`).
--timerange TIMERANGE --timerange TIMERANGE
Specify what timerange of data to use. Specify what timerange of data to use.
--max_open_trades MAX_OPEN_TRADES --max_open_trades INT
Specify max_open_trades to use. Specify max_open_trades to use.
--stake_amount STAKE_AMOUNT --stake_amount STAKE_AMOUNT
Specify stake_amount. Specify stake_amount.
--fee FLOAT Specify fee %. Should be in %, will be applied twice
(on trade entry and exit).
--stoplosses STOPLOSS_RANGE --stoplosses STOPLOSS_RANGE
Defines a range of stoploss against which edge will Defines a range of stoploss values against which edge
assess the strategy the format is "min,max,step" will assess the strategy. The format is "min,max,step"
(without any space).example: (without any space). Example:
--stoplosses=-0.01,-0.1,-0.001 `--stoplosses=-0.01,-0.1,-0.001`
``` ```
To understand edge and how to read the results, please read the [edge documentation](edge.md). To understand edge and how to read the results, please read the [edge documentation](edge.md).