pr review - refactoring backtesting freqai

This commit is contained in:
Wagner Costa Santos
2022-08-31 15:36:29 -03:00
parent df51da22ee
commit 7bed0450d2
3 changed files with 24 additions and 15 deletions

View File

@@ -192,7 +192,7 @@ def test_start_backtesting(mocker, freqai_conf):
freqai.start_backtesting(df, metadata, freqai.dk)
model_folders = [x for x in freqai.dd.full_path.iterdir() if x.is_dir()]
assert len(model_folders) == 5
assert len(model_folders) == 6
shutil.rmtree(Path(freqai.dk.full_path))
@@ -217,7 +217,7 @@ def test_start_backtesting_subdaily_backtest_period(mocker, freqai_conf):
metadata = {"pair": "LTC/BTC"}
freqai.start_backtesting(df, metadata, freqai.dk)
model_folders = [x for x in freqai.dd.full_path.iterdir() if x.is_dir()]
assert len(model_folders) == 8
assert len(model_folders) == 9
shutil.rmtree(Path(freqai.dk.full_path))
@@ -242,7 +242,7 @@ def test_start_backtesting_from_existing_folder(mocker, freqai_conf, caplog):
freqai.start_backtesting(df, metadata, freqai.dk)
model_folders = [x for x in freqai.dd.full_path.iterdir() if x.is_dir()]
assert len(model_folders) == 5
assert len(model_folders) == 6
# without deleting the exiting folder structure, re-run
@@ -263,7 +263,7 @@ def test_start_backtesting_from_existing_folder(mocker, freqai_conf, caplog):
freqai.start_backtesting(df, metadata, freqai.dk)
assert log_has_re(
"Found model at ",
"Found backtesting prediction ",
caplog,
)