ee3e799de1
주요 변경: - tools/build_rebalance_engine_v1.py: REBALANCE_ENGINE_V1 신규 * account_snapshot 직접 합산(_build_snap_position_map) → 소수주 분리 행 병합 * 레짐 소스 macro.REGIME_PRELIM 최우선 (GAS 와 동일) - src/gas_adapter_parts/gdf_06_rebalance.gs: runRebalanceSheet_() 신규 * Logger.log / getSpreadsheet_() 로 run_all 연동 수정 - src/gas_adapter_parts/gdc_01_fetch_fundamentals.gs * _mergePositionRecord_(): 소수주 중복 행 합산 신규 * parseInt → parseFloat (qty, availQty) - src/gas_adapter_parts/gdf_01_price_metrics.gs * 미보유 종목 SELL_READY → WATCH_EXIT_SIGNAL - spec/41_release_dag.yaml: build_rebalance_sheet 노드 추가 (step_count 63) - spec/51_formula_lifecycle_registry.yaml: REBALANCE_ENGINE_V1 등록 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
144 lines
3.9 KiB
JSON
144 lines
3.9 KiB
JSON
{
|
|
"schema_version": "2026-05-15-F6-compat-output",
|
|
"analysis_date": "2026-05-15",
|
|
"analysis_scope": {
|
|
"scope_type": "SINGLE_TICKER",
|
|
"tickers": ["005930"],
|
|
"accounts": ["일반계좌"]
|
|
},
|
|
"data_basis": {
|
|
"as_of": "2026-05-15 16:30 KST",
|
|
"timezone": "Asia/Seoul",
|
|
"sources": [
|
|
{
|
|
"name": "sample",
|
|
"type": "CALCULATED",
|
|
"status": "OK",
|
|
"note": "schema validation sample"
|
|
}
|
|
]
|
|
},
|
|
"capture_read_ledger": [
|
|
{
|
|
"source": "sample",
|
|
"account": "일반계좌",
|
|
"screen_type": "unknown",
|
|
"read_values": {},
|
|
"confidence": 0,
|
|
"applied_to_orders": false,
|
|
"read_status": "NOT_PROVIDED",
|
|
"next_source_to_check": "HTS 보유종목/현금 화면 캡처"
|
|
}
|
|
],
|
|
"portfolio_decision": {
|
|
"final_action": "WATCH",
|
|
"grade": "C",
|
|
"confidence_score": 50,
|
|
"rationale": "검증용 샘플. 실제 투자 판단 아님."
|
|
},
|
|
"scores": {
|
|
"quality_score": null,
|
|
"valuation_score": null,
|
|
"momentum_score": null,
|
|
"risk_score": 50,
|
|
"strategy_score": null,
|
|
"portfolio_fit_score": null,
|
|
"total_score": null,
|
|
"score_formula": "not_calculated",
|
|
"score_notes": ["검증 샘플이므로 점수 산출 생략"]
|
|
},
|
|
"position_sizing": {
|
|
"status": "NOT_APPLICABLE",
|
|
"recommended_position_size_pct": null,
|
|
"max_allowed_position_size_pct": null,
|
|
"risk_budget": null,
|
|
"atr20": null,
|
|
"calculated_quantity": null,
|
|
"final_quantity": null,
|
|
"reason": "WATCH 샘플로 수량 산출 대상 아님"
|
|
},
|
|
"risk_gate": {
|
|
"status": "CAUTION",
|
|
"cash_floor_status": "UNKNOWN",
|
|
"total_heat_pct": null,
|
|
"hard_stop_triggered": false,
|
|
"triggered_rules": []
|
|
},
|
|
"data_completeness_matrix": [
|
|
{
|
|
"ticker": "005930",
|
|
"name": "삼성전자",
|
|
"price_status": "OK",
|
|
"flow5d_status": "PARTIAL",
|
|
"flow20d_status": "DATA_MISSING",
|
|
"atr20_status": "DATA_MISSING",
|
|
"dart_status": "NOT_APPLICABLE",
|
|
"missing_fields": ["ATR20", "Flow20D"],
|
|
"next_source_to_check": "KRX/Naver/Yahoo 21거래일 OHLC 및 수급",
|
|
"allowed_action": "WATCH_ONLY"
|
|
}
|
|
],
|
|
"decision_trace": [
|
|
{
|
|
"state": "DATA_COMPLETENESS_CHECK",
|
|
"check_id": "DCC_SAMPLE_001",
|
|
"rule_ref": "spec/09_decision_flow.yaml:decision_flow.states.DATA_COMPLETENESS_CHECK",
|
|
"inputs_used": ["ticker", "ATR20", "Flow20D"],
|
|
"result": "INSUFFICIENT_DATA",
|
|
"selected_action": "WATCH",
|
|
"blocked_actions": ["BUY"],
|
|
"missing_inputs": ["ATR20", "Flow20D"],
|
|
"tie_breaker_applied": "5: 보수적 행동"
|
|
}
|
|
],
|
|
"orders": [],
|
|
"prohibited_calculations": [
|
|
{
|
|
"item": "buy_quantity",
|
|
"reason": "ATR20 DATA_MISSING",
|
|
"next_source_to_check": "21거래일 OHLC"
|
|
}
|
|
],
|
|
"triggered_rules": [
|
|
{
|
|
"file": "spec/00_execution_contract.yaml",
|
|
"path": "master_prohibitions.P2_no_atr_extrapolation",
|
|
"result": "BLOCK",
|
|
"explanation": "ATR20 미확인으로 정수 매수수량 산출 금지"
|
|
}
|
|
],
|
|
"missing_data": [
|
|
{
|
|
"field": "ATR20",
|
|
"status": "DATA_MISSING",
|
|
"next_source_to_check": "Yahoo/Naver OHLC"
|
|
}
|
|
],
|
|
"invalidation_conditions": [
|
|
{
|
|
"condition": "ATR20 remains DATA_MISSING",
|
|
"action": "NO_BUY_QUANTITY",
|
|
"rule_ref": "spec/00_execution_contract.yaml:master_prohibitions.P2_no_atr_extrapolation"
|
|
}
|
|
],
|
|
"evidence": [
|
|
{
|
|
"field": "ticker",
|
|
"value": "005930",
|
|
"source": "sample",
|
|
"as_of": "2026-05-15",
|
|
"data_tag": "계산값"
|
|
}
|
|
],
|
|
"rule_ids_used": ["P2_no_atr_extrapolation"],
|
|
"rules_used": [
|
|
{
|
|
"file": "spec/00_execution_contract.yaml",
|
|
"path": "master_prohibitions.P2_no_atr_extrapolation",
|
|
"result": "USED",
|
|
"explanation": "정수 매수수량 산출 금지 규칙 확인"
|
|
}
|
|
],
|
|
"summary": "검증용 WATCH 샘플. 실제 투자 판단이 아니다."
|
|
}
|