mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-02-06 06:10:24 +00:00
Calculate and save all metrics per pair (fix 2)
This commit is contained in:
@@ -88,11 +88,13 @@ def _generate_result_line(
|
||||
winning_profit = result.loc[result["profit_abs"] > 0, "profit_abs"].sum()
|
||||
losing_profit = result.loc[result["profit_abs"] < 0, "profit_abs"].sum()
|
||||
profit_factor = winning_profit / abs(losing_profit) if losing_profit else 0.0
|
||||
|
||||
try:
|
||||
drawdown = calculate_max_drawdown(
|
||||
result, value_col="profit_abs", starting_balance=starting_balance
|
||||
)
|
||||
except:
|
||||
|
||||
except ValueError:
|
||||
drawdown = None
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user