투자관리 화면 수정

This commit is contained in:
Macbook
2026-05-31 17:34:26 +09:00
parent d6c2f3e451
commit 4f2d98d4ba
20 changed files with 696 additions and 56 deletions
+13 -3
View File
@@ -276,14 +276,24 @@ trading_mode:
| 5 | `live_strategy_check = true` **OR** 해당 `market``is_live_check=true` 설정 존재 |
| 6 | `trading_mode`가 PAPER 또는 BOTH (`TradingExecutionService` 단계) |
**포지션 모드 `LONG_ONLY` (실제 계좌 보유 기준):**
**포지션 모드 `LONG_ONLY` (분할 매매 미설정 시):**
| 시그널 | 스킵 조건 |
|--------|-----------|
| BUY | 해당 종목 **이미 보유** (`quantity > 0`) |
| SELL | 해당 종목 **미보유** |
**매수 금액 계산:**
**분할 매매 (종목별 1~3차, `gc_paper_symbol_allocation`):**
- 투자관리 **설정** 탭 → 선택 종목: `buy_stage1~3_krw`, `sell_stage1~3_krw` (KRW)
- 매수·매도 단계 금액 중 **하나라도 > 0** 이면 분할 모드 (`PaperTradeStageService.usesStagedTrading`)
- **BUY 시그널마다** 다음 매수 차수 금액만 체결 (`buy_stage_done` 0→1→2→3)
- **SELL 시그널마다** 다음 매도 차수 금액만큼 수량 체결 (`sell_stage_done` 증가)
- **전량 매도** 후 `buy_stage_done`·`sell_stage_done` **0으로 초기화**
- 분할 모드에서는 보유 중에도 2·3차 **추가 매수** 가능 (LONG_ONLY 일괄 매수 스킵 해제)
- 단계 금액이 모두 0이면 기존 방식(가용현금 % 일괄 매수·전량 매도)
**매수 금액 (분할 미설정 시):**
```text
budget = (cash_balance - reserved_cash) × paper_auto_trade_budget_pct / 100
@@ -296,7 +306,7 @@ qty = budget / (execPrice × (1 + fee%))
| 7 | `budget < paper_min_order_krw` |
| 8 | `qty × execPrice < min_order` |
**매도:** 보유 수량 전량(가용 수량, 미체결 매도 예약 제외)
**매도 (분할 미설정):** 보유 수량 전량(가용 수량, 미체결 매도 예약 제외)
**체결:** `executeTrade(..., source="STRATEGY", autoTrade=true)`