mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-01-20 14:00:38 +00:00
hyperopt-list --export-csv command stake currency fix
Take stake currency from hyperopt result file instead of config
This commit is contained in:
@@ -374,7 +374,6 @@ class HyperoptTools:
|
||||
|
||||
trials = json_normalize(results, max_level=1)
|
||||
trials["Best"] = ""
|
||||
trials["Stake currency"] = config["stake_currency"]
|
||||
|
||||
base_metrics = [
|
||||
"Best",
|
||||
@@ -383,7 +382,7 @@ class HyperoptTools:
|
||||
"results_metrics.profit_mean",
|
||||
"results_metrics.profit_median",
|
||||
"results_metrics.profit_total",
|
||||
"Stake currency",
|
||||
"results_metrics.stake_currency",
|
||||
"results_metrics.profit_total_abs",
|
||||
"results_metrics.holding_avg",
|
||||
"results_metrics.trade_count_long",
|
||||
|
||||
@@ -1532,8 +1532,9 @@ def test_hyperopt_list(mocker, capsys, caplog, tmp_path):
|
||||
assert csv_file.is_file()
|
||||
line = csv_file.read_text()
|
||||
assert (
|
||||
'Best,1,2,-1.25%,-1.2222,-0.00125625,,-2.51,"3,930.0 m",-0.00125625,23.00%,0.43662' in line
|
||||
or "Best,1,2,-1.25%,-1.2222,-0.00125625,,-2.51,2 days 17:30:00,2,0,-0.00125625,23.00%,"
|
||||
'Best,1,2,-1.25%,-1.2222,-0.00125625,BTC,-2.51,"3,930.0 m",-0.00125625,23.00%,0.43662'
|
||||
in line
|
||||
or "Best,1,2,-1.25%,-1.2222,-0.00125625,BTC,-2.51,2 days 17:30:00,2,0,-0.00125625,23.00%,"
|
||||
"0.43662"
|
||||
in line
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user