From afe46a55f7acc196b7c4b4fa644a53f6a14e4ddf Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 19 Jan 2022 20:19:17 +0100 Subject: [PATCH] Add documentation for --cache backtest option --- docs/backtesting.md | 9 ++++++--- freqtrade/commands/cli_options.py | 3 +-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/backtesting.md b/docs/backtesting.md index eae6ac4a9..7420c1dec 100644 --- a/docs/backtesting.md +++ b/docs/backtesting.md @@ -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 diff --git a/freqtrade/commands/cli_options.py b/freqtrade/commands/cli_options.py index 87266fd68..fc5542c52 100644 --- a/freqtrade/commands/cli_options.py +++ b/freqtrade/commands/cli_options.py @@ -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, ),