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 = json_normalize(results, max_level=1)
|
||||||
trials["Best"] = ""
|
trials["Best"] = ""
|
||||||
trials["Stake currency"] = config["stake_currency"]
|
|
||||||
|
|
||||||
base_metrics = [
|
base_metrics = [
|
||||||
"Best",
|
"Best",
|
||||||
@@ -383,7 +382,7 @@ class HyperoptTools:
|
|||||||
"results_metrics.profit_mean",
|
"results_metrics.profit_mean",
|
||||||
"results_metrics.profit_median",
|
"results_metrics.profit_median",
|
||||||
"results_metrics.profit_total",
|
"results_metrics.profit_total",
|
||||||
"Stake currency",
|
"results_metrics.stake_currency",
|
||||||
"results_metrics.profit_total_abs",
|
"results_metrics.profit_total_abs",
|
||||||
"results_metrics.holding_avg",
|
"results_metrics.holding_avg",
|
||||||
"results_metrics.trade_count_long",
|
"results_metrics.trade_count_long",
|
||||||
|
|||||||
@@ -1532,8 +1532,9 @@ def test_hyperopt_list(mocker, capsys, caplog, tmp_path):
|
|||||||
assert csv_file.is_file()
|
assert csv_file.is_file()
|
||||||
line = csv_file.read_text()
|
line = csv_file.read_text()
|
||||||
assert (
|
assert (
|
||||||
'Best,1,2,-1.25%,-1.2222,-0.00125625,,-2.51,"3,930.0 m",-0.00125625,23.00%,0.43662' in line
|
'Best,1,2,-1.25%,-1.2222,-0.00125625,BTC,-2.51,"3,930.0 m",-0.00125625,23.00%,0.43662'
|
||||||
or "Best,1,2,-1.25%,-1.2222,-0.00125625,,-2.51,2 days 17:30:00,2,0,-0.00125625,23.00%,"
|
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"
|
"0.43662"
|
||||||
in line
|
in line
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user