Files
QuantEngineByItz/spec/55_execution_simulator_contract.yaml
kjh2064 366a6da825 WBS-8.7: spec-코드 동기화 100% 완료
모든 spec 파일에 has_code_implementation 메타데이터 추가:
- 140개 spec 파일 중 100% 태깅 완료
- 코드 참조 자동 판정 (formula_registry, decision_flow, routing 등)
- tag_spec_code_implementation.py: 자동화 도구 추가

진행률: 66.4% → 100%

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-23 00:22:28 +09:00

74 lines
2.6 KiB
YAML

acceptance_criteria:
- invalid_order_count: 0
- cash_floor_after_orders_krw_gte_required: true
authority: spec/55_execution_simulator_contract.yaml
code_path: tools/validate_execution_simulator_v1.py
contract_id: H004_EXECUTION_SIMULATOR
created_at: '2026-06-10T23:29:00+09:00'
hard_gates:
- condition: invalid_order_count == 0
gate_id: NO_INVALID_ORDERS
on_fail: BLOCK_RELEASE
- condition: cash_floor_after_orders_krw >= minimum_reserve_krw
gate_id: CASH_FLOOR_MAINTAINED
on_fail: BLOCK_RELEASE
- condition: all order prices are tick-normalized
gate_id: TICK_NORMALIZED
on_fail: BLOCK_RELEASE
harness_file: tools/validate_execution_simulator_v1.py
has_code_implementation: true
inputs:
- field: final_decision_packet_active.json
required: true
source: Temp/final_decision_packet_active.json
- field: account_snapshot
required: true
source: spec/15_account_snapshot_contract.yaml
lifecycle_state: active
meta:
has_code_implementation: false
output_fields:
- description: 틱·수량·현금 조건 위반 주문 수
name: invalid_order_count
type: int
- description: 모든 매수 주문 실행 후 예상 잔여 현금
name: cash_floor_after_orders_krw
type: float
- description: 슬리피지 반영 후 최종 주문 목록
name: slippage_adjusted_orders
type: list[dict]
- enum:
- PASS
- FAIL
name: gate
type: str
owner: risk_manager
purpose: '틱 정규화, 최소주문수량, 예수금, D+2 현금, 슬리피지 적용 후 실제 주문 가능성을 검증한다. 유효하지 않은 주문이 단 1건이라도
있으면 릴리즈를 차단한다.
'
retirement_condition: '실제 증권사 API 연동 시뮬레이터로 교체될 때까지 유효하다.
'
schema_version: execution_simulator_contract.v1
simulation_parameters:
cash_floor:
d_plus_2_recognition: true
minimum_reserve_krw: 10000000
note: D+2 결제 예정 현금은 즉시 가용 현금으로 인정하되, 매수 후 잔여 현금이 최소 준비금 미만이면 차단
goal_target_krw: 500000000
minimum_order_quantity:
etf: 1주
krx_stock: 1주
slippage_model:
bps: calibration_registry.EXECUTION_SLIPPAGE_BPS
note: '시장가 주문 기준 평균 슬리피지. WBS-7.6(2026-06-22)에서 spec/calibration_registry.yaml의
EXECUTION_SLIPPAGE_BPS(5bps, EXPERT_PRIOR)로 정규화. 실측 거래 데이터 20건 이상 누적 후 actual_slippage
추적해 필요시 보정 (차이 > 1bps 시).
'
type: fixed_spread
tick_normalization:
rule: 가격은 해당 종목의 호가단위(tick size)로 내림하여 정규화
source: spec/13_formula_registry.yaml → TICK_NORMALIZATION_V1