Explicitly convert starting-balance to float

This commit is contained in:
Matthias 2021-02-28 09:56:29 +01:00
parent d9d5617432
commit 9cb37409fd

View File

@ -277,7 +277,7 @@ def generate_backtest_stats(btdata: Dict[str, DataFrame],
'sell_reason_summary': sell_reason_stats,
'left_open_trades': left_open_results,
'total_trades': len(results),
'total_volume': results['stake_amount'].sum(),
'total_volume': float(results['stake_amount'].sum()),
'avg_stake_amount': results['stake_amount'].mean(),
'profit_mean': results['profit_ratio'].mean() if len(results) > 0 else 0,
'profit_total': results['profit_abs'].sum() / starting_balance,