import React, { useEffect, useRef } from 'react';
import { Chart, registerables } from 'chart.js';
Chart.register(...registerables);
const App = () => {
const macroChartRef = useRef(null);
const fundChartRef = useRef(null);
const supplyChartRef = useRef(null);
const radarChartRef = useRef(null);
// Label Wrapping Logic (16 chars)
const wrapLabel = (label) => {
if (typeof label !== 'string') return label;
if (label.length <= 16) return label;
const words = label.split(' ');
const lines = [];
let currentLine = words[0];
for (let i = 1; i < words.length; i++) {
if ((currentLine + ' ' + words[i]).length <= 16) {
currentLine += ' ' + words[i];
} else {
lines.push(currentLine);
currentLine = words[i];
}
}
lines.push(currentLine);
return lines;
};
const tooltipConfig = {
plugins: {
tooltip: {
callbacks: {
title: (tooltipItems) => {
const item = tooltipItems[0];
const label = item.chart.data.labels[item.dataIndex];
return Array.isArray(label) ? label.join(' ') : label;
}
}
}
}
};
useEffect(() => {
// Macro Chart
const macroCtx = macroChartRef.current.getContext('2d');
const macroChart = new Chart(macroCtx, {
type: 'bar',
data: {
labels: [
wrapLabel('미국 10년물 금리 (4.25%)'),
wrapLabel('원/달러 환율 (1,481원)'),
wrapLabel('RSI 지수 (55.0)')
],
datasets: [{
label: '지표 영향력 (표준화 지수)',
data: [65, 95, 55],
backgroundColor: ['#3B82F6', '#2563EB', '#60A5FA'],
borderRadius: 8,
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
...tooltipConfig,
scales: { y: { beginAtZero: true, max: 100 } }
}
});
// Fundamental Trend Chart
const fundCtx = fundChartRef.current.getContext('2d');
const fundChart = new Chart(fundCtx, {
type: 'line',
data: {
labels: ['2023', '2024', '2025', '2026(E)'],
datasets: [
{
label: '영업이익률 (OPM %)',
data: [33, 35, 33.5, 38.5],
borderColor: '#1D4ED8',
backgroundColor: '#1D4ED8',
tension: 0.3,
fill: false,
},
{
label: '소모품 매출 비중 (%)',
data: [45, 55, 68, 75],
borderColor: '#F97316',
backgroundColor: '#F97316',
borderDash: [5, 5],
tension: 0.3,
fill: false,
}
]
},
options: {
responsive: true,
maintainAspectRatio: false,
...tooltipConfig,
}
});
// Supply/Demand Chart
const supplyCtx = supplyChartRef.current.getContext('2d');
const supplyChart = new Chart(supplyCtx, {
type: 'doughnut',
data: {
labels: [
wrapLabel('외국인 (재매집)'),
wrapLabel('기관 (비중확대)'),
wrapLabel('개인 (관망/매도)')
],
datasets: [{
data: [45, 35, 20],
backgroundColor: ['#1E40AF', '#3B82F6', '#DBEAFE'],
hoverOffset: 10
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
...tooltipConfig,
}
});
// Quant Radar Chart
const radarCtx = radarChartRef.current.getContext('2d');
const radarChart = new Chart(radarCtx, {
type: 'radar',
data: {
labels: [
wrapLabel('수익성 (Profitability)'),
wrapLabel('안정성 (Stability)'),
wrapLabel('성장성 (Growth)'),
wrapLabel('저평가 매력 (Valuation)')
],
datasets: [{
label: '원텍 (Wontech)',
data: [95, 98, 85, 92],
fill: true,
backgroundColor: 'rgba(37, 99, 235, 0.2)',
borderColor: '#2563EB',
pointBackgroundColor: '#2563EB',
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
...tooltipConfig,
scales: { r: { beginAtZero: true, max: 100, ticks: { display: false } } }
}
});
return () => {
macroChart.destroy();
fundChart.destroy();
supplyChart.destroy();
radarChart.destroy();
};
}, []);
return (
{/* Header */}
{/* Grid Layout */}
{/* Section 1 */}
1. 데이터 기반 진단
현재 원/달러 환율(1,481원)은 수출 비중이 70%인 원텍에게 거대한 수익 보너스를 제공합니다. 주가는 52주 고점 대비 조정을 거치고 RSI 55 수준의 '다시 달릴 준비를 마친' 안정한 구간에 있습니다.
💡 한 줄 요약: "금리가 안정되고 환율이 높아 돈 벌기 최적의 환경, 주가는 '착한 가격' 상태입니다."
{/* Section 2 */}
2. 핵심 펀더멘털 분석
단순 장비 판매를 넘어 소모품(팁) 매출 비중이 75%를 향해 가고 있습니다. 장비가 깔릴수록 '연금'처럼 돈이 들어오는 고수익 구조로 진화했습니다. OPM(영업이익률) 38.5% 전망은 업계 최고 수준입니다.
💡 한 줄 요약: "기계 팔고 끝이 아니라, 계속 갈아 끼우는 소모품으로 꾸준히 돈 버는 '알짜배기' 모델입니다."
{/* Section 3 & 4 */}
{/* Supply Tracking */}
3. 스마트 머니 수급
비쌀 때 떠났던 외국인과 기관이 다시 돌아오고 있습니다. 회사는 자사주 소각과 매입을 통해 "지금 주가가 너무 싸다"는 강력한 시그널을 보내고 있습니다.
{/* Bear Case */}
4. 최악의 시나리오
●
특허 분쟁: 글로벌 1위 기업과의 법적 분쟁 발생 시 수출 전선에 치명적 타격 가능성
●
경쟁 심화: 국내 시장 포화로 인한 마케팅비 과다 지출 및 영업이익률 훼손 위험
Risk Control Base
영업이익률이 2분기 연속 25% 미만으로 하락 시 비중 축소 권고
{/* Section 5: Quant Grades */}
5. 초보자용 퀀트 스코어 (Quant Grade)
데이터가 말해주는 원텍의 진짜 실력
A
수익성 (Profitability)
"1만 원 팔면 사장님 주머니에 4,000원이 남는 엄청난 장사 수완을 가진 맛집입니다."
A
안정성 (Stability)
"은행 빚은 거의 없고 금고에 현금이 너무 많아 남의 집이 경매 나오면 싸게 사올 부잣집입니다."
B
성장성 (Growth)
"강남 직영점을 넘어 미국과 태국에 체인점을 내러 나가는 전국구 유망주입니다."
A
저평가 매력 (Valuation)
"줄 서서 사던 1,300만 원짜리 명품 가방이 유행이 지났다고 아울렛에서 800만 원 세일 중인 셈입니다."
종합 평가: "압도적 수익성과 현금을 바탕으로 성장의 결실을 기다리는 우량주"
{/* Final Conclusion */}
);
};
export default App;