Implement cli options for backtesting-analysis date filtering

This commit is contained in:
froggleston
2022-11-26 16:58:56 +00:00
parent 391817243c
commit 4790aaaae1
8 changed files with 107 additions and 47 deletions

View File

@@ -60,10 +60,4 @@ def start_analysis_entries_exits(args: Dict[str, Any]) -> None:
logger.info('Starting freqtrade in analysis mode')
process_entry_exit_reasons(config['exportfilename'],
config['exchange']['pair_whitelist'],
config['analysis_groups'],
config['enter_reason_list'],
config['exit_reason_list'],
config['indicator_list']
)
process_entry_exit_reasons(config)

View File

@@ -106,7 +106,8 @@ ARGS_HYPEROPT_SHOW = ["hyperopt_list_best", "hyperopt_list_profitable", "hyperop
"disableparamexport", "backtest_breakdown"]
ARGS_ANALYZE_ENTRIES_EXITS = ["exportfilename", "analysis_groups", "enter_reason_list",
"exit_reason_list", "indicator_list"]
"exit_reason_list", "indicator_list",
"analysis_date_start", "analysis_date_end"]
NO_CONF_REQURIED = ["convert-data", "convert-trade-data", "download-data", "list-timeframes",
"list-markets", "list-pairs", "list-strategies", "list-freqaimodels",

View File

@@ -658,6 +658,16 @@ AVAILABLE_CLI_OPTIONS = {
nargs='+',
default=[],
),
"analysis_date_start": Arg(
"--analysis-date-start",
help=("Start date to filter trades for analysis (inclusive). "
"e.g. '20220101'"),
),
"analysis_date_end": Arg(
"--analysis-date-end",
help=("End date to filter trades for analysis (exclusive). "
"e.g. '20220131'"),
),
"freqaimodel": Arg(
'--freqaimodel',
help='Specify a custom freqaimodels.',