import React from 'react'; import Loading from '../../../components/Loading'; import { PieChart, Pie, Cell, BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip as ChartTooltip, Legend, ResponsiveContainer, } from 'recharts'; import { formatNumber, formatPercent, toNumeric, CHART_COLORS, profitColorClass, getVixLabel, getFgLabel, } from '../stockUtils'; const ReportTab = ({ pf, report, ai, marketCtx }) => ( <> {pf.portfolioLoading && (
{pf.portfolioError}
} {/* 자산 배분 + 수익률 차트 */} {pf.portfolioHoldings.length > 0 && (포트폴리오 분석
증권사별 자산 배분
종목별 수익률 (%)
리스크 관리
증권사·종목 집중도를 확인합니다. 단일 비중 40% 초과 시 주의.
증권사별 집중도
{report.brokerConcentration.length === 0 ? (평가금액 데이터 없음
) : ( <> {report.brokerConcentration.some((b) => b.ratio > 40) && (상위 5 종목 집중도
{report.stockConcentration.length === 0 ? (현재가 데이터 없음
) : ( <> {report.stockConcentration.some((s) => s.ratio > 40) && (수익률 랭킹
헤더 클릭으로 정렬 · 비중은 총 평가금액 대비
| report.handleReportSort(key)}> {label}{' '} {report.reportSortField === key ? report.reportSortDir === 'asc' ? '↑' : '↓' : '↕'} | ))}비중 | ||||
|---|---|---|---|---|---|
|
{item.name ?? item.ticker ?? 'N/A'} {item.ticker ?? ''} |
{item.broker ?? '-'} |
{item.profit_rate != null ? formatPercent(item.profit_rate) : '-'}
{rateN != null && (
= 0 ? 'is-up' : 'is-down'}`}
style={{ width: `${report.maxAbsRate > 0 ? Math.abs(rateN) / report.maxAbsRate * 100 : 0}%` }}
/>
)}
|
{item.profit_amount != null ? formatNumber(item.profit_amount) : '-'} | {evalAmt != null ? formatNumber(evalAmt) : '-'} | {weight != null ? `${weight.toFixed(1)}%` : '-'} |
등록된 종목이 없습니다. 쟁승토리 계좌 탭에서 종목을 먼저 등록하세요.
AI 투자 코치
포트폴리오를 AI가 분석하여 성취도 등급과 내일을 위한 투자 조언을 드립니다.
{ai.aiError}
} {ai.aiResult && !ai.aiLoading && ({ai.aiResult.summary}
{ai.aiResult.evaluation}
{ai.aiResult.advice?.length > 0 && ({a.title}
{a.body}