Files
KArtSell.Aegis/docs/v12_2/03_ALGORITHM_SELL_REENTRY_CONTRACT.md
T
kjh2064 dcd1322d41
ci / backend (push) Failing after 12s
ci / frontend (push) Failing after 19s
ci / static (push) Failing after 45s
Initial commit: Add project files
2026-08-02 05:15:36 +09:00

2.5 KiB
Raw Blame History

매도·재진입 알고리즘 계약 v12.2

1. 고정 우선순위

HARD_IMPAIRMENT → PORTFOLIO_SURVIVAL → DYNAMIC_PROFIT_FLOOR → CONCENTRATION/LIQUIDITY → OPPORTUNITY_COST → REENTRY_OPTION

상위 정책은 하위 점수로 상쇄되지 않는다. 정책 체인은 첫 Applied 결과에서 종료하지만, 그 전의 NotApplicable/Blocked 경로를 정책 추적으로 보존한다.

2. 단위 계약

필드 의미 단위
CurrentSecurityPortfolioWeight 해당 종목 전체의 현재 절대비중 0~1
CurrentLotPortfolioWeight 대상 PositionLot이 차지하는 절대비중 0~1
SellRatioOfLot 대상 Lot 수량 중 매도 비율 0~1
StrategicCoreFloorWeight 종목 전체 기준 보존할 절대비중 0~1
TargetSecurityPortfolioWeightAfter 정책 실행 후 종목 전체 예상비중 0~1

계산식:

TargetSecurityPortfolioWeightAfter = CurrentSecurityPortfolioWeight - CurrentLotPortfolioWeight × SellRatioOfLot

Core 보존형 정책의 최대 Lot 매도비율:

max(0, CurrentSecurityPortfolioWeight - StrategicCoreFloorWeight) / CurrentLotPortfolioWeight, 상한 1.

Hard impairment와 portfolio survival은 필요 시 Core 하회가 가능하다. Profit floor·집중·기회비용 정책은 Core를 보존한다.

3. 정책 추적

각 평가 결과는 다음을 저장한다.

  • PolicyId, Priority
  • Disposition: NotApplicable / Blocked / Applied
  • ReasonCode
  • RequestedSellRatioOfLot
  • AppliedSellRatioOfLot
  • StrategicCoreClampApplied

정책 추적은 내부 감사·재현성용이다. 고객 공개 화면은 내부 원시 점수 대신 승인된 설명, 반대증거, 불확실성, 비용, 다음 검토일을 제공한다.

4. 재진입

  • Hard impairment 자동 재진입 금지
  • 최소 10거래일 대기
  • 상승 SMA50 회복 + 직전 20거래일 고점 돌파
  • 자산유형별 추가 확인
  • 단계 간 최소 10거래일
  • 126거래일 만료
  • 단계마다 unique key (watch, stage)
  • 실행 시 새 CycleId와 새 Lot
  • 직전 Cycle의 보호선·원가·고점 상태 재사용 금지

5. 검증

Golden/Boundary/Property 테스트는 다음을 고정한다.

  • 우선순위 비상쇄
  • Lot/종목 비중 계산
  • Core clamp 단조성
  • survival의 Core 하회
  • 미래 published_at 거부
  • 동일 입력·버전 동일 결과
  • 비용 2배 스트레스
  • C#↔Python 정책 벡터 교차비교

현재 임계값과 성과는 연구후보이며 Shadow/OOS Gate 전 생산 활성화하지 않는다.