
genichinandClaude Opus 4.8
e4be4d60c2
feat(slot): dcy-021 포지션 사이징 — 보유 슬롯 증액·부분 매도 (BAT-031)
자산 영구 슬롯(dcy-020)의 수량 가변 전제 위에 보유 포지션 수량 조정 구현.
명령형 계약(전략이 cash+quantity 로 qty+price 계산), core 는 실행 substrate,
수량 정본 = 브로커 잔고 재동기화로 "주문 수량 vs 보유 수량" 충돌 해소(별도 필드 없음).
- state.py: holding→pending_buy 전이 추가(증액) → 13 transitions (REQ-057)
- service.py: PENDING_SELL 진입 qty=caller as-is(None=전량 sentinel, 값=부분 주문) (REQ-062)
- intents.py: 증액 admission(holding 슬롯 매수=increase, M 캡 미적용), SellIntent.qty 부분 매도 (REQ-061)
- execution.py: _balance_map; 매도 dispatch=브로커잔고(전량)/min(주문,잔고)(부분);
매수 체결 avg_price 가중평균+브로커 정본 resync; 매도 체결 잔고>0→holding/0→inactive;
증액 롤백 holding 복귀 (REQ-066/062)
- messaging_handlers.py: sell payload qty 파싱(부분 매도)
- baseline 4문서(data-model/runtime-flows/interface-contract/project-structure) 정합 (REQ-067)
검증: 단위 378 / 통합(PG+RabbitMQ) 422 passed, ruff clean. run-the-app 사이징 e2e:
매수 10@1000 → 증액 +5@1200 → 15@1066.67(가중평균) → 부분 매도 6 → 9@1066.67(cost basis) → 전량→inactive.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 18:53:37 +09:00
..
2026-06-04 13:46:08 +09:00
2026-06-10 15:16:15 +09:00
2026-06-07 14:00:20 +09:00
2026-06-10 18:53:37 +09:00
2026-06-10 15:16:15 +09:00
2026-06-10 18:53:37 +09:00
2026-06-10 15:16:15 +09:00
2026-06-10 15:16:15 +09:00
2026-06-10 15:16:15 +09:00
2026-06-07 14:00:20 +09:00
2026-06-08 21:50:56 +09:00
2026-06-08 21:50:56 +09:00
2026-06-08 16:12:17 +09:00
2026-06-10 15:16:15 +09:00
2026-06-10 15:16:15 +09:00
2026-06-10 15:16:15 +09:00
2026-06-06 09:33:00 +09:00
2026-06-06 09:33:00 +09:00
2026-06-10 15:16:15 +09:00
2026-06-10 15:16:15 +09:00
2026-06-10 15:16:15 +09:00
2026-06-10 15:16:15 +09:00
2026-06-10 15:16:15 +09:00
2026-06-06 09:33:00 +09:00
2026-06-10 15:16:15 +09:00
2026-06-10 15:16:15 +09:00
2026-06-07 08:32:30 +09:00