Add warning about cache problems

This commit is contained in:
Matthias 2022-01-16 18:01:05 +01:00
parent 062d00e8f2
commit 2bcfc0c90c
2 changed files with 5 additions and 0 deletions

View File

@ -462,6 +462,10 @@ The output will show a table containing the realized absolute Profit (in stake c
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 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.
!!! 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.
### Further backtest-result analysis ### Further backtest-result analysis
To further analyze your backtest results, you can [export the trades](#exporting-trades-to-file). To further analyze your backtest results, you can [export the trades](#exporting-trades-to-file).

View File

@ -753,6 +753,7 @@ class Backtesting:
} }
# Load previous result that will be updated incrementally. # Load previous result that will be updated incrementally.
# This can be circumvented in certain instances in combination with downloading more data
if self.timerange.stopts == 0 or datetime.fromtimestamp( if self.timerange.stopts == 0 or datetime.fromtimestamp(
self.timerange.stopts, tz=timezone.utc) > datetime.now(tz=timezone.utc): self.timerange.stopts, tz=timezone.utc) > datetime.now(tz=timezone.utc):
self.config['no_backtest_cache'] = True self.config['no_backtest_cache'] = True