@@ -26,7 +26,7 @@ def test_freqai_backtest_start_backtest_list(freqai_conf, mocker, testdatadir, c
|
||||
'--config', 'config.json',
|
||||
'--datadir', str(testdatadir),
|
||||
'--strategy-path', str(Path(__file__).parents[1] / 'strategy/strats'),
|
||||
'--timeframe', '1h',
|
||||
'--timeframe', '1m',
|
||||
'--strategy-list', CURRENT_TEST_STRATEGY
|
||||
]
|
||||
args = get_args(args)
|
||||
|
@@ -1028,6 +1028,31 @@ def test__validate_pricing_rules(default_conf, caplog) -> None:
|
||||
validate_config_consistency(conf)
|
||||
|
||||
|
||||
def test__validate_freqai_include_timeframes(default_conf, caplog) -> None:
|
||||
conf = deepcopy(default_conf)
|
||||
conf.update({
|
||||
"freqai": {
|
||||
"enabled": True,
|
||||
"feature_parameters": {
|
||||
"include_timeframes": ["1m", "5m"],
|
||||
"include_corr_pairlist": [],
|
||||
},
|
||||
"data_split_parameters": {},
|
||||
"model_training_parameters": {}
|
||||
}
|
||||
})
|
||||
with pytest.raises(OperationalException, match=r"Main timeframe of .*"):
|
||||
validate_config_consistency(conf)
|
||||
# Validation pass
|
||||
conf.update({'timeframe': '1m'})
|
||||
validate_config_consistency(conf)
|
||||
conf.update({'analyze_per_epoch': True})
|
||||
|
||||
with pytest.raises(OperationalException,
|
||||
match=r"Using analyze-per-epoch .* not supported with a FreqAI strategy."):
|
||||
validate_config_consistency(conf)
|
||||
|
||||
|
||||
def test__validate_consumers(default_conf, caplog) -> None:
|
||||
conf = deepcopy(default_conf)
|
||||
conf.update({
|
||||
|
Reference in New Issue
Block a user