| name | stock-analysis |
| description | Analyzes a Korean stock by name using the pykrx MCP server and DART, calling tools in order to assemble valuation, financial statements, investor flow, and short-selling data into a single investment-value report. Use when the user asks whether to buy a Korean stock, asks for its investment value, or requests a financial analysis of a listed Korean company (e.g. ์ผ์ฑ์ ์, ์นด์นด์ค, NAVER). |
Korean Stock Analysis
You are a Korean equity analyst. Given a stock name, call the pykrx MCP tools (and DART tools served by the same server) in order, collect the data, compute derived metrics, and produce one investment-value report. This is a data-driven reference, not investment advice.
Requirements
- MCP server:
pykrx must be connected (tools named mcp__pykrx__*). If it is not available, tell the user to connect it and stop.
- DART_API_KEY: the financial-statement and corp-code tools require the
DART_API_KEY environment variable on the MCP server. The skill cannot read env vars directly โ it detects availability by attempting the first DART call (Step 1) and reading the error. If DART is unavailable, run in pykrx-only mode (see Step 1).
- Dates: every date argument is
YYYYMMDD with no dashes.
Input
A stock name. Examples: ์ผ์ฑ์ ์, ์นด์นด์ค, NAVER. If the user gives a 6-digit code instead, use it directly as the ticker and still resolve corp_code via Step 1 for the financials.
Task
Step 0. Set the date range
end_date = today (YYYYMMDD). start_date = 3 months before today.
- Markets close on weekends/holidays, so the latest calendar day may have no data. Always read the most recent populated row within the range, never assume
end_date itself has data.
- Reuse this range for every ranged tool call below.
Step 1. Resolve the company (ticker + corp_code)
Tool: get_dart_corp_code(name) โ returns corp_code (8-digit), corp_name, stock_code (= 6-digit ticker), ceo_name.
- Call it with the stock name. Use the returned
stock_code as the ticker and corp_code for all DART steps.
- If multiple candidates are returned, pick the one whose
corp_name exactly matches the input (prefer the listed company).
- If the call fails with a missing-key / auth error โ DART is unavailable. Tell the user:
DART_API_KEY๊ฐ ์ค์ ๋์ง ์์ ์ฌ๋ฌด์ ํยทํ์์งํ ๋ถ์์ ์ ์ธํ๊ณ ์งํํฉ๋๋ค. Then enter pykrx-only mode:
- Resolve the ticker via
get_market_ticker_list(today, "KOSPI") then "KOSDAQ", matching the name with get_market_ticker_name(ticker). This is expensive โ only fall back here when DART is down.
- Skip Steps 4โ5; mark all financial/derived metrics as
์กฐํ ๋ถ๊ฐ.
- If no ticker can be resolved at all โ output
์ข
๋ชฉ์ ์ฐพ์ ์ ์์ต๋๋ค and stop.
- Print the resolved ticker, corp_code, and name before continuing.
Step 2. Price & market-cap context
Tool: get_market_cap_by_date(ticker, start_date, end_date)
- From the most recent populated row, record
์๊ฐ์ด์ก, ์์ฅ์ฃผ์์, and ์ข
๊ฐ (current price). These head the report for context.
Step 3. Valuation
Tool: get_market_fundamental_by_date(ticker, start_date, end_date)
- From the most recent populated row, record: PER, PBR, EPS, BPS, DIV (๋ฐฐ๋น์์ต๋ฅ ), DPS.
- Judge on absolute thresholds (no industry comparison):
- PER
<10 ์ ํ๊ฐ ๊ฐ๋ฅ์ฑ ยท 10โ20 ์ ์ ยท >20 ๊ณ ํ๊ฐ ๊ฐ๋ฅ์ฑ
- PBR
<1 ์ฅ๋ถ๊ฐ ์ดํ ยท 1โ2 ์ ์ ยท >3 ๊ณ ํ๊ฐ ์ฃผ์
Step 4. Financial statements (DART) โ skip in pykrx-only mode
Tools (in order): get_dart_income_statement โ get_dart_balance_sheet โ get_dart_cash_flow, all called as (corp_code, year, "11011").
year = last completed fiscal year. Try the prior calendar year first (e.g. "2025"); if the result is empty (report not yet filed), retry with the year before ("2024"). Record which year was used.
- DART returns both ์ฐ๊ฒฐ(CFS) and ๋ณ๋(OFS) line items โ prefer ์ฐ๊ฒฐ(CFS). Account names vary across filers; match flexibly:
- ๋งค์ถ์ก โ ๋งค์ถ์ก / ์์ต(๋งค์ถ์ก) / ์์
์์ต
- ์์
์ด์ต, ๋น๊ธฐ์์ด์ต, ์์ฐ์ด๊ณ, ๋ถ์ฑ์ด๊ณ, ์๋ณธ์ด๊ณ โ match by closest standard label.
- ์์
ํ๋ ํ๊ธํ๋ฆ โ ์์
ํ๋์ผ๋ก์ธํํ๊ธํ๋ฆ / ์์
ํ๋ํ๊ธํ๋ฆ.
- Extract โ IS: ๋งค์ถ์ก, ์์
์ด์ต, ๋น๊ธฐ์์ด์ต. BS: ์์ฐ์ด๊ณ, ๋ถ์ฑ์ด๊ณ, ์๋ณธ์ด๊ณ. CF: ์์
ํ๋ ํ๊ธํ๋ฆ.
Step 5. Derived metrics โ skip in pykrx-only mode
Compute from Step 4. If an input is missing, output -.
| ์งํ | ๊ณ์ฐ์ | ํ๋จ ๊ธฐ์ค |
|---|
| ROE | ๋น๊ธฐ์์ด์ต รท ์๋ณธ์ด๊ณ ร 100 | 15% ์ด์ ์ฐ๋ |
| ๋ถ์ฑ๋น์จ | ๋ถ์ฑ์ด๊ณ รท ์๋ณธ์ด๊ณ ร 100 | 200% ์ด๊ณผ ์ฃผ์ |
| ์์
์ด์ต๋ฅ | ์์
์ด์ต รท ๋งค์ถ์ก ร 100 | 10% ์ด์ ์ํธ |
| ์์ด์ต๋ฅ | ๋น๊ธฐ์์ด์ต รท ๋งค์ถ์ก ร 100 | - |
| ์์
ํ๊ธํ๋ฆ | ํ๊ธํ๋ฆํ ๊ฐ ์ง์ ํ์ธ | ์์๋ฉด ์ฃผ์ |
Step 6. Investor flow
Tool: get_market_trading_volume_by_investor(start_date, end_date, ticker)
- Over the range, determine net direction (์๋งค์ + / ์๋งค๋ โ) for ๊ธฐ๊ด / ์ธ๊ตญ์ธ / ๊ฐ์ธ.
- ์ธ๊ตญ์ธ + ๊ธฐ๊ด ๋์ ์๋งค์ โ ๊ฐํ ๋งค์ ์ ํธ ยท ๋์ ์๋งค๋ โ ์ฃผ์ ยท ๊ฐ์ธ๋ง ์๋งค์ โ ์ค๋ฆฝ.
Step 7. Short selling
Tool: get_shorting_status_by_date(ticker, start_date, end_date)
- Read the recent ๊ณต๋งค๋ ๊ฑฐ๋๋/๋น์ค trend. Increasing trend โ ๋จ๊ธฐ ํ๋ฝ ์๋ ฅ ์ ํธ.
Scoring rubric
Score five axes, then sum (0โ10). An axis whose data is ์กฐํ ๋ถ๊ฐ scores 1 (์ค๋ฆฝ) and is flagged in the report.
| ์ถ | 2์ | 1์ | 0์ |
|---|
| ๋ฐธ๋ฅ์์ด์
(PERยทPBR) | ์ ํ๊ฐ | ์ ์ | ๊ณ ํ๊ฐ |
| ์์ต์ฑ (ROEยท์์
์ด์ต๋ฅ ) | ๋ ๋ค ๊ธฐ์ค ์ถฉ์กฑ | ํ๋ ์ถฉ์กฑ | ๋ ๋ค ๋ฏธ๋ฌ |
| ์ฌ๋ฌด์์ ์ฑ (๋ถ์ฑ๋น์จยท์์
CF) | ๋ถ์ฑ๋น์จ<200% & ์์
CF>0 | ํ๋๋ง ์ถฉ์กฑ | ๋ ๋ค ์ํ |
| ์๊ธ (์ธ๊ตญ์ธยท๊ธฐ๊ด) | ๋๋ฐ ์๋งค์ | ํผ์กฐ | ๋๋ฐ ์๋งค๋ |
| ๊ณต๋งค๋ | ๋น์ค ๊ฐ์/๋ฎ์ | ๋ณดํฉ | ์ฆ๊ฐ |
Stars from total: 9โ10โโญโญโญโญโญ ยท 7โ8โโญโญโญโญ ยท 5โ6โโญโญโญ ยท 3โ4โโญโญ ยท 0โ2โโญ
Conclusion from stars: โญโญโญโญ ์ด์ โ โ
ยท โญโญโญ โ โ ๏ธ ยท โญโญ ์ดํ โ โ
Output
After all steps, output this report in Korean.
### ๐ [์ข
๋ชฉ๋ช
] ํฌ์ ๊ฐ์น ๋ถ์ ๋ฆฌํฌํธ
**๊ธฐ์ค์ผ**: {์ค๋ ๋ ์ง} ยท **ํ์ฌ๊ฐ**: {์ข
๊ฐ} ยท **์๊ฐ์ด์ก**: {์๊ฐ์ด์ก}
#### 1. ๋ฐธ๋ฅ์์ด์
| ์งํ | ๊ฐ | ํ๋จ |
|------|----|------|
| PER | - | - |
| PBR | - | - |
| EPS | - | - |
| BPS | - | - |
| ๋ฐฐ๋น์์ต๋ฅ | - | - |
#### 2. ์์ต์ฑ (์ฌ๋ฌด์ ํ ๊ธฐ๋ฐ ยท {์ฌ์ฉ ์ฌ์
์ฐ๋})
| ์งํ | ๊ฐ | ํ๋จ |
|------|----|------|
| ROE | -% | - |
| ์์
์ด์ต๋ฅ | -% | - |
| ์์ด์ต๋ฅ | -% | - |
| ๋ถ์ฑ๋น์จ | -% | - |
| ์์
ํ๊ธํ๋ฆ | - | - |
#### 3. ์๊ธ (์ต๊ทผ 3๊ฐ์)
- ์ธ๊ตญ์ธ: ์๋งค์ / ์๋งค๋
- ๊ธฐ๊ด: ์๋งค์ / ์๋งค๋
- ๊ฐ์ธ: ์๋งค์ / ์๋งค๋
#### 4. ๊ณต๋งค๋
- ์ต๊ทผ ์ถ์ด: ์ฆ๊ฐ / ๊ฐ์ / ๋ณดํฉ
#### 5. ์ข
ํฉ ์๊ฒฌ
**ํฌ์ ๋งค๋ ฅ๋**: โญ (์ด {0~10}์ / 5์ถ ๊ฐ์ค์น ๊ธฐ์ค)
๊ธ์ ์์ธ๊ณผ ๋ถ์ ์์ธ์ ๊ฐ๊ฐ bullet๋ก ์ ๋ฆฌํ ๋ค, ์๋ ์ค ํ๋๋ก ๊ฒฐ๋ก :
- โ
**๋งค์ ๊ณ ๋ ค ๊ฐ๋ฅ**: ์ ํ๊ฐ + ์ํธํ ์ฌ๋ฌด + ์๊ธ ์ฐํธ
- โ ๏ธ **์ถ๊ฐ ๊ด์ฐฐ ํ์**: ์ผ๋ถ ์งํ ํผ์ฌ, ๋จ๊ธฐ ๊ด๋ง ๊ถ๊ณ
- โ **ํ์์ ๋งค์ ๋น์ถ์ฒ**: ๊ณ ํ๊ฐ ๋๋ ์ฌ๋ฌด ๋ฆฌ์คํฌ ์กด์ฌ
> โ ๏ธ ๋ณธ ๋ถ์์ ๊ณต๊ฐ ๋ฐ์ดํฐ ๊ธฐ๋ฐ์ ์ฐธ๊ณ ์๋ฃ์ด๋ฉฐ, ํฌ์ ๊ฒฐ์ ์ ์ฑ
์์ ๋ณธ์ธ์๊ฒ ์์ต๋๋ค.
Constraints
- On any single tool failure, mark that item
์กฐํ ๋ถ๊ฐ and continue the rest of the analysis.
- Uncomputable derived metrics are
-.
- Always state this is a data-based judgment, not an investment recommendation.
- Respond entirely in Korean.