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
+1 -3
View File
@@ -300,10 +300,8 @@ class Configuration:
self._args_to_config(config, argname='hyperoptexportfilename', self._args_to_config(config, argname='hyperoptexportfilename',
logstring='Using hyperopt file: {}') 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', self._args_to_config(config, argname='lookahead_analysis_exportfilename',
logstring='saving lookahead analysis results into {} ...') logstring='Saving lookahead analysis results into {} ...')
self._args_to_config(config, argname='epochs', self._args_to_config(config, argname='epochs',
logstring='Parameter --epochs detected ... ' logstring='Parameter --epochs detected ... '
@@ -15,6 +15,7 @@ logger = logging.getLogger(__name__)
class LookaheadAnalysisSubFunctions: class LookaheadAnalysisSubFunctions:
@staticmethod @staticmethod
def text_table_lookahead_analysis_instances( def text_table_lookahead_analysis_instances(
config: Dict[str, Any], config: Dict[str, Any],
+1 -2
View File
@@ -114,8 +114,7 @@ def test_lookahead_helper_text_table_lookahead_analysis_instances(lookahead_conf
analysis.false_entry_signals = 4 analysis.false_entry_signals = 4
analysis.false_exit_signals = 3 analysis.false_exit_signals = 3
strategy_obj = \ strategy_obj = {
{
'name': "strategy_test_v3_with_lookahead_bias", 'name': "strategy_test_v3_with_lookahead_bias",
'location': PurePosixPath(lookahead_conf['strategy_path'], 'location': PurePosixPath(lookahead_conf['strategy_path'],
f"{lookahead_conf['strategy']}.py") f"{lookahead_conf['strategy']}.py")