diff --git a/docs/freqai-running.md b/docs/freqai-running.md index 693fe087c..f97ed0ab4 100644 --- a/docs/freqai-running.md +++ b/docs/freqai-running.md @@ -88,7 +88,7 @@ The `--timerange` parameter must not be informed, as it will be automatically ca Each model has an identifier derived from the training end date. If you have only 1 model trained, FreqAI will backtest from the training end date until the current date. If you have more than 1 model, each model will perform the backtesting according to the training end date until the training end date of the next model and so on. For the last model, the period of the previous model will be used for the execution. !!! Note - Currently, there is no checking for expired models, even if the expired_hours parameter is set. + Currently, there is no checking for expired models, even if the `expired_hours` parameter is set. ### Downloading data to cover the full backtest period diff --git a/freqtrade/freqai/freqai_interface.py b/freqtrade/freqai/freqai_interface.py index c0be5a69e..ae123f852 100644 --- a/freqtrade/freqai/freqai_interface.py +++ b/freqtrade/freqai/freqai_interface.py @@ -804,7 +804,7 @@ class IFreqaiModel(ABC): train_it: int, total_trains: int): """ Log the backtesting progress so user knows how many pairs have been trained and - hoe many more pairs/trains remain. + how many more pairs/trains remain. :param tr_train: the training timerange :param train_it: the train iteration for the current pair (the sliding window progress) :param pair: the current pair diff --git a/freqtrade/freqai/utils.py b/freqtrade/freqai/utils.py index 5a04497d0..e854bcf0b 100644 --- a/freqtrade/freqai/utils.py +++ b/freqtrade/freqai/utils.py @@ -220,7 +220,7 @@ def record_params(config: Dict[str, Any], full_path: Path) -> None: ) -def get_timerange_backtest_live_models(config: Config): +def get_timerange_backtest_live_models(config: Config) -> str: """ Returns a formated timerange for backtest live/ready models :param config: Configuration dictionary diff --git a/freqtrade/optimize/backtesting.py b/freqtrade/optimize/backtesting.py index 91d60847e..3436eac44 100644 --- a/freqtrade/optimize/backtesting.py +++ b/freqtrade/optimize/backtesting.py @@ -135,8 +135,8 @@ class Backtesting: self.precision_mode = self.exchange.precisionMode if self.config.get('freqai_backtest_live_models', False): - from freqtrade.freqai import utils - self.config['timerange'] = utils.get_timerange_backtest_live_models(self.config) + from freqtrade.freqai.utils import get_timerange_backtest_live_models + self.config['timerange'] = get_timerange_backtest_live_models(self.config) self.timerange = TimeRange.parse_timerange( None if self.config.get('timerange') is None else str(self.config.get('timerange')))