# Account Constraints And Position Sizing

## Account Rules

- Main account baseline: 54,000,000 KRW.
- Sub account baseline: 49,000,000 KRW.
- Combined baseline: 103,000,000 KRW.
- Main account can trade leveraged and inverse ETFs.
- Sub account cannot trade leveraged and inverse ETFs unless the user later updates this rule.
- Broker working assumption: the user trades through Namuh/NH. For US-stock sale proceeds and tactical cash preparation, use a conservative `1-2 Korean business day` availability assumption unless the broker app shows immediately orderable cash.
- First `SOXL` or `SOXS` tactical proposal should assume a 10,000,000 KRW cash bucket may need to be prepared 2-3 trading days ahead.
- Ideal live position count is 4; normal maximum is 5. New buys above 5 live positions must replace a weaker holding.

## Required Output For Buy/Sell Suggestions

When suggesting a buy or sell, the agent should include:

- Account: main or sub.
- Whether the ticker is eligible in that account.
- Current price source and timestamp.
- Price in USD.
- USD/KRW FX rate.
- USD/KRW source and timestamp.
- Budget in KRW.
- Calculated share count.
- Approximate KRW exposure.
- Remaining cash after trade if known.
- Target 1, target 2, stop/invalidation, and time stop.
- Funding source if cash is not already available.
- Cash-ready assumption: `IMMEDIATE`, `T+1`, `T+2`, or `UNKNOWN`.
- Opportunity cost of preparing cash early or late.
- Whether the buy would exceed the 4-5 live position focus cap.

If live price or FX cannot be verified, do not pretend precision. Use `NEEDS LIVE PRICE`.

For tactical trades, especially SOXL/SOXS and same-day trades, stale FX or stale price means no exact share-count recommendation.

Reference:

- `/Users/jangbogeun/Documents/Codex/2026-06-06/2/outputs/fx_rate_and_live_pricing_rules.md`
- `/Users/jangbogeun/Documents/Codex/2026-06-06/2/outputs/liquidity_and_rotation_opportunity_cost_rules.md`

## Position Size Formula

Use:

`shares = floor(budget_krw / (price_usd * usdkrw * (1 + fee_buffer)))`

Default fee buffer:

- `0.15%` if broker fee/slippage is unknown.
- Use the user's actual broker fee once provided.

Example:

If budget is 10,000,000 KRW, price is 50 USD, USD/KRW is 1,350, fee buffer is 0.15%:

`shares = floor(10000000 / (50 * 1350 * 1.0015)) = 147 shares`

## Leverage Eligibility

If ticker is leveraged or inverse and account is sub:

- Recommendation must be `NOT ELIGIBLE IN SUB ACCOUNT`.
- Suggest either main-account execution or a non-leveraged alternative.

## Risk Budget Output

For every tactical trade:

- max position KRW,
- max loss KRW,
- stop distance,
- share count,
- loss if stopped,
- whether the loss fits the weekly/monthly quest risk.

Do not recommend a trade if the risk budget is undefined.

## Cash Preparation Rule

If a leveraged/inverse ETF recommendation requires selling existing holdings:

- Identify the exact funding source.
- State whether the funding source is `BROKEN`, `DAMAGED`, `REBOUND WATCH`, `DEAD MONEY`, or `STRONG HOLD`.
- Compare immediate available cash, T+1 cash, T+2 cash, and unknown cash.
- If the setup is likely to move before cash is ready, mark `WAIT FOR CASH` or `MISSED WINDOW` instead of forcing a late chase.
- If only partial funding is available, prefer staged sizing over all-or-nothing rotation.
