chore: remove long-deprecated and pointless metric

This commit is contained in:
Matthias
2025-07-16 20:08:17 +02:00
parent 5296a3be23
commit 8f4dfbf55d
2 changed files with 0 additions and 4 deletions

View File

@@ -83,7 +83,6 @@ def _generate_result_line(
"""
Generate one result dict, with "first_column" as key.
"""
profit_sum = result["profit_ratio"].sum()
# (end-capital - starting capital) / starting capital
profit_total = result["profit_abs"].sum() / starting_balance
backtest_days = (max_date - min_date).days or 1
@@ -108,8 +107,6 @@ def _generate_result_line(
"profit_mean_pct": (
round(result["profit_ratio"].mean() * 100.0, 2) if len(result) > 0 else 0.0
),
"profit_sum": profit_sum,
"profit_sum_pct": round(profit_sum * 100.0, 2),
"profit_total_abs": result["profit_abs"].sum(),
"profit_total": profit_total,
"profit_total_pct": round(profit_total * 100.0, 2),

View File

@@ -452,7 +452,6 @@ def test_generate_pair_metrics():
assert (
pytest.approx(pair_results[-1]["profit_mean_pct"]) == pair_results[-1]["profit_mean"] * 100
)
assert pytest.approx(pair_results[-1]["profit_sum_pct"]) == pair_results[-1]["profit_sum"] * 100
def test_generate_daily_stats(testdatadir):