Simplify configuration setup

This commit is contained in:
Matthias 2023-06-15 20:23:47 +02:00
parent ac36ba6592
commit ad74e65673
3 changed files with 8 additions and 10 deletions

View File

@ -300,10 +300,8 @@ class Configuration:
self._args_to_config(config, argname='hyperoptexportfilename',
logstring='Using hyperopt file: {}')
if self.args.get('lookahead_analysis_exportfilename'):
if self.args["lookahead_analysis_exportfilename"] is not None:
self._args_to_config(config, argname='lookahead_analysis_exportfilename',
logstring='saving lookahead analysis results into {} ...')
self._args_to_config(config, argname='lookahead_analysis_exportfilename',
logstring='Saving lookahead analysis results into {} ...')
self._args_to_config(config, argname='epochs',
logstring='Parameter --epochs detected ... '

View File

@ -15,6 +15,7 @@ logger = logging.getLogger(__name__)
class LookaheadAnalysisSubFunctions:
@staticmethod
def text_table_lookahead_analysis_instances(
config: Dict[str, Any],

View File

@ -114,12 +114,11 @@ def test_lookahead_helper_text_table_lookahead_analysis_instances(lookahead_conf
analysis.false_entry_signals = 4
analysis.false_exit_signals = 3
strategy_obj = \
{
'name': "strategy_test_v3_with_lookahead_bias",
'location': PurePosixPath(lookahead_conf['strategy_path'],
f"{lookahead_conf['strategy']}.py")
}
strategy_obj = {
'name': "strategy_test_v3_with_lookahead_bias",
'location': PurePosixPath(lookahead_conf['strategy_path'],
f"{lookahead_conf['strategy']}.py")
}
instance = LookaheadAnalysis(lookahead_conf, strategy_obj)
instance.current_analysis = analysis