diff --git a/backend/app/services/paper_trading_service.py b/backend/app/services/paper_trading_service.py index f8e3c60..fbc663a 100644 --- a/backend/app/services/paper_trading_service.py +++ b/backend/app/services/paper_trading_service.py @@ -1679,7 +1679,8 @@ class PaperTradingService: losing_trades = len([o for o in orders if o.pnl_amount < 0]) total_pnl = sum(o.pnl_amount for o in orders) - total_pnl_percent = sum(o.pnl_percent for o in orders) + # 正确的账户总收益率:(总盈亏 / 初始资金) * 100 + total_pnl_percent = (total_pnl / self.initial_balance * 100) if self.initial_balance > 0 else 0 wins = [o.pnl_amount for o in orders if o.pnl_amount > 0] losses = [abs(o.pnl_amount) for o in orders if o.pnl_amount < 0] diff --git a/frontend/trading.html b/frontend/trading.html index cf164fe..274c3f1 100644 --- a/frontend/trading.html +++ b/frontend/trading.html @@ -518,59 +518,6 @@ - -