mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 00:23:07 +00:00
Add relevant metrics to backtest breakdowns (fix 3)
This commit is contained in:
@@ -140,10 +140,10 @@ def text_table_periodic_breakdown(
|
||||
output = [
|
||||
[
|
||||
d["date"],
|
||||
d["trades"],
|
||||
d.get('trades', 'N/A'),
|
||||
fmt_coin(d["profit_abs"], stake_currency, False),
|
||||
d["profit_factor"],
|
||||
generate_wins_draws_losses(d["wins"], d["draws"], d["losses"]),
|
||||
d.get('profit_factor', 'N/A'),
|
||||
generate_wins_draws_losses(d["wins"], d["draws"], d['loses']),
|
||||
]
|
||||
for d in days_breakdown_stats
|
||||
]
|
||||
|
||||
@@ -243,7 +243,7 @@ def generate_periodic_breakdown_stats(
|
||||
"profit_abs": profit_abs,
|
||||
"wins": wins,
|
||||
"draws": draws,
|
||||
"losses": losses,
|
||||
"loses": losses,
|
||||
"trades": trades,
|
||||
"profit_factor": round(profit_factor, 2),
|
||||
}
|
||||
|
||||
@@ -587,7 +587,7 @@ def test_generate_periodic_breakdown_stats(testdatadir):
|
||||
day = res[0]
|
||||
assert "date" in day
|
||||
assert "draws" in day
|
||||
assert "losses" in day
|
||||
assert "loses" in day
|
||||
assert "wins" in day
|
||||
assert "profit_abs" in day
|
||||
|
||||
|
||||
Reference in New Issue
Block a user