fix(total_asset): 총자산 3원천 불일치 수정 — GAS 2-pass 누락 및 stale 하네스 보정
1. GAS 2-pass 차등 재계산 (gdc_01_fetch_fundamentals.gs) - 구: settlementCashD2 + Naver주가 합산 → ISA·연금저축·CMA ~10.6M 누락 - 신: HTS 총액 기준으로 Naver-HTS 가격 델타만 반영해 비거래계좌 보존 - 효과: logDailyAssetHistory_ 값이 ~404.9M → ~413M으로 수정(GAS 재배포 후) 2. inject_computed_harness.py total_asset 정원(正源) 수정 - settings.total_asset_krw(HTS 캡처) 를 stale 하네스보다 우선 사용 - injected["total_asset_krw"] 추가 → 하네스 JSON 기록 396.8M→417M 수정 - 반도체 클러스터·포지션 가중치 계산 기준 일관화 3. compute_formula_outputs.py 사문(死文) 코드 정리 - holdings_value+cash_d2 계산 후 파일 미저장 문제 → settings 동기화로 대체 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -855,8 +855,9 @@ def main() -> int:
|
||||
|
||||
# 공통 집계값
|
||||
total_asset = float(
|
||||
computed_harness.get("total_asset_krw") or
|
||||
hc.get("total_asset_krw") or
|
||||
computed_harness.get("total_asset_krw") or
|
||||
settings_map.get("total_asset_krw") or # HTS 캡처 기준(stale 하네스보다 최신)
|
||||
hc.get("total_asset_krw") or
|
||||
hc.get("total_asset") or 0
|
||||
)
|
||||
total_heat = float(hc.get("total_heat_pct") or 0)
|
||||
@@ -873,6 +874,10 @@ def main() -> int:
|
||||
log(SEP)
|
||||
|
||||
injected: dict[str, object] = {}
|
||||
# total_asset_krw를 정규화된 값으로 하네스에 기록 (stale GAS 값 덮어쓰기)
|
||||
if total_asset > 0:
|
||||
injected["total_asset_krw"] = round(total_asset)
|
||||
|
||||
fresh_captured_at = latest_snapshot_captured_at_iso(acct_snap)
|
||||
if fresh_captured_at:
|
||||
injected["captured_at"] = fresh_captured_at
|
||||
|
||||
Reference in New Issue
Block a user