Add documentation for --cache backtest option

This commit is contained in:
Matthias 2022-01-19 20:19:17 +01:00
parent d319204dea
commit afe46a55f7
2 changed files with 7 additions and 5 deletions

View File

@ -22,6 +22,7 @@ usage: freqtrade backtesting [-h] [-v] [--logfile FILE] [-V] [-c PATH]
[--strategy-list STRATEGY_LIST [STRATEGY_LIST ...]]
[--export {none,trades}] [--export-filename PATH]
[--breakdown {day,week,month} [{day,week,month} ...]]
[--cache {none,day,week,month}]
optional arguments:
-h, --help show this help message and exit
@ -76,7 +77,9 @@ optional arguments:
_today.json`
--breakdown {day,week,month} [{day,week,month} ...]
Show backtesting breakdown per [day, week, month].
--no-cache Do not reuse cached backtest results.
--cache {none,day,week,month}
Load a cached backtest result no older than specified
age (default: day).
Common arguments:
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
@ -460,11 +463,11 @@ The output will show a table containing the realized absolute Profit (in stake c
### Backtest result caching
To save time, by default backtest will reuse a cached result when backtested strategy and config match that of previous backtest. To force a new backtest despite existing result for identical run specify `--no-cache` parameter.
To save time, by default backtest will reuse a cached result from within the last day when the backtested strategy and config match that of a previous backtest. To force a new backtest despite existing result for an identical run specify `--cache none` parameter.
!!! Warning
Caching is automatically disabled for open-ended timeranges (`--timerange 20210101-`), as freqtrade cannot ensure reliably that the underlying data didn't change. It can also use cached results where it shouldn't if the original backtest had missing data at the end, which was fixed by downloading more data.
In this instance, please use `--no-cache` once to get a fresh backtest.
In this instance, please use `--cache none` once to force a fresh backtest.
### Further backtest-result analysis

View File

@ -207,8 +207,7 @@ AVAILABLE_CLI_OPTIONS = {
),
"backtest_cache": Arg(
'--cache',
help='Load a cached backtest result no older than specified age.',
metavar='AGE',
help='Load a cached backtest result no older than specified age (default: %(default)s).',
default=constants.BACKTEST_CACHE_DEFAULT,
choices=constants.BACKTEST_CACHE_AGE,
),