mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33: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 = [
|
output = [
|
||||||
[
|
[
|
||||||
d["date"],
|
d["date"],
|
||||||
d["trades"],
|
d.get('trades', 'N/A'),
|
||||||
fmt_coin(d["profit_abs"], stake_currency, False),
|
fmt_coin(d["profit_abs"], stake_currency, False),
|
||||||
d["profit_factor"],
|
d.get('profit_factor', 'N/A'),
|
||||||
generate_wins_draws_losses(d["wins"], d["draws"], d["losses"]),
|
generate_wins_draws_losses(d["wins"], d["draws"], d['loses']),
|
||||||
]
|
]
|
||||||
for d in days_breakdown_stats
|
for d in days_breakdown_stats
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ def generate_periodic_breakdown_stats(
|
|||||||
"profit_abs": profit_abs,
|
"profit_abs": profit_abs,
|
||||||
"wins": wins,
|
"wins": wins,
|
||||||
"draws": draws,
|
"draws": draws,
|
||||||
"losses": losses,
|
"loses": losses,
|
||||||
"trades": trades,
|
"trades": trades,
|
||||||
"profit_factor": round(profit_factor, 2),
|
"profit_factor": round(profit_factor, 2),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -587,7 +587,7 @@ def test_generate_periodic_breakdown_stats(testdatadir):
|
|||||||
day = res[0]
|
day = res[0]
|
||||||
assert "date" in day
|
assert "date" in day
|
||||||
assert "draws" in day
|
assert "draws" in day
|
||||||
assert "losses" in day
|
assert "loses" in day
|
||||||
assert "wins" in day
|
assert "wins" in day
|
||||||
assert "profit_abs" in day
|
assert "profit_abs" in day
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user