Merge pull request #2790 from freqtrade/backtest_optimize
Fix typo in sell-reason table generation
This commit is contained in:
commit
055f3fd1fd
@ -70,7 +70,7 @@ def generate_text_table_sell_reason(data: Dict[str, Dict], results: DataFrame) -
|
|||||||
for reason, count in results['sell_reason'].value_counts().iteritems():
|
for reason, count in results['sell_reason'].value_counts().iteritems():
|
||||||
result = results.loc[results['sell_reason'] == reason]
|
result = results.loc[results['sell_reason'] == reason]
|
||||||
profit = len(result[result['profit_abs'] >= 0])
|
profit = len(result[result['profit_abs'] >= 0])
|
||||||
loss = len(result[results['profit_abs'] < 0])
|
loss = len(result[result['profit_abs'] < 0])
|
||||||
profit_mean = round(result['profit_percent'].mean() * 100.0, 2)
|
profit_mean = round(result['profit_percent'].mean() * 100.0, 2)
|
||||||
tabular_data.append([reason.value, count, profit, loss, profit_mean])
|
tabular_data.append([reason.value, count, profit, loss, profit_mean])
|
||||||
return tabulate(tabular_data, headers=headers, tablefmt="pipe")
|
return tabulate(tabular_data, headers=headers, tablefmt="pipe")
|
||||||
|
Loading…
Reference in New Issue
Block a user