fix(journal): 시간손절을 손절과 분리(time_stop) + 청산 설명 임계값을 실효 설정값으로

- _parse_exit_type: '시간 손절'/'시간손절'/time_stop → time_stop (이전엔 '손절' 글자로 stop_loss 로 분류돼
  -0.1% 시간손절이 '-6% 손절 도달'로 표시되고 손절 비율 인사이트가 부풀었다)
- 일지 청산 설명의 하드코딩(-6%, RSI 65+, 1.5×ATR)을 settings 실효값으로(§4)
- 분석 화면 청산 유형 한글 표시명

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-07 11:06:08 +09:00
parent 309a778a63
commit 5c4803b339
3 changed files with 61 additions and 4 deletions

View File

@@ -6,6 +6,19 @@ import {
} from 'lucide-react'
import api from '../lib/api'
/** 청산 유형 표시명 (백엔드 trade_analyzer._parse_exit_type 키) */
const EXIT_TYPE_LABELS: Record<string, string> = {
stop_loss: '손절',
time_stop: '시간손절 (조기 정리)',
trailing_stop: '트레일링 스탑',
take_profit: '익절',
eod_forced: '장 마감 청산',
rsi_exit: 'RSI 청산',
manual: '수동 청산',
unknown: '미상',
}
// ── 타입 정의 ─────────────────────────────────────────────────────────────────
interface PerformanceSummary {
@@ -287,7 +300,7 @@ export default function Analysis() {
{Object.entries(perf.by_exit_type).map(([etype, stats]) => (
<div key={etype} className="flex items-center justify-between py-2 border-b border-gray-700/50 last:border-0">
<div>
<span className="text-sm text-gray-200 font-medium">{etype}</span>
<span className="text-sm text-gray-200 font-medium">{EXIT_TYPE_LABELS[etype] ?? etype}</span>
<span className="ml-2 text-xs text-gray-500">{stats.count}건</span>
</div>
<span className={`text-sm ${stats.avg_return >= 0 ? 'text-green-400' : 'text-red-400'}`}>