chore: switch to using exportdirectory

This commit is contained in:
Matthias
2025-08-16 14:04:23 +02:00
parent 6ccd98d795
commit c63d0e167c
3 changed files with 8 additions and 8 deletions

View File

@@ -72,7 +72,7 @@ def start_backtesting_show(args: dict[str, Any]) -> None:
from freqtrade.data.btanalysis import load_backtest_stats
from freqtrade.optimize.optimize_reports import show_backtest_results, show_sorted_pairlist
results = load_backtest_stats(config["exportfilename"])
results = load_backtest_stats(config["exportdirectory"])
show_backtest_results(config, results)
show_sorted_pairlist(config, results)

View File

@@ -330,7 +330,7 @@ def process_entry_exit_reasons(config: Config):
do_rejected = config.get("analysis_rejected", False)
to_csv = config.get("analysis_to_csv", False)
csv_path = Path(
config.get("analysis_csv_path", config["exportfilename"]), # type: ignore[arg-type]
config.get("analysis_csv_path", config["exportdirectory"]), # type: ignore[arg-type]
)
if entry_only is True and exit_only is True:
@@ -344,21 +344,21 @@ def process_entry_exit_reasons(config: Config):
None if config.get("timerange") is None else str(config.get("timerange"))
)
try:
backtest_stats = load_backtest_stats(config["exportfilename"])
backtest_stats = load_backtest_stats(config["exportdirectory"])
except ValueError as e:
raise ConfigurationError(e) from e
for strategy_name, results in backtest_stats["strategy"].items():
trades = load_backtest_data(config["exportfilename"], strategy_name)
trades = load_backtest_data(config["exportdirectory"], strategy_name)
if trades is not None and not trades.empty:
signal_candles = load_backtest_analysis_data(config["exportfilename"], "signals")
exit_signals = load_backtest_analysis_data(config["exportfilename"], "exited")
signal_candles = load_backtest_analysis_data(config["exportdirectory"], "signals")
exit_signals = load_backtest_analysis_data(config["exportdirectory"], "exited")
rej_df = None
if do_rejected:
rejected_signals_dict = load_backtest_analysis_data(
config["exportfilename"], "rejected"
config["exportdirectory"], "rejected"
)
rej_df = prepare_results(
rejected_signals_dict,

View File

@@ -64,7 +64,7 @@ def store_backtest_results(
:param market_change_data: Dataframe containing market change data
:param analysis_results: Dictionary containing analysis results
"""
recordfilename: Path = config["exportfilename"]
recordfilename: Path = config["exportdirectory"]
zip_filename = _generate_filename(recordfilename, dtappendix, ".zip")
base_filename = _generate_filename(recordfilename, dtappendix, "")
json_filename = _generate_filename(recordfilename, dtappendix, ".json")