Explicitly convert starting-balance to float
This commit is contained in:
parent
d9d5617432
commit
9cb37409fd
@ -277,7 +277,7 @@ def generate_backtest_stats(btdata: Dict[str, DataFrame],
|
|||||||
'sell_reason_summary': sell_reason_stats,
|
'sell_reason_summary': sell_reason_stats,
|
||||||
'left_open_trades': left_open_results,
|
'left_open_trades': left_open_results,
|
||||||
'total_trades': len(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(),
|
'avg_stake_amount': results['stake_amount'].mean(),
|
||||||
'profit_mean': results['profit_ratio'].mean() if len(results) > 0 else 0,
|
'profit_mean': results['profit_ratio'].mean() if len(results) > 0 else 0,
|
||||||
'profit_total': results['profit_abs'].sum() / starting_balance,
|
'profit_total': results['profit_abs'].sum() / starting_balance,
|
||||||
|
Loading…
Reference in New Issue
Block a user