ui: 研究Tab列表加回交易数列+新增均持仓周期列(周转率核心指标),表格横向可滚动
This commit is contained in:
@@ -852,6 +852,7 @@ def calc_summary(trades, capital):
|
||||
'avg_profit_pct': round(avg_p, 2),
|
||||
'avg_win_pct': round(avg_w, 2),
|
||||
'avg_loss_pct': round(avg_l, 2),
|
||||
'avg_hold_days': round(sum(t['hold_days'] for t in trades) / len(trades), 1),
|
||||
'sharpe_ratio': round(sharpe, 2),
|
||||
'max_drawdown_pct': round(max_dd, 2),
|
||||
'profit_factor': round(abs(avg_w/avg_l), 2) if avg_l != 0 else None,
|
||||
|
||||
Reference in New Issue
Block a user