简介
Stock Valuation
原始描述
Generate comprehensive company valuation reports as polished HTML/PDF. Use when user asks for stock valuation, company analysis, investment thesis, or deep-d...
通过你的 Agent 添加
安装目录:stock-valuation/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: stock-valuation
description: "Generate comprehensive company valuation reports as polished HTML/PDF. Use when user asks for stock valuation, company analysis, investment thesis, or deep-dive on a ticker. Combines yfinance fundamentals, technicals, DCF, insider data, options sentiment, earnings call data, Seeking Alpha research, X/Twitter sentiment, peer comparison, charts, and scenario-based price targets. NOT for quick price checks, daily watchlist alerts, or real-time trading signals."
Stock Valuation Report Generator v2.1
Generate professional valuation reports combining 10+ data sources — both automated scripts AND agent-driven qualitative research — into a polished HTML report with charts.
Phase 1: Automated Data Gathering (parallel)
Run all scripts simultaneously. All output JSON to stdout.
TICKER=AAPL # replace with target ticker
SKILL_DIR=path/to/stock-valuation/scripts
# Peer detection first (if unsure which peers to use)
uv run --with yfinance python3 $SKILL_DIR/detect_peers.py $TICKER
# Core quantitative data
uv run --with yfinance python3 $SKILL_DIR/fetch_fundamentals.py $TICKER PEER1 PEER2 PEER3
uv run --with yfinance python3 $SKILL_DIR/fetch_technicals.py $TICKER
uv run --with yfinance,lxml python3 $SKILL_DIR/fetch_historical_valuation.py $TICKER
uv run --with yfinance python3 $SKILL_DIR/dcf_model.py $TICKER
uv run --with yfinance python3 $SKILL_DIR/fetch_insiders.py $TICKER
uv run --with yfinance python3 $SKILL_DIR/fetch_options.py $TICKER
uv run --with yfinance python3 $SKILL_DIR/fetch_earnings_calendar.py $TICKER
# Charts (generates 4 PNGs in /tmp/)
uv run --with yfinance,matplotlib python3 $SKILL_DIR/generate_charts.py $TICKER
Phase 2: Agent-Driven Qualitative Research (parallel)
This phase requires web_search, web_fetch, and optionally bird (X/Twitter CLI). Run these searches in parallel and extract specific data points.
2a. Earnings Call & Revenue Composition
Search: web_search "{TICKER} Q3 2025 earnings call transcript revenue composition"
Extract these specific data points:
- Revenue breakdown by segment (commission income, interest income, other/wealth mgmt)
- Each segment: dollar amount, % of total, YoY growth
- Commission sub-breakdown (equities %, options %, futures %)
- Interest expense (to calculate net interest income)
- Geographic distribution of new accounts (% by market)
- Average new client deposit by market (e.g., Singapore $62K, Hong Kong $30K)
- Client asset growth by region (QoQ %)
- Funded accounts (total, new, trend)
- AUM total and YoY growth
- ESOP/corporate clients served
- Management guidance or outlook statements
- Any product launches (crypto trading, new market entry, CPF/SRS integration, etc.)
Fetch the full transcript if available:
web_fetch "URL_FROM_SEARCH" --maxChars 8000
Structure into these sections:
- Revenue Composition table: Stream | Amount | % of Total | YoY Growth
- Geographic Expansion table: Market | New Accounts % | Avg Deposit | Asset Growth | Highlights
- Enhanced quarterly table with QoQ trend arrows (↑↑ accelerating, ↑ growing, → stable, ↓ slowing)
2b. Seeking Alpha Research
Search: web_search "{TICKER} seekingalpha analysis 2025 2026"
Also search: web_search "seekingalpha {TICKER} strong buy OR turning bullish OR high growth"
For each article found (aim for 3-5), extract:
- Title, date, rating (Strong Buy/Buy/Hold/Sell)
- One-sentence key thesis
- Specific price target if mentioned
- Key concern or risk flagged
Structure into:
- Bullish theses (grouped)
- Cautious/neutral theses (grouped)
- SA Consensus summary callout
2c. X/Twitter Sentiment
If bird CLI is available:
bird search '$TICKER' -n 20 --plain | python3 $SKILL_DIR/filter_tweets.py
Otherwise use: web_search "{TICKER} stock twitter sentiment price target"
For each notable tweet/post (aim for 3-5), extract:
- Username, bull/bear stance
- Specific price target or thesis
- Key supporting argument
Look specifically for:
- Price targets from well-followed accounts
- Correlation plays (e.g., FUTU→TIGR correlation)
- Analyst PT mentions
- Covered call / options activity signals
- Contrarian views (important for balance)
2d. Additional Context
Search for recent news: web_search "{TICKER} stock news 2026"
Search for analyst ratings: web_search "{TICKER} analyst price target consensus"
Phase 3: Analysis & Valuation
From all gathered data, build these analytical sections:
Valuation Framework (use multiple methods)
Method 1: P/E Multiple Approach Table with scenarios: Conservative (current multiple × consensus EPS), Base (peer-informed multiple × estimated EPS), Optimistic (expansion multiple × upside EPS), Peer Parity (closest peer's P/E × target EPS)
Method 2: Mean Reversion
- 5Y avg P/E × forward EPS = implied price
- Closest peer forward P/E × target forward EPS
- Show as KPI cards with upside %
Method 3: DCF (from script)
- Use bear/base/bull from dcf_model.py output
- Note if FCF data unavailable (common for financials)
Price Target Scenarios
3-panel bear/base/bull with:
- Specific P/E × EPS math shown
- % upside/downside from current
- One-line narrative for each
Investment Thesis
One paragraph, specific to this company. Must address:
- Why it's mispriced (the "gap")
- What could close the gap (catalyst)
- What could go wrong (key risk)
- Clear verdict
Phase 4: Report Assembly
Use assets/report_template.html as a style reference. Write HTML directly — the template is a starting point, add custom sections as needed.
Required Sections (in order)
- Header — Company name, ticker, date, subtitle listing all data sources
- Earnings Badge — Next earnings date prominently displayed
- KPI Cards (2 rows of 4) — Price, MCap, Trail P/E, Fwd P/E, Revenue, Gross/Op/Net margins
- Quarterly Trends — Table with QoQ arrows (↑↑/↑/→/↓), include funded accounts + AUM
- Revenue Composition — Segment breakdown table + insight callout (hidden gems like interest income)
- Geographic Expansion — Market-by-market table with deposits, asset growth, highlights
- Technical Analysis — 6-panel grid (RSI, SMA50, SMA200, MACD, 52W High/Low) + signal callout
- Charts — 2×2 grid (price+SMA, revenue bars, margins, PE history)
- Historical Valuation — 4 KPI cards (current PE, 5Y avg, range, percentile) + mean reversion callout
- Peer Comparison — Full table with highlight row for target + discount callout
- Options Sentiment — 4 KPI cards (P/C vol, P/C OI, IV, expiry) + interpretation
- Seeking Alpha — Bullish theses, cautious theses, consensus callout
- X/Twitter — Table of notable takes + consensus callout
- Catalysts — Bulleted list (5-7 items, most important first)
- Risks — Bulleted list (5-7 items with mitigants where applicable)
- Valuation Framework — Multiple methods table + mean reversion KPIs + 3-panel scenarios
- Investment Thesis — Green callout, specific and opinionated
- Disclaimer — Yellow callout
- Footer — Sources cited
Styling Rules
- Use
class="up" (green) for positive metrics, class="down" (red) for negative
- Use
class="highlight" on the target company row in peer tables
- Use
page-break class before sections that should start a new page in PDF
- Embed charts as base64 for portability:
<img src="data:image/png;base64,...">
- Trend arrows:
<span class="arrow arrow-up">↑↑ Accelerating</span>
- NEVER include personal position data, portfolio info, or user-identifiable information
Phase 5: PDF & Delivery
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
--headless --disable-gpu --print-to-pdf=output.pdf --no-pdf-header-footer output.html
- Email:
gog gmail send --body-html "$(cat output.html)" --attach output.pdf
- Telegram: Send PDF via message tool
- Always use
--body-html for email (never --attach alone for HTML)
Script Reference
Script
Deps
Output
fetch_fundamentals.py TICKER [PEERS...]
yfinance
Financials, ratios, peer data
fetch_technicals.py TICKER
yfinance
SMAs, RSI, MACD, support/resistance
fetch_historical_valuation.py TICKER
yfinance,lxml
5yr P/E history, percentile
dcf_model.py TICKER [--wacc] [--growth-*] [--terminal]
yfinance
10yr DCF bear/base/bull
fetch_insiders.py TICKER
yfinance
Insider txns + institutional holders
fetch_options.py TICKER
yfinance
P/C ratio, IV, unusual vol
fetch_earnings_calendar.py TICKER
yfinance
Next earnings date
generate_charts.py TICKER
yfinance,matplotlib
4 PNGs (price, revenue, margins, PE)
detect_peers.py TICKER
yfinance
Auto-detected peer tickers
filter_tweets.py (stdin)
(none)
Filtered tweet JSON
cache_utils.py
(none)
Import for caching (auto-TTL)
Quality Checklist
- At least 3 quarters of financial data with QoQ trend arrows
- Revenue composition by segment (commission, interest, other)
- Geographic expansion data (new accounts %, deposits, asset growth)
- 3+ relevant peers with comprehensive comparison table
- Technical analysis (RSI, SMAs, MACD) with signal interpretation
- DCF intrinsic value (3 scenarios) — or note if unavailable
- Historical P/E context (5yr avg, percentile, mean reversion)
- Insider/institutional activity
- Options sentiment (P/C ratio, IV) with interpretation
- Multiple valuation methods (P/E multiples + mean reversion + DCF)
- 3 price target scenarios (bear/base/bull) with explicit math
- Seeking Alpha research (3+ articles with bull/bear grouping)
- X/Twitter sentiment (3+ data points with specific takes)
- 4 charts embedded (price, revenue, margins, PE)
- Next earnings date prominently displayed
- 5+ catalysts and 5+ risks with mitigants
- Investment thesis is specific, opinionated, and company-specific
- No personal/position data anywhere in output
- PDF renders correctly (test in browser first)
- Use
class="up"(green) for positive metrics,class="down"(red) for negative - Use
class="highlight"on the target company row in peer tables - Use
page-breakclass before sections that should start a new page in PDF - Embed charts as base64 for portability:
<img src="data:image/png;base64,..."> - Trend arrows:
<span class="arrow arrow-up">↑↑ Accelerating</span> - NEVER include personal position data, portfolio info, or user-identifiable information
Phase 5: PDF & Delivery
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
--headless --disable-gpu --print-to-pdf=output.pdf --no-pdf-header-footer output.html
- Email:
gog gmail send --body-html "$(cat output.html)" --attach output.pdf
- Telegram: Send PDF via message tool
- Always use
--body-html for email (never --attach alone for HTML)
Script Reference
Script
Deps
Output
fetch_fundamentals.py TICKER [PEERS...]
yfinance
Financials, ratios, peer data
fetch_technicals.py TICKER
yfinance
SMAs, RSI, MACD, support/resistance
fetch_historical_valuation.py TICKER
yfinance,lxml
5yr P/E history, percentile
dcf_model.py TICKER [--wacc] [--growth-*] [--terminal]
yfinance
10yr DCF bear/base/bull
fetch_insiders.py TICKER
yfinance
Insider txns + institutional holders
fetch_options.py TICKER
yfinance
P/C ratio, IV, unusual vol
fetch_earnings_calendar.py TICKER
yfinance
Next earnings date
generate_charts.py TICKER
yfinance,matplotlib
4 PNGs (price, revenue, margins, PE)
detect_peers.py TICKER
yfinance
Auto-detected peer tickers
filter_tweets.py (stdin)
(none)
Filtered tweet JSON
cache_utils.py
(none)
Import for caching (auto-TTL)
Quality Checklist
- At least 3 quarters of financial data with QoQ trend arrows
- Revenue composition by segment (commission, interest, other)
- Geographic expansion data (new accounts %, deposits, asset growth)
- 3+ relevant peers with comprehensive comparison table
- Technical analysis (RSI, SMAs, MACD) with signal interpretation
- DCF intrinsic value (3 scenarios) — or note if unavailable
- Historical P/E context (5yr avg, percentile, mean reversion)
- Insider/institutional activity
- Options sentiment (P/C ratio, IV) with interpretation
- Multiple valuation methods (P/E multiples + mean reversion + DCF)
- 3 price target scenarios (bear/base/bull) with explicit math
- Seeking Alpha research (3+ articles with bull/bear grouping)
- X/Twitter sentiment (3+ data points with specific takes)
- 4 charts embedded (price, revenue, margins, PE)
- Next earnings date prominently displayed
- 5+ catalysts and 5+ risks with mitigants
- Investment thesis is specific, opinionated, and company-specific
- No personal/position data anywhere in output
- PDF renders correctly (test in browser first)
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
--headless --disable-gpu --print-to-pdf=output.pdf --no-pdf-header-footer output.html
gog gmail send --body-html "$(cat output.html)" --attach output.pdf--body-html for email (never --attach alone for HTML)| Script | Deps | Output |
|---|---|---|
fetch_fundamentals.py TICKER [PEERS...] |
yfinance | Financials, ratios, peer data |
fetch_technicals.py TICKER |
yfinance | SMAs, RSI, MACD, support/resistance |
fetch_historical_valuation.py TICKER |
yfinance,lxml | 5yr P/E history, percentile |
dcf_model.py TICKER [--wacc] [--growth-*] [--terminal] |
yfinance | 10yr DCF bear/base/bull |
fetch_insiders.py TICKER |
yfinance | Insider txns + institutional holders |
fetch_options.py TICKER |
yfinance | P/C ratio, IV, unusual vol |
fetch_earnings_calendar.py TICKER |
yfinance | Next earnings date |
generate_charts.py TICKER |
yfinance,matplotlib | 4 PNGs (price, revenue, margins, PE) |
detect_peers.py TICKER |
yfinance | Auto-detected peer tickers |
filter_tweets.py (stdin) |
(none) | Filtered tweet JSON |
cache_utils.py |
(none) | Import for caching (auto-TTL) |
Quality Checklist
- At least 3 quarters of financial data with QoQ trend arrows
- Revenue composition by segment (commission, interest, other)
- Geographic expansion data (new accounts %, deposits, asset growth)
- 3+ relevant peers with comprehensive comparison table
- Technical analysis (RSI, SMAs, MACD) with signal interpretation
- DCF intrinsic value (3 scenarios) — or note if unavailable
- Historical P/E context (5yr avg, percentile, mean reversion)
- Insider/institutional activity
- Options sentiment (P/C ratio, IV) with interpretation
- Multiple valuation methods (P/E multiples + mean reversion + DCF)
- 3 price target scenarios (bear/base/bull) with explicit math
- Seeking Alpha research (3+ articles with bull/bear grouping)
- X/Twitter sentiment (3+ data points with specific takes)
- 4 charts embedded (price, revenue, margins, PE)
- Next earnings date prominently displayed
- 5+ catalysts and 5+ risks with mitigants
- Investment thesis is specific, opinionated, and company-specific
- No personal/position data anywhere in output
- PDF renders correctly (test in browser first)
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。