# Daily Account Close Summary Rules

## Purpose

This is the user's daily account close summary.

It should be short, number-first, and suitable for KakaoTalk right after the US regular market closes.

The goal is to answer:

- How did the account change versus yesterday?
- How far is the account from the start baseline?
- What is the KRW estimated profit or loss after applying the current USD/KRW rate?
- Is the account in growth, recovery, defense, or fatigue-protection mode?

## Baselines

- Main account start: 54,000,000 KRW.
- Sub account start: 49,000,000 KRW.
- Combined start: 103,000,000 KRW.

## Required Inputs

Use the latest available:

- `/Users/jangbogeun/Documents/Codex/2026-06-06/2/outputs/account_snapshot_template.csv`
- `/Users/jangbogeun/Documents/Codex/2026-06-06/2/outputs/account_daily_summary_template.csv`
- `/Users/jangbogeun/Documents/Codex/2026-06-06/2/outputs/trade_updates_template.csv`
- `/Users/jangbogeun/Documents/Codex/2026-06-06/2/outputs/fx_rate_and_live_pricing_rules.md`

If previous-day values are missing, ask for them and still provide baseline-vs-start calculations from available data.

## Required Calculations

For main, sub, and combined:

- Current total equity KRW.
- Previous close total equity KRW.
- Day change KRW.
- Day change percent.
- Return vs start KRW.
- Return vs start percent.
- Current cash KRW if available.
- USD cash if available.
- USD/KRW rate, source, and timestamp.
- FX impact note when relevant.

## KRW Estimated Profit

Use:

`estimated_profit_krw = current_total_equity_krw - start_baseline_krw`

For USD-denominated holdings or cash, use the latest USD/KRW if the data is available. If exact USD position values are not available, label the KRW result as broker-equity based or estimate.

Never hide the FX assumption.

## Status Labels

- `GROWTH`: above start and rising.
- `RECOVERY`: below recent high but stabilizing.
- `DEFENSE`: drawdown or market risk requires caution.
- `ALERT`: daily loss guardrail or major risk triggered.
- `DATA NEEDED`: not enough account data.

## Kakao Summary Format

Keep under 500 Korean characters:

`계좌마감: 합산 [...]. 전일대비 [...](...%). 시작대비 [...](...%). 본 [...]/부 [...]. 환율 USD/KRW [...](출처/시각). 현금 [...]. 상태 [...]. 내일 핵심 [...].`

If data is missing:

`계좌마감: DATA NEEDED. 필요한 값: 본/부 현재총액, 전일 본/부 총액, 현금, USD/KRW. 시작 기준은 본 5400/부 4900/합산 1억300.`

## Schedule

During US daylight saving time, US regular market close is 05:00 Korea/Japan time. This summary is scheduled just after that. During US standard time, adjust to 06:00 if needed.

