백테스팅 SIGNAL_ONLY 수정 — 포지션 무관 전체 시그널 생성 + 기본값 적용

- BacktestingService: SIGNAL_ONLY 모드에서 inPosition 포지션 락 제거,
  entryRule/exitRule 충족 시마다 BUY/SELL 시그널 무조건 생성
- BacktestSettingsDto: positionMode 기본값 LONG_ONLY → SIGNAL_ONLY
- backendApi.ts: DEFAULT_BACKTEST_SETTINGS positionMode 기본값 변경
- BacktestSettingsModal: positionMode UI 항목(시그널 생성 방식) 최상단에 추가

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Macbook
2026-06-11 17:22:26 +09:00
parent 7b4a7e1950
commit 8d019ddd26
4 changed files with 29 additions and 50 deletions
@@ -15,6 +15,11 @@ interface FieldMeta {
}
const FIELD_META: Partial<Record<keyof BacktestSettingsDto, FieldMeta>> = {
positionMode: {
label: '시그널 생성 방식',
description:
'백테스팅 시 매수·매도 시그널을 어떻게 생성할지 결정합니다.\n• 순수 지표 기준(SIGNAL_ONLY): 포지션·자금 보유 여부와 무관하게 전략 조건이 충족되는 모든 구간에서 시그널을 생성합니다. 지표 조건이 실제로 몇 번 발생하는지 확인할 때 사용합니다.\n• 실거래 기준(LONG_ONLY): 1회 매수 후 매도할 때까지 재매수를 차단합니다. 실제 자본 운용 시뮬레이션에 사용합니다.',
},
analysisMethod: {
label: '투자분석 방식',
description:
@@ -134,6 +139,18 @@ interface SettingSection {
}
const SECTIONS: SettingSection[] = [
{
title: '🎯 시그널 생성 방식',
fields: [
{
key: 'positionMode', type: 'select',
opts: [
{ value: 'SIGNAL_ONLY', label: '순수 지표 기준 (모든 시그널 생성)' },
{ value: 'LONG_ONLY', label: '실거래 기준 (포지션 1회 제한)' },
],
},
],
},
{
title: '📊 투자분석 방식',
fields: [