diff --git a/frontend/src/pages/Dashboard.tsx b/frontend/src/pages/Dashboard.tsx
index b13d0f6..f665098 100644
--- a/frontend/src/pages/Dashboard.tsx
+++ b/frontend/src/pages/Dashboard.tsx
@@ -267,6 +267,26 @@ const Dashboard = () => {
setLiveQuote(null)
}, [selectedStock])
+ // 실시간 평가손익/총자산 — livePrices 기반 매 틱마다 재계산
+ const liveSummary = useMemo(() => {
+ if (!portfolioSummary || !portfolio) return portfolioSummary
+ const liveValue = portfolio.reduce((sum, s) => {
+ const price = livePrices[s.stock_code] ?? Number(s.current_price || 0)
+ return sum + price * Number(s.quantity || 0)
+ }, 0)
+ const totalInvestment = portfolio.reduce((sum, s) =>
+ sum + Number(s.average_price || 0) * Number(s.quantity || 0), 0)
+ const liveProfitLoss = liveValue - totalInvestment
+ const liveProfitLossRate = totalInvestment > 0 ? (liveProfitLoss / totalInvestment) * 100 : 0
+ return {
+ ...portfolioSummary,
+ total_value: liveValue,
+ total_profit_loss: liveProfitLoss,
+ total_profit_loss_rate: liveProfitLossRate,
+ total_assets: (portfolioSummary.available_cash || 0) + liveValue,
+ }
+ }, [portfolioSummary, portfolio, livePrices])
+
// 실시간 차트: 마지막 캔들에 live price 반영 (close/high/low)
// livePrice가 selectedStock에 대해서만 변경될 때 재계산
const livePrice = livePrices[selectedStock]
@@ -488,7 +508,7 @@ const Dashboard = () => {