ui: 研究Tab列表加回交易数列+新增均持仓周期列(周转率核心指标),表格横向可滚动

This commit is contained in:
hmo
2026-07-29 02:08:44 +08:00
parent 1a5951c13c
commit 224f4e58c2
2 changed files with 7 additions and 2 deletions
+1
View File
@@ -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,