Daloopa
Daloopa, Inc. v6.0.0
Daloopa supplies high quality fundamental data sourced from filings, investor presentations, earnings transcripts and company presentations, with hyperlinks to source document overlaying each data point. Provides a zero-hallucination foundation for any quantitative financial analysis in ChatGPT.
Language: English · Automatically detected from descriptions.
Package details
Publisher declarations from the archived package. These are separate from our research and the live service's terms.
- Package author
- Daloopa, Inc.
Package observed Sep 30, 2026.
Files & skills
File archives
Skill instructions
build-model7.7 KB
---
name: build-model
description: Build a multi-tab Excel financial model
---
Build a comprehensive Excel financial model (.xlsx) for the company named in the user's request. If no ticker or company is provided, ask for one before proceeding.
**Before starting, read `../data-access.md` for data access methods and `../design-system.md` for formatting conventions.** Follow the data access detection logic and design system throughout this skill.
This skill gathers all available financial data and builds a multi-tab Excel model saved as `reports/{TICKER}_model.xlsx`.
## Phase 1 — Company Setup
Look up the company by ticker using `discover_companies`. Capture:
- `company_id`
- `latest_calendar_quarter` — anchor for all period calculations (see `../data-access.md` Section 1.5)
- `latest_fiscal_quarter`
- Firm name for report attribution (default: "Daloopa") — see `../data-access.md` Section 4.5
Get current stock price, market cap, shares outstanding, beta, and trading multiples for {TICKER}. Use the 3-step resolution: (1) MCP market data tools if available, (2) web search, (3) sensible defaults (see `../data-access.md` Section 2).
## Phase 2 — Comprehensive Data Pull
Calculate periods backward from `latest_calendar_quarter`. Pull as much data as Daloopa has for this company. Target 8-16 quarters.
**Income Statement — search and pull all available:**
- Revenue / Net Sales
- Cost of Revenue / COGS
- Gross Profit
- Research & Development
- Selling, General & Administrative
- Total Operating Expenses
- Operating Income
- Interest Expense / Income
- Pre-tax Income
- Tax Expense
- Net Income
- Diluted EPS
- Diluted Shares Outstanding
- EBITDA (or compute from Op Income + D&A)
- D&A
**Balance Sheet — search and pull all available:**
- Cash and Equivalents
- Short-term Investments
- Accounts Receivable
- Inventory
- Total Current Assets
- PP&E (net)
- Goodwill
- Total Assets
- Accounts Payable
- Short-term Debt
- Long-term Debt
- Total Liabilities
- Total Equity
**Cash Flow — search and pull all available:**
- Operating Cash Flow
- Capital Expenditures
- Depreciation & Amortization
- Acquisitions
- Dividends Paid
- Share Repurchases
- Free Cash Flow (compute if not direct)
**Segments:**
- Revenue by segment
- Operating income by segment (if available)
**KPIs:**
- All company-specific operating metrics
**Guidance:**
- All guidance series and corresponding actuals
## Phase 3 — Market Data & Peers
- Identify 5-8 peers and get their trading multiples using the same 3-step resolution: (1) MCP market data tools, (2) web search, (3) sensible defaults
- Get risk-free rate using the same 3-step resolution
- If consensus forward estimates are available (`../data-access.md` Section 3), include NTM estimates for peers
## Phase 4 — Projections
Build forward estimates using the following methodology:
- **Revenue:** Start with latest guidance (if available), then decay to long-term growth rate (industry average or historical trend). Apply quarterly seasonality patterns from trailing data.
- **Gross Margin:** Mean-revert to trailing 8-quarter average, with adjustment for recent trends or guidance commentary.
- **Operating Expenses:** Project as % of revenue, trending toward trailing averages. R&D and SG&A may have different trajectories.
- **CapEx:** Project as % of revenue based on trailing 4-8 quarter average and guidance.
- **D&A:** Project based on trailing average as % of revenue or PP&E.
- **Tax Rate:** Use trailing effective tax rate or guidance.
- **Share Count:** Project dilution/buyback based on trailing trends and guidance.
- **Working Capital:** Project DSO, DIO, DPO based on trailing averages.
Calculate all quarterly projections, then sum to annual. Project 4-8 quarters forward.
## Phase 5 — DCF Inputs
Calculate:
- **WACC:** Use CAPM for cost of equity (Rf + Beta × ERP, where ERP = 6.0%). Cost of debt = Interest Expense / Total Debt. WACC = (E/V × Re) + (D/V × Rd × (1 - Tax Rate)).
- **5-year FCF projections:** Annualize from quarterly projections (FCF = Op Cash Flow - CapEx).
- **Terminal Value:** Use perpetuity growth at 2.5-3.0%.
- **Sensitivity Matrix:** WACC (7 values: -3% to +3% from base) × Terminal Growth (6 values: 1.5% to 4.0%).
## Phase 6 — Build Excel Model
Generate the `.xlsx` file directly using the best available spreadsheet-generation workflow. For Codex, prefer bundled spreadsheet tooling or Python/openpyxl when available. The workbook should:
1. Create 8 tabs with the following structure:
**Tab 1: Income Statement**
- Rows: Revenue, COGS, Gross Profit, R&D, SG&A, Total OpEx, Op Income, Interest, Pre-Tax Income, Tax, Net Income, Diluted EPS, Shares
- Columns: Historical periods (8-16Q) + Projected periods (4-8Q)
- Sub-rows: YoY growth %, margin % where applicable
- Header: Company name, ticker, report date
- Formatting: Numbers with commas/decimals, percentages, bold headers, frozen panes
**Tab 2: Balance Sheet**
- Rows: Assets section (Cash, Investments, AR, Inventory, Current Assets, PP&E, Goodwill, Total Assets), Liabilities section (AP, ST Debt, LT Debt, Total Liabilities, Equity)
- Columns: Historical + Projected periods
- Sub-rows: % of Total Assets for key line items
- Same formatting standards
**Tab 3: Cash Flow**
- Rows: Op Cash Flow, CapEx, Free Cash Flow, Acquisitions, Dividends, Buybacks, Net Change in Cash
- Columns: Historical + Projected periods
- Sub-rows: FCF yield %, CapEx as % Revenue
- Same formatting standards
**Tab 4: Segments**
- Rows: Revenue by segment, Op Income by segment (if available)
- Columns: Historical + Projected periods
- Sub-rows: Segment as % of total, segment growth rates
- Same formatting standards
**Tab 5: KPIs**
- Rows: All company-specific operating metrics discovered
- Columns: Historical + Projected periods
- Sub-rows: YoY growth or relevant unit economics
- Same formatting standards
**Tab 6: Projections**
- Editable assumption inputs (yellow highlighting): Revenue growth %, Gross margin %, Op margin %, CapEx % revenue, Tax rate %, Buyback rate QoQ
- Calculated outputs: Projected P&L, BS, CF driven by assumptions
- Commentary box explaining methodology
- Same formatting standards
**Tab 7: DCF**
- Inputs: WACC, Terminal Growth, Risk-Free Rate, ERP, Beta, Cost of Debt
- FCF Projection (5 years annualized)
- Terminal Value calculation
- PV calculations
- Enterprise Value → Equity Value → Implied Share Price
- Sensitivity table: WACC (rows) × Terminal Growth (cols) showing implied price
- Color scale: green (upside) to red (downside) vs current price
- Same formatting standards
**Tab 8: Summary**
- Company overview (name, ticker, sector, description)
- Current market data (price, market cap, shares, beta)
- Valuation summary: DCF implied price, peer-implied range, current price, upside/downside %
- Peer trading multiples table
- Key model outputs: Trailing revenue, Projected revenue growth, Trailing/Projected margins
- Same formatting standards
2. Apply `../design-system.md` formatting conventions:
- Number format: $X.Xbn for large numbers, X.X% for percentages, X.Xx for multiples
- Color palette: Navy #1B2A4A (headers), Steel Blue #4A6FA5 (sub-headers), Gold #C5A55A (highlights), Green #27AE60 (positive), Red #C0392B (negative)
- Bold headers, frozen top row and left column
- Yellow fill (#FFEB3B) for editable input cells
3. Save the workbook as `reports/{TICKER}_model.xlsx`
## Output
Save the generated workbook to `reports/{TICKER}_model.xlsx` and tell the user:
- Summary of what tabs were built
- Key model outputs: trailing revenue, projected revenue growth, implied DCF value, peer-implied range
- Note that yellow cells in the Projections tab are editable inputs
- Instruction to open the saved `.xlsx` file
All financial figures gathered must use Daloopa citation format: [$X.XX million](https://daloopa.com/src/{fundamental_id})
Referenced files: 1
bull-bear7.52 KB
---
name: bull-bear
description: Bull/bear/base case scenario framework for a given company
---
Build a bull/bear/base case scenario framework for the company named in the user's request. If no ticker or company is provided, ask for one before proceeding.
**Before starting, read `../data-access.md` for data access methods and `../design-system.md` for formatting conventions.** Follow the data access detection logic and design system throughout this skill.
Follow these steps:
## 1. Company Lookup
Look up the company by ticker using `discover_companies`. Capture:
- `company_id`
- `latest_calendar_quarter` — anchor for all period calculations below (see `../data-access.md` Section 1.5)
- `latest_fiscal_quarter`
- Firm name for report attribution (default: "Daloopa") — see `../data-access.md` Section 4.5
## 1b. Current Stock Price
Get the current stock price using `get_stock_prices` (see `../data-access.md` Section 1.7). Pass `company_id` and `dates` for the 3 most recent calendar days — use the most recent returned close price. This is the anchor for scenario comparison: each scenario's implied value will be compared against this price to show upside/downside.
## 2. Historical Financial Baseline
Calculate 8 quarters backward from `latest_calendar_quarter`. Pull:
- Revenue
- Gross Profit / Gross Margin %
- Operating Income / Operating Margin %
- EBITDA (if not reported, compute as Operating Income + D&A — label "(calc.)")
- Net Income
- Diluted EPS
- Operating Cash Flow
- CapEx
- Free Cash Flow (compute as OCF - CapEx — label "(calc.)")
- Segment-level revenue breakdowns
- Geographic revenue breakdowns
Compute trailing 4-quarter totals for revenue, EBITDA, net income, EPS, and FCF — these are the baseline the scenarios build from.
Flag any one-time items that distort quarters.
## 3. Key Operating KPIs
First, think about what the most important KPIs are for THIS specific company based on its business model and what drives its valuation. For example:
- **SaaS/cloud**: ARR, net revenue retention, RPO/cRPO, customers >$100K
- **Consumer tech**: DAU/MAU, ARPU, engagement metrics, installed base, paid subscribers
- **E-commerce/marketplace**: GMV, take rate, active buyers/sellers, order frequency
- **Retail**: same-store sales, store count, average ticket, transactions
- **Telecom/media**: subscribers, churn, ARPU, content spend
- **Hardware**: units shipped, ASP, attach rate
- **Financial services**: AUM, NIM, loan growth, credit quality metrics
- **Pharma/biotech**: pipeline stage, patient starts, scripts, market share
Search for those specific KPIs by name and pull them. These are the building blocks for bottoms-up scenario math.
Also pull capital allocation data: share count, buyback amounts, dividends.
## 4. Qualitative Research
Search SEC filings/documents across multiple queries. If any search returns empty, try alternative keywords before giving up.
- **Risk factors**: Try "risk", "uncertainty", "challenge"; fallback to "adverse", "headwind"
- **Growth drivers**: Try "growth", "opportunity", "expansion"; fallback to "momentum", "strong demand"
- **Competitive dynamics**: Try "competition", "market share"; fallback to "competitive"
- **Management outlook**: Try "outlook", "guidance", "expect"; fallback to "anticipate", "forward"
- **Capital allocation**: Try "repurchase", "dividend"; fallback to "buyback", "capital return"
- **Macro/regulatory**: Try "tariff", "regulatory"; fallback to "geopolitical", "compliance"
## 5. Consensus Positioning (if available)
If consensus estimates are available (see `../data-access.md` Section 3), note:
- Where consensus revenue/EPS sits relative to your base case
- Whether the market is positioned closer to your bull or bear case
- Recent estimate revision trends (optimistic vs pessimistic drift)
If consensus data is not available, skip this section.
## 6. Construct Three Scenarios
For each scenario, build a **bottoms-up revenue model** showing key segment or product-level assumptions (e.g., units x ASP, subscribers x ARPU, segment growth rates). Don't just state a revenue range — show the math that gets there.
### Bull Case
- Identify the most favorable realistic trajectory
- Key assumptions: revenue acceleration, margin expansion, KPI improvement, favorable macro/competitive shifts
- Quantify using historical highs and growth rates as anchors
- Show segment-level build: what needs to go right in each business line
- List specific catalysts that could drive this outcome
- Consider how capital allocation (buybacks) amplifies EPS upside
### Base Case
- Extrapolate current trends forward
- Key assumptions: continuation of recent growth rates, stable margins, steady KPI progression
- This should be the "most likely" scenario grounded in the last 4-8 quarters of data
- Show segment-level build using current trend rates
- Reference historical analogs if applicable (e.g., prior product cycles, similar macro environments)
### Bear Case
- Identify realistic downside risks
- Key assumptions: revenue deceleration, margin compression, KPI deterioration, competitive/macro headwinds
- Quantify using historical lows, risk factor analysis, and specific cost headwinds from filings (e.g., tariff drag, regulatory impact)
- Show segment-level build: what breaks in each business line
- List specific risks that could drive this outcome
- Consider how capital allocation behavior changes in a downturn (buybacks may accelerate at lower prices)
### Probability Weighting
Don't default to 25/50/25. Assign probabilities informed by the most recent data points:
- If recent results are accelerating, weight bull higher
- If macro headwinds are intensifying, weight bear higher
- Explain your reasoning for the weighting
**Be honest about which scenario is most likely.** Don't default to a bullish framing or split the difference to seem balanced. If the data suggests the bear case is more probable, say so clearly. If the bull case requires multiple things to go right simultaneously, acknowledge that compounds the risk. The reader needs your honest assessment, not diplomatic equivocation.
## 7. Save Report
Save to `reports/{TICKER}_bull_bear.html` using the HTML report template from `../design-system.md`. Write the full analysis as styled HTML with the design system CSS inlined. This is the final deliverable — no intermediate markdown step needed.
The report should include:
- Company overview and current state summary
- Historical financial data table (8 quarters, Daloopa citations, including computed EBITDA/FCF)
- Trailing 4-quarter totals as the scenario baseline
- Segment and geographic revenue tables
- KPI trends table
- Capital allocation summary (buybacks, dividends, share count)
- Three scenario sections each with:
- Key assumptions (bulleted)
- Bottoms-up segment revenue build
- Implied revenue/margin/EPS trajectory
- Implied KPI trajectory
- Catalysts / risks specific to that scenario
- Probability-weighted summary with reasoning
- Key risk factors and growth drivers from filings (with document citations)
- Summary comparison table across scenarios
- Key swing factors section — the 3-5 variables that most determine which scenario plays out
All financial figures must use Daloopa citation format: `<a href="https://daloopa.com/src/{fundamental_id}">$X.XX million</a>`
Tell the user where the HTML report was saved.
Highlight: which scenario you believe is most likely and why, the key swing factors between bull and bear cases, and where you think the market is currently positioned (closer to bull, base, or bear). If the current stock price implies an overly optimistic or pessimistic scenario, flag it.
Referenced files: 1
capital-allocation9.21 KB
---
name: capital-allocation
description: Deep dive into capital deployment, buybacks, dividends, and shareholder
yield
---
Perform a deep dive into capital allocation for the company named in the user's request. If no ticker or company is provided, ask for one before proceeding.
**Before starting, read `../data-access.md` for data access methods and `../design-system.md` for formatting conventions.** Follow the data access detection logic and design system throughout this skill.
Follow these steps:
## 1. Company Lookup
Look up the company by ticker using `discover_companies`. Capture:
- `company_id`
- `latest_calendar_quarter` — anchor for all period calculations below (see `../data-access.md` Section 1.5)
- `latest_fiscal_quarter`
- Firm name for report attribution (default: "Daloopa") — see `../data-access.md` Section 4.5
## 2. Market Data
Get the current stock price, market cap, and shares outstanding for {TICKER} (see `../data-access.md` Section 2 for how to source market data in your environment).
- This is needed to compute yields and per-share metrics
If market data is unavailable, note that market-derived metrics (yields, etc.) cannot be computed and proceed with Daloopa data only.
## 3. Capital Allocation Data
Calculate 8 quarters backward from `latest_calendar_quarter`. Pull:
**Share Count & Buybacks:**
- Diluted shares outstanding
- Share repurchase amounts (dollars)
- Shares retired/repurchased (units, if available)
**Dividends:**
- Dividends per share
- Total dividend payments
- Special dividends (if any)
**Cash Flow:**
- Operating Cash Flow
- Capital Expenditures
- Free Cash Flow (compute as OCF - CapEx, label "(calc.)")
- D&A (for reference)
**Balance Sheet:**
- Cash and equivalents
- Short-term investments / marketable securities
- Total debt (short + long term)
- Net debt (compute as Total Debt - Cash - Investments, label "(calc.)")
**M&A / Investments:**
- Search for "acquisition", "purchase of business", "investment" in series
- Pull any available M&A-related series
## 4. Compute Capital Allocation Metrics
Calculate for each quarter where data is available:
**Shareholder Returns:**
- Total Buyback Amount
- Total Dividend Amount
- Total Shareholder Return = Buybacks + Dividends
- Shareholder Yield = (Buybacks + Dividends) / Market Cap (annualized)
- Buyback Yield = Buybacks / Market Cap (annualized)
- Dividend Yield = Dividends / Market Cap (annualized)
**FCF Deployment:**
- FCF Payout Ratio = Total Shareholder Return / FCF
- CapEx as % of Revenue
- CapEx as % of OCF
- FCF Margin = FCF / Revenue
**Leverage:**
- Net Debt / EBITDA (if EBITDA available; compute from Operating Income + D&A if needed)
- Net Debt / Equity
- Interest Coverage = Operating Income / Interest Expense (if available)
- Cash as % of Market Cap
**Share Count Dynamics:**
- QoQ share count change
- YoY share count change
- Implied buyback rate (QoQ % reduction)
- At current buyback rate, years to retire X% of shares
## 5. Qualitative Research
Search SEC filings for capital allocation strategy and context. Try multiple searches:
- **Buyback program**: Try "repurchase program", "share repurchase"; fallback to "buyback", "authorization"
- **Dividend policy**: Try "dividend", "capital return"; fallback to "distribution", "payout"
- **M&A strategy**: Try "acquisition", "strategic"; fallback to "purchase", "investment"
- **Capital priorities**: Try "capital allocation", "priorities"; fallback to "deploy", "balance sheet"
- **Debt management**: Try "debt", "refinance"; fallback to "leverage", "maturity"
Extract:
- Board-authorized buyback programs (remaining authorization amount)
- Dividend policy (commitment to growth, payout ratio targets)
- M&A philosophy (bolt-on vs transformational, deal pipeline commentary)
- Management's stated capital allocation framework and priorities
- Any changes in capital allocation strategy
- Direct quotes with document citations
## 6. Historical Analysis & Value Judgment
Analyze the 8-quarter trend:
- Is buyback activity accelerating or decelerating?
- Is the company buying back more shares when price is lower (disciplined) or higher (less disciplined)?
- Dividend growth rate (if applicable)
- Shift between CapEx, buybacks, dividends, and debt repayment over time
- FCF conversion trend (is more/less of OCF converting to FCF?)
**Honestly assess whether capital allocation is creating or destroying value:**
- If the company is buying back stock at all-time-high prices with deteriorating fundamentals, call it value destruction — even if EPS looks better from the lower share count.
- If the company is under-investing in CapEx or R&D to fund buybacks, flag the risk to long-term competitiveness.
- If FCF payout ratio exceeds 100%, the company is funding returns with debt or cash drawdowns — flag this as unsustainable.
- Compare the implied return from buybacks (inverse of P/E at purchase prices) to what the company could earn from organic reinvestment or M&A.
## 6.5. Reinvestment Assessment
Assess whether the company is adequately reinvesting in its business or funding returns at the expense of long-term competitiveness.
**Pull reinvestment metrics (8 quarters):**
- R&D expense (and R&D as % of revenue)
- Capital Expenditures (and CapEx as % of revenue)
- Key growth KPIs relevant to the business model (use sector taxonomy):
- **SaaS/Cloud**: ARR, net revenue retention, RPO/cRPO, customers >$100K
- **Consumer Tech**: DAU/MAU, ARPU, installed base, paid subscribers
- **E-commerce/Marketplace**: GMV, take rate, active buyers/sellers
- **Retail**: same-store sales, store count, average ticket
- **Telecom/Media**: subscribers, churn, ARPU, content spend
- **Hardware**: units shipped, ASP, attach rate
- **Financial Services**: AUM, NIM, loan growth, fee income ratio
- **Pharma/Biotech**: pipeline stage, patient starts, scripts, market share
- **Industrials/Energy**: backlog, book-to-bill, utilization, production volumes
**Assess reinvestment adequacy:**
- Is R&D/revenue trending down while buybacks are increasing? This may indicate the company is funding shareholder returns by underinvesting in innovation.
- Is CapEx/revenue declining while the business requires sustained infrastructure investment (e.g., cloud, manufacturing, stores)?
- Are growth KPIs (subscriber adds, customer growth, same-store sales) deteriorating while capital returns are at record levels? This is a red flag — the company may be harvesting rather than growing.
- Compare R&D intensity and CapEx intensity vs peers (if available from the industry or comps skills). Is the company investing more or less than competitors?
**Value creation vs extraction verdict:**
- Net assessment: Is the company's capital allocation creating long-term value (reinvesting at high ROIC, buying back cheap stock, growing dividends sustainably) or extracting value (under-investing to fund buybacks at premium valuations, leveraging up for returns)?
## 7. Save Report
Save to `reports/{TICKER}_capital_allocation.html` using the HTML report template from `../design-system.md`. Write the full analysis as styled HTML with the design system CSS inlined. This is the final deliverable — no intermediate markdown step needed.
Structure the report with these sections:
```
<h1>{Company Name} ({TICKER}) — Capital Allocation Analysis</h1>
<p>Generated: {date}</p>
<h2>Summary</h2>
{2-3 sentences: How does this company deploy its capital? Key takeaways.}
<h2>Current Snapshot</h2>
<table>
| Metric | Value |
| Market Cap | $XXX |
| Trailing 4Q FCF | $XXX |
| FCF Yield | X.X% |
| Shareholder Yield | X.X% |
| Net Debt / EBITDA | X.Xx |
| Remaining Buyback Authorization | $XXX |
</table>
<h2>Cash Flow & FCF (8 Quarters)</h2>
<table>
| Metric | Q1 | Q2 | ... | Q8 |
{OCF, CapEx, FCF, FCF Margin % — with Daloopa citations}
</table>
<h2>Share Repurchases & Dividends (8 Quarters)</h2>
<table>
| Metric | Q1 | Q2 | ... | Q8 |
{Buyback $, Dividends $, Total Return, Share Count — with Daloopa citations}
</table>
<h2>Shareholder Yield Analysis</h2>
<table>
| Metric | Q1 | Q2 | ... | Q8 |
{Buyback Yield, Div Yield, Total Yield, FCF Payout Ratio}
</table>
<h2>Leverage & Balance Sheet (8 Quarters)</h2>
<table>
| Metric | Q1 | Q2 | ... | Q8 |
{Cash, Debt, Net Debt, Net Debt/EBITDA — with Daloopa citations}
</table>
<h2>Capital Allocation Framework</h2>
{Management's stated priorities from filings, with document citations}
<h2>Reinvestment Assessment</h2>
<table>
| Metric | Q1 | Q2 | ... | Q8 |
{R&D, R&D % Rev, CapEx, CapEx % Rev, key growth KPIs — with Daloopa citations}
</table>
{Analysis: Is the company adequately reinvesting? R&D/CapEx trends vs growth KPI trends. Value creation vs extraction verdict.}
<h2>Buyback Discipline Analysis</h2>
{Analysis of buyback timing vs price, share count reduction trend, authorization remaining}
<h2>M&A Activity</h2>
{Any acquisitions from filings, deal sizes, strategic rationale}
<h2>Key Observations</h2>
<ul>{3-5 bullet points on capital allocation quality, trends, and implications}</ul>
```
All financial figures must use Daloopa citation format: `<a href="https://daloopa.com/src/{fundamental_id}">$X.XX million</a>`
Tell the user where the HTML report was saved.
Highlight the key capital allocation story (e.g., "AAPL returned $XX billion to shareholders over the last year, a X.X% shareholder yield, with buybacks accelerating").
Referenced files: 1
comps9.73 KB
---
name: comps
description: Trading comparables analysis with peer multiples and implied valuation
---
Build a trading comparables analysis for the company named in the user's request. If no ticker or company is provided, ask for one before proceeding.
**Before starting, read `../data-access.md` for data access methods and `../design-system.md` for formatting conventions.** Follow the data access detection logic and design system throughout this skill.
Follow these steps:
## 1. Company Lookup
Look up the company by ticker using `discover_companies`. Capture:
- `company_id`
- `latest_calendar_quarter` — anchor for all period calculations below (see `../data-access.md` Section 1.5)
- `latest_fiscal_quarter`
- Firm name for report attribution (default: "Daloopa") — see `../data-access.md` Section 4.5
## 2. Identify Peer Group
Based on the company's business model, sector, size, and competitive landscape, identify 5-10 comparable companies. Consider:
- **Direct competitors** in the same market
- **Business model peers** (similar revenue model even if different sector)
- **Size peers** (similar market cap range)
- **Growth profile peers** (similar growth rate)
Prioritize relevance over size matching. A direct competitor at a different scale is more useful than a similar-sized company in a different industry.
List the peer tickers and briefly justify each selection (1 sentence).
## 3. Target Company Fundamentals
Calculate 4 quarters backward from `latest_calendar_quarter`. Pull from Daloopa for the target company:
- Revenue (compute trailing 4Q total)
- EBITDA (compute trailing 4Q; if not available, use Op Income + D&A, label "(calc.)")
- Net Income (trailing 4Q)
- Diluted EPS (trailing 4Q sum)
- Free Cash Flow (trailing 4Q; compute as OCF - CapEx, label "(calc.)")
- Revenue YoY growth (most recent quarter)
- Operating Margin (most recent quarter)
- Net Margin (most recent quarter)
## 4. Stock Prices & Valuation Multiples
Use `get_stock_prices` (see `../data-access.md` Section 1.7) to pull current prices for the target AND all peers in a single batch call — pass all `company_ids` together with `dates` = 3 most recent calendar days.
Compute valuation multiples by combining stock prices with the fundamentals pulled in Sections 3 and 5:
- **Market Cap** = Close price × Diluted shares outstanding
- **Enterprise Value** = Market Cap + Total Debt - Cash (from Daloopa balance sheet if available)
- **P/E (trailing)** = Market Cap / Net Income (trailing 4Q)
- **EV/EBITDA** = EV / EBITDA (trailing 4Q)
- **P/S** = Market Cap / Revenue (trailing 4Q)
- **P/B** = Market Cap / Total Equity
- **FCF Yield** = FCF (trailing 4Q) / Market Cap
- **Dividend Yield** = Dividends Paid (trailing 4Q) / Market Cap
For beta, PEG ratio, and forward multiples, use infra scripts, consensus data, or web search (see `../data-access.md` Sections 2-3).
If a peer isn't in Daloopa (no `company_id`), fall back to `../data-access.md` Section 2 resolution order for market data. If a peer ticker fails (delisted, no data), drop it and note why.
## 5. Peer Fundamentals from Daloopa
For each peer that is available in Daloopa:
- Look up the company
- Calculate 4 quarters backward from `latest_calendar_quarter`. Pull revenue, operating income, net income for those periods.
- Compute revenue growth YoY, operating margin, net margin
For peers not in Daloopa, rely on market data multiples only (see `../data-access.md` Section 2) and note the data source limitation.
## 5.5. Peer Operational KPIs
For each company (target + all peers available in Daloopa), discover and pull company-specific operational KPIs. Use the sector taxonomy below to know what to search for:
- **SaaS/Cloud**: ARR, net revenue retention, RPO/cRPO, customers >$100K, cloud gross margin
- **Consumer Tech**: DAU/MAU, ARPU, engagement metrics, installed base, paid subscribers
- **E-commerce/Marketplace**: GMV, take rate, active buyers/sellers, order frequency
- **Retail**: same-store sales, store count, average ticket, transactions
- **Telecom/Media**: subscribers, churn, ARPU, content spend
- **Hardware**: units shipped, ASP, attach rate, installed base
- **Financial Services**: AUM, NIM, loan growth, credit quality metrics, fee income ratio
- **Pharma/Biotech**: pipeline stage, patient starts, scripts, market share
- **Industrials/Energy**: backlog, book-to-bill, utilization, production volumes, reserves
Pull the same 4 calendar quarters for each peer. Not all peers will have the same KPIs — build a sparse matrix and note which are comparable across the group vs company-specific.
Add KPI columns to the comps table in Section 6 where comparable metrics exist (e.g., subscriber growth, ARPU, units alongside P/E and EV/EBITDA). This shows whether valuation premiums are supported by operational outperformance.
## 6. Build Comps Table
Create the main comparables table with these columns:
| Company | Ticker | Mkt Cap | EV | P/E | Fwd P/E | EV/EBITDA | P/S | Rev Growth | Op Margin | Net Margin | FCF Yield |
Sort by market cap descending. Include:
- **Peer median** row
- **Peer mean** row
- **Target company** row (highlighted / separated)
- Target's percentile rank within the peer group for each metric
## 7. Implied Valuation
Apply peer group median and mean multiples to the target's fundamentals:
| Methodology | Peer Median Multiple | Target Metric | Implied Value |
|---|---|---|---|
| P/E | XX.Xx | $X.XX EPS | $XXX |
| EV/EBITDA | XX.Xx | $XXX EBITDA | $XXX |
| P/S | XX.Xx | $XXX Revenue | $XXX |
| FCF Yield | X.X% | $XXX FCF | $XXX |
For each:
- Implied Enterprise Value = Multiple × Target's Metric
- Implied Equity Value = EV - Net Debt (for EV-based multiples) or direct (for equity multiples)
- Implied Share Price = Equity Value / Shares Outstanding
Compute range (min to max implied price) and central tendency.
## 8. Consensus Forward Estimates (if available)
If consensus estimates are available (see `../data-access.md` Section 3):
- Add NTM (next twelve months) revenue and EPS estimates for target and each peer
- Compute forward P/E and forward EV/EBITDA using consensus NTM estimates
- Note where the target's forward multiples sit vs the peer group
- Flag any peers with significant estimate revision trends
If consensus data is not available, use trailing multiples only and note the limitation.
## 9. Premium/Discount Analysis
Assess whether the target trades at a premium or discount to peers:
- For each multiple, show target vs peer median as a % premium/discount
- Consider whether a premium/discount is justified based on:
- Growth differential (higher growth = deserves premium)
- Margin differential (higher margins = deserves premium)
- Market position (leader vs challenger)
- Risk profile
**Be honest about whether the premium is truly justified:**
- A company can deserve a premium and still be overvalued if the premium has stretched too far beyond fundamentals. Quantify: how much growth differential is needed to justify the current premium? Is the company delivering that?
- If the stock trades at a significant premium but growth is decelerating toward peer levels, flag the derating risk explicitly.
- Don't default to "premium is justified because it's the market leader" — that's already in the price. What justifies the premium *expanding* or *sustaining* from here?
- **Reference KPI outperformance as justification (or lack thereof).** Example: "AAPL trades at 34x P/E vs peer median 28x — premium partly justified by +14% Services growth vs peer median +8%, but Wearables decline (-2.2% YoY) is a drag peers don't have." If the target's KPIs are in line with or worse than peers, the premium is harder to defend.
## 10. Save Report
Save to `reports/{TICKER}_comps.html` using the HTML report template from `../design-system.md`. Write the full analysis as styled HTML with the design system CSS inlined. This is the final deliverable — no intermediate markdown step needed.
Structure the report with these sections:
```
<h1>{Company Name} ({TICKER}) — Comparable Companies Analysis</h1>
<p>Generated: {date}</p>
<h2>Summary</h2>
{2-3 sentences: Where does the company trade relative to peers? Is it cheap or expensive and why?}
<h2>Peer Group Selection</h2>
<table>
| Peer | Ticker | Rationale |
{table with justification for each peer}
</table>
<h2>Comparables Table</h2>
<table>
| Company | Ticker | Mkt Cap | P/E | Fwd P/E | EV/EBITDA | P/S | Rev Growth | Op Margin |
{full comps table with target highlighted}
| **Peer Median** | | | XX.Xx | XX.Xx | XX.Xx | XX.Xx | X.X% | X.X% |
| **Peer Mean** | | | XX.Xx | XX.Xx | XX.Xx | XX.Xx | X.X% | X.X% |
| **{TICKER}** | | | **XX.Xx** | **XX.Xx** | **XX.Xx** | **XX.Xx** | **X.X%** | **X.X%** |
</table>
<h2>Target vs Peer Premium/Discount</h2>
<table>
| Multiple | Target | Peer Median | Premium/Discount |
{table showing where target is rich/cheap}
</table>
<h2>Implied Valuation</h2>
<table>
| Methodology | Multiple | Target Metric | Implied Price | vs Current |
{table with implied values}
</table>
<table>
| **Valuation Range** | **Low** | **Median** | **High** |
| Implied Price | $XXX | $XXX | $XXX |
| vs Current Price | -X% | +X% | +X% |
</table>
<h2>Premium/Discount Justification</h2>
{Analysis of whether current premium/discount is warranted}
<h2>Peer Operational KPIs</h2>
<table>
| KPI | {TICKER} | Peer 1 | Peer 2 | ... | Peer Median |
{KPI comparison table — sparse where data unavailable, footnoted}
</table>
<h2>Key Observations</h2>
<ul>{3-5 bullet points on relative valuation, standout metrics, peer group dynamics, KPI differentiation}</ul>
```
All financial figures from Daloopa must use citation format: `<a href="https://daloopa.com/src/{fundamental_id}">$X.XX million</a>`
Tell the user where the HTML report was saved.
Highlight: where the stock trades relative to peers (premium/discount), the implied valuation range, and the most relevant multiple for this company.
Referenced files: 1
comp-sheet8.74 KB
---
name: comp-sheet
description: Build an industry comp sheet Excel model with deep operational KPIs
---
Build a multi-company industry comp sheet Excel model for the company named in the user's request. If no ticker or company is provided, ask for one before proceeding.
This produces an interactive `.xlsx` workbook — the kind of comp sheet every analyst on a coverage team maintains. Multi-company, multi-tab, with deep operational KPIs alongside standard financials.
**Before starting, read `../data-access.md` for data access methods and `../design-system.md` for formatting conventions.** Follow the data access detection logic and design system throughout this skill.
Follow these steps:
## 1. Company & Peer Setup
Look up the target company by ticker using `discover_companies`. Capture `company_id`, `latest_calendar_quarter` (anchor for all period calculations — see `../data-access.md` Section 1.5), and `latest_fiscal_quarter`. Note the firm name for report attribution (default: "Daloopa") — see `../data-access.md` Section 4.5.
Then identify 6-10 comparable companies using the same logic as the comps skill:
- **Direct competitors** in the same market
- **Business model peers** (similar revenue model)
- **Size peers** (similar market cap range)
- **Growth profile peers** (similar growth rate)
Look up all peer company_ids via Daloopa. If a peer isn't available in Daloopa, include it with market data only and note the limitation.
List the full peer group with brief justification for each.
## 2. Deep Data Gathering
For each company (target + all peers), pull from Daloopa:
**Calculate 8 quarters backward from `latest_calendar_quarter`. Pull financials:**
- Revenue, Gross Profit, Operating Income, Net Income, Diluted EPS
- Operating Cash Flow, Capital Expenditures, D&A
- Free Cash Flow (compute as OCF - CapEx)
- R&D Expense, SG&A (where available)
**Segment revenue breakdown** (all available segments, 8 quarters)
**Company-specific operational KPIs** — use the 9-sector taxonomy to know what to search for:
- **SaaS/Cloud**: ARR, net revenue retention, RPO/cRPO, customers >$100K, cloud gross margin
- **Consumer Tech**: DAU/MAU, ARPU, engagement metrics, installed base, paid subscribers
- **E-commerce/Marketplace**: GMV, take rate, active buyers/sellers, order frequency
- **Retail**: same-store sales, store count, average ticket, transactions
- **Telecom/Media**: subscribers, churn, ARPU, content spend
- **Hardware**: units shipped, ASP, attach rate, installed base
- **Financial Services**: AUM, NIM, loan growth, credit quality metrics, fee income ratio
- **Pharma/Biotech**: pipeline stage, patient starts, scripts, market share
- **Industrials/Energy**: backlog, book-to-bill, utilization, production volumes, reserves
**Stock prices & valuation multiples:**
Use `get_stock_prices` (see `../data-access.md` Section 1.7) to pull prices for ALL companies in a single batch call. Get:
- Current price: `dates` = 3 most recent calendar days for all company_ids
- Quarter-end prices: `dates` = quarter-end dates matching the financial periods (for historical multiples)
Then compute valuation metrics by combining stock prices with Daloopa fundamentals:
- **Market Cap** = Close price × Diluted shares outstanding
- **Enterprise Value** = Market Cap + Total Debt - Cash
- **P/E (trailing)** = Market Cap / Net Income (trailing 4Q)
- **EV/EBITDA** = EV / EBITDA (trailing 4Q)
- **P/S** = Market Cap / Revenue (trailing 4Q)
- **P/B** = Market Cap / Total Equity
- **EV/FCF** = EV / Free Cash Flow (trailing 4Q)
- **FCF Yield** = FCF (trailing 4Q) / Market Cap
- **Dividend Yield** = Dividends Paid (trailing 4Q) / Market Cap
For beta, use web search (see `../data-access.md` Section 2). For forward multiples, use consensus estimates if available (Section 3).
## 3. KPI Discovery & Mapping
After pulling data, build the KPI mapping:
- Which KPIs are available for which companies? Build a coverage matrix.
- Group KPIs into categories:
- **Segment Revenue**: product/service line breakdowns
- **Growth KPIs**: subscriber growth, unit growth, same-store sales growth
- **Unit Economics**: ARPU, ASP, take rate, retention
- **Efficiency**: R&D % of revenue, SBC % of revenue, CapEx % of revenue
- **Engagement**: DAU/MAU, retention, churn
- Flag KPIs that are comparable across peers vs company-specific
## 4. Compute Derived Metrics
For each company, calculate:
**Margins:**
- Gross Margin, Operating Margin, Net Margin, FCF Margin (each quarter)
**Growth rates:**
- Revenue YoY, EPS YoY, segment revenue YoY (each quarter where year-ago data exists)
**Capital metrics:**
- Net Debt (Total Debt - Cash)
- Net Debt/EBITDA
- Shareholder Yield (Buybacks + Dividends) / Market Cap
**Historical multiples (from quarter-end prices pulled in Section 2):**
- Compute P/E, EV/EBITDA, P/S, EV/FCF at each quarter-end to show how multiples have trended
- This lets the reader see whether the current multiple is elevated or depressed vs. the company's own history
**Implied valuation:**
- For each valuation methodology (P/E, EV/EBITDA, P/S, EV/FCF):
- Peer median multiple × target metric = implied value
- Convert to implied share price
- Compute median implied price across methodologies
## 5. Build Excel Workbook
Generate the Excel workbook directly as a local `.xlsx` file. For Codex, prefer bundled spreadsheet tooling or Python/openpyxl when available.
The workbook must contain 8 tabs with the following structure:
### Tab 1: Comp Summary
One-page overview with all companies side-by-side:
- Company name, ticker, price, market cap
- All valuation multiples (P/E, EV/EBITDA, P/S, P/B, EV/FCF, div yield)
- Latest quarter revenue, EBITDA, net income
- Growth rates (revenue YoY, EPS YoY)
- Key margins (gross, operating, net, FCF)
- Implied valuation for target (median across methodologies)
- Premium/discount vs peers
### Tab 2: Revenue Drivers
Unit economics decomposition per company (trailing 4 quarters):
- Total revenue (4Q sum)
- Segment revenue breakdown (% of total)
- Key unit economics: units × ASP, or subscribers × ARPU, etc.
- Growth trajectory by segment
### Tab 3: Operating KPIs
Cross-company KPI comparison matrix:
- Rows = KPIs (grouped by category from step 3)
- Columns = companies
- Show latest quarter value + YoY change where applicable
- Highlight cells where data is unavailable (sparse matrix)
### Tab 4: Financial Summary
Side-by-side income statements (trailing 4 quarters):
- Revenue, COGS, Gross Profit
- R&D, SG&A, Operating Income
- Interest, Tax, Net Income
- Diluted EPS
- Compute 4Q sums for each line item
### Tab 5: Growth & Margins
Trend analysis (up to 8 quarters):
- Revenue growth YoY (%)
- EPS growth YoY (%)
- Gross margin (%)
- Operating margin (%)
- Net margin (%)
- FCF margin (%)
- Show trends across all periods for each company
### Tab 6: Valuation Detail
Implied prices by methodology:
- P/E implied (peer median P/E × target EPS)
- EV/EBITDA implied
- P/S implied
- EV/FCF implied
- Median implied price
- Current price
- Premium/discount (%)
### Tab 7: Balance Sheet & Capital
Leverage and capital returns:
- Total Debt, Cash, Net Debt
- Net Debt/EBITDA
- Trailing 4Q: OCF, CapEx, FCF
- FCF Yield
- Shareholder Yield (buybacks + dividends)
### Tab 8: Raw Data
Full quarterly appendix for each company:
- All 8 quarters of financial data
- All KPIs by quarter
- All growth rates and margins by quarter
- Complete data backing the summary tabs
**Styling requirements:**
- Apply the design system color palette (Navy #1B2A4A headers, Steel Blue #4A6FA5 accents)
- Number formatting per `../design-system.md` conventions
- Bold headers, freeze panes on all tabs
- Conditional formatting: green for positive growth, red for negative
- Auto-adjust column widths
The workbook generation should:
1. Use the best available spreadsheet-generation library
2. Construct all 8 worksheets programmatically
3. Apply styling (bold headers, number formats, colors)
4. Generate the `.xlsx` file
5. Save the workbook as `reports/{TARGET_TICKER}_comp_sheet_{DATE}.xlsx`
## 6. Output Summary
After generating the Excel workbook, provide a concise summary highlighting:
**Target positioning vs peers**:
- Where does it rank on growth, margins, and valuation?
- Quartile positioning across key metrics
**Most differentiated KPIs**:
- Which operational metrics set the target apart (positive or negative)?
- Notable outliers in the KPI matrix
**Implied valuation range**:
- What does the peer group suggest the stock is worth?
- Premium/discount vs current price
- Which methodology drives the highest/lowest implied value?
**Key risk**:
- What's the biggest vulnerability the comp sheet reveals (e.g., premium valuation with decelerating KPIs, margins below peers, concentration risk)?
All financial figures in the summary must use Daloopa citation format: [$X.XX million](https://daloopa.com/src/{fundamental_id})
Referenced files: 1
dcf9.66 KB
---
name: dcf
description: Discounted cash flow valuation with sensitivity analysis
---
Build a discounted cash flow (DCF) valuation for the company named in the user's request. If no ticker or company is provided, ask for one before proceeding.
**Before starting, read `../data-access.md` for data access methods and `../design-system.md` for formatting conventions.** Follow the data access detection logic and design system throughout this skill.
Follow these steps:
## 1. Company Lookup
Look up the company by ticker using `discover_companies`. Capture:
- `company_id`
- `latest_calendar_quarter` — anchor for all period calculations below (see `../data-access.md` Section 1.5)
- `latest_fiscal_quarter`
- Firm name for report attribution (default: "Daloopa") — see `../data-access.md` Section 4.5
## 2. Market Data
Get market-side inputs for {TICKER} (see `../data-access.md` Section 2 for how to source market data in your environment):
- Current price, market cap, shares outstanding, beta
- 10Y Treasury yield (risk-free rate for WACC)
If market data is unavailable, use reasonable defaults: beta=1.0, risk-free rate=4.5%, and note the assumptions.
## 3. Historical Financials from Daloopa
Calculate 8 quarters backward from `latest_calendar_quarter`. Pull:
- Revenue
- Operating Income
- Net Income
- Diluted EPS
- Operating Cash Flow
- Capital Expenditures
- Free Cash Flow (compute as OCF - CapEx, label "(calc.)")
- Depreciation & Amortization
- Tax expense and pre-tax income (for effective tax rate)
- Interest expense (for cost of debt)
- Total debt (short + long term)
- Cash and equivalents
- Shares outstanding
Also pull segment revenue and any available guidance series.
## 4. Calculate WACC
**Cost of Equity (CAPM):**
- Risk-free rate (Rf) = 10Y Treasury from market data
- Equity risk premium (ERP) = 5.5% (standard assumption)
- Beta from market data (or 1.0 default)
- Cost of equity = Rf + Beta × ERP
**Cost of Debt:**
- If interest expense and total debt available: Cost of debt = Interest Expense / Average Total Debt
- After-tax cost of debt = Cost of debt × (1 - effective tax rate)
- If not available, use 5.0% pre-tax as default
**Capital Structure:**
- Market cap for equity weight
- Total debt for debt weight
- WACC = (E/V) × Re + (D/V) × Rd × (1-t)
Show all inputs and the resulting WACC clearly.
## 5a. KPI-Driven Revenue Build (Preferred)
Before projecting top-down, attempt a bottoms-up revenue build using operational KPIs. This produces a significantly more defensible DCF — a top-down trend decay is a guess; a bottoms-up KPI build is analysis.
**Discover segment and KPI data:**
Pull segment revenue breakdown + segment-specific KPIs for the target company. Use the sector taxonomy to know what to search for:
- **SaaS/Cloud**: ARR, net revenue retention, RPO/cRPO, customers >$100K, cloud gross margin
- **Consumer Tech**: DAU/MAU, ARPU, engagement metrics, installed base, paid subscribers
- **E-commerce/Marketplace**: GMV, take rate, active buyers/sellers, order frequency
- **Retail**: same-store sales, store count, average ticket, transactions
- **Telecom/Media**: subscribers, churn, ARPU, content spend
- **Hardware**: units shipped, ASP, attach rate, installed base
- **Financial Services**: AUM, NIM, loan growth, credit quality metrics, fee income ratio
- **Pharma/Biotech**: pipeline stage, patient starts, scripts, market share
- **Industrials/Energy**: backlog, book-to-bill, utilization, production volumes, reserves
**Build bottoms-up projections per segment:**
For each segment with KPI data, project revenue using unit economics:
- Hardware segments: projected units × projected ASP
- Subscription segments: projected subscribers × projected ARPU (net of churn)
- Marketplace segments: projected GMV × projected take rate
- Services/recurring: apply growth rate informed by retention metrics and customer adds
Sum segment projections to get total revenue for each of 5 years. Show the build clearly so the reader can challenge individual segment assumptions.
**Fall back to top-down if KPIs aren't available.** If segment KPIs are sparse or unavailable, use the top-down approach in Section 5b instead, but note explicitly that the model is less reliable without bottoms-up drivers.
## 5b. Top-Down FCF Projections (Fallback)
Build 5-year FCF projections. If a projection engine is available (see `../data-access.md` Section 5), use it. Otherwise, project manually:
- **Revenue:** Use management guidance for near-term, then decay toward 3% long-term growth
- **FCF Margin:** Use trailing average, adjust for any clear trends
- **FCF = Projected Revenue × Projected FCF Margin**
Show all assumptions clearly — this is the most judgment-intensive part. If using this fallback instead of the KPI-driven build (Section 5a), note the limitation.
## 6. Terminal Value
Calculate terminal value using perpetuity growth method:
- Terminal FCF = Year 5 FCF × (1 + terminal growth rate)
- Terminal Value = Terminal FCF / (WACC - terminal growth rate)
- Default terminal growth rate: 2.5-3.0% (should not exceed long-term GDP growth)
- Discount terminal value to present
## 7. Compute Implied Valuation
- Sum of PV of projected FCFs + PV of terminal value = Enterprise Value
- Equity Value = Enterprise Value - Net Debt
- Implied Share Price = Equity Value / Shares Outstanding
- Compare to current market price: upside/downside %
Also compute:
- Implied EV/EBITDA (Enterprise Value / Trailing EBITDA)
- Implied P/E (Equity Value / Trailing Net Income)
- Terminal value as % of total value (flag if > 80% — this means the DCF is very sensitive to terminal assumptions)
## 8. Sensitivity Analysis
Build a sensitivity table varying two key inputs:
**WACC (rows):** Base WACC ± 2% in 0.5% increments (7 rows)
**Terminal Growth Rate (columns):** 1.5% to 4.0% in 0.5% increments (6 columns)
Each cell = implied share price at that WACC/growth combination.
Highlight the base case cell and the current market price for reference.
Also show a secondary sensitivity: Revenue Growth vs FCF Margin if data supports it.
## 9. Consensus Sanity Check (if available)
If consensus estimates are available (see `../data-access.md` Section 3):
- Compare your projected revenue/EPS path to consensus for the next 1-2 years
- Note where your DCF assumptions diverge from Street expectations
- If your implied price is significantly above/below consensus target, explain why
If consensus data is not available, skip this check.
## 10. Sanity Checks & Self-Challenge
Flag any issues:
- If implied price is >2x or <0.5x current price, note that the DCF produces an extreme result and examine assumptions
- If terminal value is >85% of total value, the model is highly sensitive to terminal assumptions
- If WACC < risk-free rate or > 15%, the capital structure inputs may be off
- Compare implied multiples to historical trading range
**Challenge your own assumptions — don't anchor to the current price:**
- Build the DCF from fundamentals first, THEN compare to market price. Don't work backwards from the current price to justify assumptions.
- If your base case revenue growth assumes continuation of recent trends, stress-test: what if growth mean-reverts to the industry average? What if the current cycle peaks?
- Explicitly state what has to go right for the bull case implied price and what has to go wrong for the bear case.
- If the DCF only "works" with aggressive terminal growth or unrealistically low WACC, say so — the stock may simply be expensive on fundamentals.
## 11. Save Report
Save to `reports/{TICKER}_dcf.html` using the HTML report template from `../design-system.md`. Write the full analysis as styled HTML with the design system CSS inlined. This is the final deliverable — no intermediate markdown step needed.
Structure the report with these sections:
```
<h1>{Company Name} ({TICKER}) — DCF Valuation</h1>
<p>Generated: {date}</p>
<h2>Summary</h2>
<table>
| Metric | Value |
| Current Price | $XXX |
| Implied Share Price | $XXX |
| Upside / Downside | +X.X% / -X.X% |
| WACC | X.X% |
| Terminal Growth | X.X% |
| Terminal Value % of Total | XX% |
</table>
<h2>WACC Calculation</h2>
<table>
| Component | Value | Source |
| Risk-Free Rate | X.X% | FRED 10Y Treasury |
| Equity Risk Premium | 5.5% | Standard assumption |
| Beta | X.XX | Market data |
| Cost of Equity | X.X% | CAPM |
| Cost of Debt (after-tax) | X.X% | Interest/Debt × (1-t) |
| Equity Weight | XX% | Market cap |
| Debt Weight | XX% | Total debt |
| **WACC** | **X.X%** | |
</table>
<h2>Historical Free Cash Flow (8 Quarters)</h2>
<table>
| Metric | Q1 | Q2 | ... | Q8 |
{OCF, CapEx, FCF, FCF Margin — with Daloopa citations}
</table>
<h2>FCF Projections (5 Years)</h2>
<table>
| Metric | Year 1 | Year 2 | Year 3 | Year 4 | Year 5 |
{Revenue, FCF Margin, FCF — with assumptions noted}
</table>
<h2>Valuation Bridge</h2>
<table>
| Component | Value |
| PV of Projected FCFs | $XXX |
| PV of Terminal Value | $XXX |
| Enterprise Value | $XXX |
| Less: Net Debt | ($XXX) |
| Equity Value | $XXX |
| Shares Outstanding | XXX |
| **Implied Share Price** | **$XXX** |
</table>
<h2>Sensitivity Table: WACC vs Terminal Growth</h2>
<table>
| WACC \ Growth | 1.5% | 2.0% | 2.5% | 3.0% | 3.5% | 4.0% |
{matrix of implied share prices, base case bolded}
</table>
<p>Current market price: $XXX for reference.</p>
<h2>Key Assumptions & Risks</h2>
<ul>{List all key assumptions and what could invalidate them}</ul>
<h2>Sanity Checks</h2>
<ul>{Implied multiples vs historical, terminal value concentration, etc.}</ul>
```
All financial figures must use Daloopa citation format: `<a href="https://daloopa.com/src/{fundamental_id}">$X.XX million</a>`
Tell the user where the HTML report was saved.
Summarize: implied price vs current price, key upside/downside drivers, and the biggest sensitivity.
Referenced files: 1
earnings-flash7.53 KB
---
name: earnings-flash
description: Rapid first-read earnings flash for a given company
---
Generate a rapid earnings flash for the company specified by the user named in the user's request. If no ticker or company is provided, ask for one before proceeding.
This is a lightweight, speed-focused version of the earnings-review skill — designed for a quick first read within minutes of a filing. It pulls just enough context from Daloopa to frame BEAT/MISS verdicts, then focuses on what's new and surprising.
**Before starting, read `../data-access.md` for data access methods and `../design-system.md` for formatting conventions.** Follow the data access detection logic and design system throughout this skill.
## 1. Company Lookup
Look up the company by ticker using `discover_companies`. Capture:
- `company_id`
- `latest_calendar_quarter` — anchor for all period calculations (see `../data-access.md` Section 1.5)
- `latest_fiscal_quarter`
- Firm name for report attribution (default: "Daloopa") — see `../data-access.md` Section 4.5
## 2. Prior Quarter Context (4 Quarters)
Calculate 4 quarters backward from `latest_calendar_quarter`. Search for and pull these core metrics:
**Income Statement:**
- Revenue / Net Sales
- Gross Profit
- Operating Income / EBIT
- Net Income
- Diluted EPS
**Cash Flow:**
- Operating Cash Flow
- Free Cash Flow (or CapEx to compute it)
This is lighter than the earnings-review skill (4Q vs 8Q, no cost structure breakdown). The goal is just enough history to frame the latest quarter's results — not a full trend analysis.
## 3. Company-Specific KPIs
Think about the 3-5 most important KPIs for THIS company based on its business model. Search for those specific KPIs and pull for the same 4-quarter period. Also search for:
- Segment/product revenue breakdown
- Geographic revenue breakdown (if material)
Keep this targeted — discover the critical operating metrics, not everything available.
## 4. Guidance Series
Search for guidance series (revenue guidance, EPS guidance, margin guidance, any KPI guidance). If available, pull guidance data for the latest 2 quarters so you can compare the most recent actual results against what management guided.
CRITICAL: Apply +1 quarter offset — guidance from Q(N) applies to Q(N+1) results.
## 5. Get the Earnings Document
Use `search_documents` to find the most recent earnings-related filing. Search strategy:
1. Search for keywords `["results", "earnings"]` in the latest 1-2 calendar quarters
2. If that returns nothing, try `["revenue"]` or `["financial"]` as broader terms
Read the document content from the search results. Focus on:
- **Earnings transcripts**: Full document (management commentary, prepared remarks, Q&A)
- **10-Q / 10-K**: Financial statements and MD&A sections
- **8-K**: Full document (short event-driven filings)
If no document is found, proceed with the MCP fundamentals data only and note "No earnings document found — analysis based on financial data only."
## 5b. Stock Price Context
Get the current stock price using `get_stock_prices` (see `../data-access.md` Section 1.7) — pass `company_id` and `dates` for the 3 most recent calendar days. Also pull prices around the earnings date (1 day before to 3 days after the `latest_calendar_quarter` end + ~30-45 days) to compute the post-earnings reaction. Include the next-day move percentage in the Executive Flash section.
## 6. Executive Flash
Write 3-5 bullet-point verdicts. Each bullet MUST compare the latest quarter's results against prior periods from Step 2 and/or guidance from Step 4. Format:
**[BEAT/MISS/INLINE/MIXED] | Key number (YoY change) | One-sentence context**
Examples:
- **BEAT | Revenue $95.4bn (+6.1% YoY) | Acceleration from +4.8% last quarter driven by iPhone 16 cycle**
- **MISS | EPS $1.46 vs $1.52 prior year | Higher opex from AI investments weighed on margins**
- **GUIDANCE UP | FY2026 revenue guided $400-405bn | Management raised full-year outlook on cloud strength**
Use Daloopa citation links for all figures sourced from MCP. Use "(per filing)" for figures only found in the document.
Also include a one-line **Management Tone** assessment (confident/cautious/defensive/evasive/optimistic) if an earnings document was available. Support with specific language from the document.
## 7. Key Numbers Table
Present the latest quarter's results with comparison context:
| Metric | Latest Quarter | Prior Quarter | YoY Change | vs Guidance |
|--------|---------------|---------------|------------|-------------|
Include: revenue, EPS, margins, segment breakdowns, KPIs — all sourced from MCP with Daloopa citation links. Add a "vs Guidance" column if guidance data was available from Step 4 (show beat/miss amount).
Group by category: P&L, Segments, KPIs, Cash Flow.
For figures only available from the document (not in MCP), include them in a separate "Per Filing" sub-section below the table and note they are not cross-referenced.
## 8. Guidance & Outlook
Extract forward-looking statements from the earnings document (if available):
- Explicit numerical guidance (revenue, EPS, margin ranges)
- Changes from prior guidance (raised, lowered, narrowed, withdrawn)
- Qualitative outlook language
- Capex/investment plans
If guidance data was pulled from Daloopa in Step 4, compare new guidance against prior guidance with a table:
| Metric | New Guidance | Prior Guidance | Change |
|--------|-------------|---------------|--------|
If no document was found, summarize any guidance series data from Step 4 and note that no new guidance language is available.
## 9. Risk Flags
Call out concerning signals — this section should be sharp and skeptical:
- Guidance cuts or narrowing
- Missing disclosures or metrics that were previously reported
- Growing gap between GAAP and non-GAAP
- Cash flow divergence from earnings
- One-time items that flatter the headline numbers
- Management hedging or qualifying language (from document)
If no material risk flags, say so clearly: "No material risk flags identified."
## 10. Quick Read-Throughs
Write 2-3 bullets on what this filing implies for adjacent companies:
- **Suppliers**: Positive or negative signal for key input providers
- **Customers**: Demand signal for downstream buyers
- **Competitors**: Share shift, pricing, or market growth implications
Format: `**[COMPANY/SECTOR]**: [implication] (based on [specific data point])`
## 11. Save Report
Save the HTML report to: `reports/{TICKER}_earnings_flash_{PERIOD}.html` (where PERIOD is the latest calendar quarter analyzed).
Use the design-system HTML template from `../design-system.md`. Include all CSS inlined.
Add a **FLASH** banner at the top of the report. Insert this right after the opening `<body>` tag, before the `<h1>`:
```html
<div style="background: #C0392B; color: white; text-align: center; padding: 8px 16px; font-size: 14px; font-weight: bold; letter-spacing: 2px; margin-bottom: 16px;">
EARNINGS FLASH — FIRST READ
</div>
```
The `<h1>` should be: `{TICKER} Earnings Flash — {PERIOD}`
Add a disclaimer after the flash banner:
```html
<p style="font-size: 10px; color: #6C757D; font-style: italic; margin-bottom: 16px;">
This is a rapid first-read summary. For full analysis with 8-quarter trends, cost structure,
and competitive read-throughs, run the earnings-review skill for {TICKER}.
</p>
```
Replace `{FIRM_NAME}` in the footer — see `../data-access.md` Section 4.5.
All financial figures from Daloopa must use citation format: `<a href="https://daloopa.com/src/{fundamental_id}">$X.XX million</a>`
Tell the user where the HTML report was saved and highlight the 2-3 most notable findings.
Referenced files: 1
earnings-prep16.7 KB
---
name: earnings-prep
description: Pre-earnings preparation report for the night before a company reports
---
Generate a pre-earnings preparation report for the company specified by the user named in the user's request. If no ticker or company is provided, ask for one before proceeding.
This is the note a L/S equity analyst reads the night before a company reports — it tells them exactly what to focus on when the print drops.
**Before starting, read `../data-access.md` for data access methods and `../design-system.md` for formatting conventions.** Follow the data access detection logic and design system throughout this skill.
Follow these steps:
## 1. Company Lookup
Look up the company by ticker using `discover_companies`. Capture:
- `company_id`
- `latest_calendar_quarter` — anchor for all period calculations below (see `../data-access.md` Section 1.5)
- `latest_fiscal_quarter`
- Firm name for report attribution (default: "Daloopa") — see `../data-access.md` Section 4.5
Determine the **upcoming quarter** — the one AFTER `latest_calendar_quarter`. This is the quarter the company is about to report. All analysis is oriented around preparing the analyst for this print.
## 2. Last Quarter Recap
Pull the most recent quarter's full financials from Daloopa. Calculate 4 quarters backward from `latest_calendar_quarter` (for YoY context).
**Pull:**
- Revenue, Gross Profit, Operating Income, EBITDA, Net Income, Diluted EPS
- Operating Cash Flow, CapEx, FCF (calc.)
- Segment/product revenue breakdown
- Company-specific KPIs (use the business-model taxonomy: SaaS → ARR/NRR/RPO; Consumer → DAU/ARPU; E-commerce → GMV/take rate; etc.)
**Summarize the story of last quarter in 3-5 bullets:**
- What beat expectations (guidance or consensus)?
- What missed or disappointed?
- What was the stock reaction? (use `get_stock_prices` per `../data-access.md` Section 1.7 to get the actual next-day move; supplement with WebSearch for narrative context if needed)
- What narrative emerged from the call? (e.g., "AI monetization acceleration," "margin expansion story intact," "consumer weakness")
- What was the single most debated metric?
This is the baseline everyone on the upcoming call will be anchoring to.
## 3. Outstanding Guidance for Upcoming Quarter
Search for ALL guidance series using keywords: "guidance", "outlook", "estimate", "forecast", "target". Apply the +1 quarter offset to identify which guidance applies to the upcoming print:
- CRITICAL: Guidance from Q(N) earnings call applies to Q(N+1) results
- The guidance issued during the `latest_calendar_quarter` earnings call is what applies to the upcoming quarter
**Pull and present:**
- Revenue guidance (point estimate or range)
- EPS guidance
- Margin guidance (gross, operating, EBITDA)
- CapEx guidance
- Segment-level guidance (if available)
- KPI guidance (subscriber adds, unit volumes, ARPU targets, etc.)
**Search filings for directional/qualitative guidance:**
- Search documents for: "expect", "anticipate", "similar to", "consistent with"
- Search documents for: "low single digit", "mid single digit", "double digit", "sequential"
- Search documents for: "headwind", "tailwind", "conservatively", "assumes"
- Capture exact management quotes with document citations
**Flag any guidance updates between quarters:**
- Search for "pre-announce", "update", "revise" in the most recent quarter's filings
- Check if the company issued an 8-K updating guidance after the last earnings call
Present all guidance in a single table: Metric | Guidance Value | Source Quarter | Type (Quantitative/Directional).
## 4. Guidance Credibility & Whisper Number
This section MUST be built entirely from Daloopa data — guidance series AND actual result series pulled via `get_company_fundamentals`. Do not use web search or estimates for this analysis.
**Step 1: Pull 8 quarters of guidance data.**
You already discovered guidance series in Section 3. Now pull ALL of those guidance series for the last 8 quarters (from `latest_calendar_quarter` backward). These are the guidance values management provided each quarter.
**Step 2: Pull 8 quarters of corresponding actuals.**
For every guided metric, identify the corresponding actual result series (e.g., if there is a "Revenue guidance" series, pull the actual "Revenue" series). Pull these actuals for the same 8-quarter period.
**Step 3: Build the complete beat/miss table.**
Apply the +1 quarter offset: guidance from Q(N) is compared to the actual result in Q(N+1). For EVERY quarter where both a guidance value and a corresponding actual exist, compute:
- Guidance value (midpoint if range)
- Actual value
- Delta (Actual - Guidance midpoint)
- Beat/Miss % ((Actual - Guidance midpoint) / |Guidance midpoint| × 100)
- Classification: Beat / In-line / Miss (use +/-1% threshold for in-line)
**Present a FULL detail table — every quarter, every guided metric.** This is the core analytical engine of the whisper number. Do not summarize or abbreviate — show all rows. Format:
| Guidance Source Qtr | Metric | Guidance (Mid) | Actual Qtr | Actual | Delta | Beat/Miss % |
If a company provides range guidance (low/high), show the midpoint and note the range width. If a company only provides directional guidance for some metrics (e.g., "revenue growth in low teens"), convert to an implied numeric value for comparison (e.g., 12-13% → midpoint ~12.5% applied to prior year actual).
**Step 4: Compute summary statistics from the detail table:**
- Beat rate per metric (% of quarters where actual > guidance midpoint)
- Average beat magnitude per metric (in absolute terms and %)
- Beat pattern trend: is the beat getting larger (sandbagging increasing), shrinking (guidance getting more accurate), or volatile? Look at the last 4 vs. prior 4.
- Range width trend: is management tightening or widening guidance ranges?
**Step 5: Calculate the implied "whisper number":**
- Whisper = Current guidance midpoint + Average historical beat (from the detail table above)
- This is the REAL bar the stock is trading against, not the stated guidance
- If the company beats by 2% on average, the market expects a 2% beat — an in-line result to guidance is effectively a miss
- Calculate whisper for EVERY guided metric, not just revenue
**Present the whisper summary:**
| Metric | Current Guidance (Mid) | Avg Historical Beat | Implied Whisper | Beat Rate (n/N) |
**Credibility verdict:** Is management's guidance informative (tight, accurate) or performative (always sandbagged, uninformative)? If the beat rate is >90%, say so — it means the guidance number is a floor, not a forecast. If the beat magnitude is increasing, management is becoming MORE conservative over time.
## 5. Peer & Adjacent Company Read-Throughs
This is the most differentiated section. For companies in the same sector that have ALREADY reported this earnings season, their results contain direct signal about the upcoming print.
**Identify the read-through universe (aim for 5-8 companies):**
- **Competitors**: Direct rivals in the same market
- **Suppliers**: Companies that sell to the target company
- **Customers**: Companies that buy from the target company
- **Industry bellwethers**: Large companies whose results signal sector trends
**CRITICAL: Always use Daloopa as the primary data source for peer analysis.** For each peer:
1. **Look up the peer in Daloopa:** `discover_companies` with the peer's ticker. If Daloopa has the company, check `latest_calendar_quarter` to determine whether they have already reported the relevant quarter.
2. **If the peer has data for the current earnings season quarter:** Pull their financials from Daloopa (`discover_company_series` → `get_company_fundamentals`). Focus on 2-4 metrics most relevant to the read-through (e.g., for a supplier: revenue, segment breakdown, inventory; for a competitor: revenue growth, market share proxies, pricing commentary).
3. **Search the peer's filings in Daloopa:** `search_documents` with keywords related to the target company's products, markets, or industry (e.g., for an Apple supplier, search for "Apple", "smartphone", "consumer electronics").
4. **Use WebSearch only to supplement Daloopa data** — for earnings-season timing confirmation, stock price reactions, or analyst commentary that Daloopa filings don't cover.
**For each read-through, extract (with Daloopa citations):**
1. **The specific data point** — the peer's metric that creates signal. Cite the Daloopa `fundamental_id`.
2. **The implication** — bullish or bearish for the target company, and why
3. **Confidence level** — High (direct disclosed relationship), Moderate (inferred from industry), Low (circumstantial)
**For peers that haven't reported yet:** Note them as "reports after {TICKER}" — their results will be a read-through in the opposite direction.
**Group read-throughs by:**
- **Competitors** — share shift signals, pricing environment, demand trends
- **Suppliers** — order book signals, inventory levels, capacity commentary
- **Customers** — demand signals, inventory destocking/restocking, spending priorities
- **Industry Bellwethers** — macro/sector health, end-market demand
**Web research for sector context (supplementary only — after Daloopa pulls):**
- Search: `"{TICKER} sector earnings season {year} read through"` — analyst commentary on cross-company signals
- Search: `"{TICKER} competitors results {upcoming_quarter_label} {year}"` — what peers have already signaled
## 6. Key Metrics to Watch
Identify the 5-7 metrics the analyst should focus on when the print drops. For each metric:
| Metric | Current Level | Guidance/Expected | Bullish Threshold | Bearish Threshold | Why It Matters |
**Be specific with thresholds** — not "revenue growth" but "revenue above $95B signals iPhone cycle acceleration; below $92B confirms China weakness." Not "margins" but "gross margin above 47% confirms services mix shift; below 45% signals hardware pricing pressure."
**Prioritize by information value:**
1. Metrics where guidance has been vague or directional (highest uncertainty)
2. Metrics where peer read-throughs are conflicting (the print will resolve the debate)
3. Metrics that drive the forward multiple (the ones the market will re-rate on)
4. KPIs that lead revenue by 1-2 quarters (predictive of next quarter's financials)
## 7. Consensus & Positioning
Gather available consensus context:
**From data sources (consensus estimates if available per `../data-access.md` Section 3):**
- Consensus revenue and EPS for the upcoming quarter
- Number of analysts at Buy / Hold / Sell
- Consensus price target (median and range)
- Recent estimate revision trends (last 30/60/90 days — moving up or down?)
**From web search (supplement or replace if consensus data unavailable):**
- Search: `"{TICKER} earnings preview consensus estimates {upcoming_quarter_label} {year}"` — sell-side previews
- Search: `"{TICKER} analyst expectations {year}"` — positioning and sentiment
**Note limitations** if consensus data is not directly available. Even directional context ("estimates have been revised up 3% over the last 90 days") is valuable.
## 8. Historical Earnings Reaction
**Stock price data (from Daloopa):**
Use `get_stock_prices` (see `../data-access.md` Section 1.7) to get actual post-earnings price moves for the last 4-6 earnings prints. For each historical earnings date, pull prices for a window: `start_date` = 1 trading day before earnings, `end_date` = 3-5 trading days after. Compute:
- Next-day move (pre-earnings close → post-earnings close)
- 3-day drift (post-earnings close → 3 days later)
To estimate historical earnings dates, use the quarter-end date + ~30-45 days as an approximation, or use WebSearch to confirm exact dates if needed.
Also pull the current stock price (3 most recent calendar days) for the report header.
**Supplement with web search for options context:**
- Search: `"{TICKER} options implied move earnings {upcoming_quarter_label}"` — current implied volatility
**Present as a table:**
| Quarter | Revenue Beat/Miss | EPS Beat/Miss | Next-Day Move | 3-Day Drift | Notes |
Populate the Revenue/EPS Beat/Miss columns from the guidance credibility analysis in Section 4. The price move columns come from `get_stock_prices`.
**Pattern identification:**
- Does the stock tend to sell off on beats? (buy-the-rumor, sell-the-news pattern)
- Does it rally on in-line results? (low expectations already embedded)
- Is there a pattern of post-earnings drift (continued move in the days after)?
- What's the current implied move from the options market? If it's elevated vs. history, the market expects a big move.
## 9. Macro & Sector Backdrop
Web search for developments since last quarter that could affect results:
- Search: `"{TICKER} {industry} outlook {current_year}"` — sector developments
- Search: `"{TICKER} headwinds tailwinds {current_year}"` — company-specific macro factors
**Distill into 5-8 bullets, each with a directional tag (Positive / Negative / Uncertain):**
- Industry-specific: new regulations, competitor product launches, market share shifts
- Macro: FX moves (specify currencies and direction), commodity prices, interest rates
- Policy: tariffs, trade restrictions, tax changes
- Channel: inventory levels in the channel, distributor commentary, supply chain status
- Company-specific: product launches since last quarter, management changes, M&A
Keep each bullet to one sentence. The analyst needs context, not a macro essay.
## 10. Potential Surprises & Call Catalysts
Beyond the numbers, what could management announce that would move the stock? Search filings and news for signals:
- Search documents: "restructuring", "acquisition", "buyback", "dividend" in recent filings
- Search: `"{TICKER} potential announcement catalyst {year}"` — speculative but grounded
**Categories:**
- **Capital allocation**: New buyback authorization, dividend change (hike/cut/initiation), M&A announcement, asset sale/spinoff
- **Operational**: Restructuring/layoffs, new product launch, partnership/contract win, segment reporting changes
- **Strategic**: New guidance metrics, long-term targets update, management changes, investor day announcement
- **Accounting/Disclosure**: Guidance methodology change, segment redefinition, one-time charge pre-announcement
For each potential surprise, note the signal strength (rumored / speculated / no signal) and the likely stock impact direction.
## 11. Pre-Earnings Checklist
A concise, actionable summary that fits on a single card. This is what the analyst tapes to their monitor:
**The Numbers:**
- Revenue whisper: $X.XX (guidance: $X.XX, avg beat: +X.X%)
- EPS whisper: $X.XX (guidance: $X.XX, avg beat: +X.X%)
**Top 3 Metrics to Watch:**
1. [Metric] — current: X, bull: >Y, bear: <Z
2. [Metric] — current: X, bull: >Y, bear: <Z
3. [Metric] — current: X, bull: >Y, bear: <Z
**The Bull Catalyst:** What would make this stock go up 5%+ after the print? (one sentence)
**The Bear Risk:** What would make this stock go down 5%+ after the print? (one sentence)
**Read-Through Signal:** After this company reports, what does it mean for [2-3 other names]?
**Historical Pattern:** Last 4 prints averaged +/-X% next-day move; options imply +/-X% this time.
## 12. Save Report
Save to `reports/{TICKER}_earnings_prep_{UPCOMING_CQ}.html` (e.g., `AAPL_earnings_prep_2026Q1.html`) using the HTML report template from `../design-system.md`. The period in the filename is the **upcoming calendar quarter** being prepped for — the one AFTER `latest_calendar_quarter`. Write the full analysis as styled HTML with the design system CSS inlined. This is the final deliverable — no intermediate markdown step needed.
The report should include:
- Executive summary (2-3 sentences: what quarter is coming, what the key debate is, what the whisper number implies)
- Last quarter recap (story + key metrics table)
- Outstanding guidance table with source citations
- Whisper number calculation with historical beat/miss detail table
- Peer read-throughs (grouped by Competitors / Suppliers / Customers / Industry, with Daloopa citations on peer data)
- Key metrics to watch (table with specific thresholds)
- Consensus & positioning summary
- Historical earnings reaction table
- Macro & sector backdrop (bulleted list with directional tags)
- Potential surprises & call catalysts
- Pre-earnings checklist (prominently styled — this is the payoff of the whole report)
All financial figures must use Daloopa citation format: `<a href="https://daloopa.com/src/{fundamental_id}">$X.XX million</a>`
Tell the user where the HTML report was saved.
Highlight what makes this print particularly interesting: Is the whisper number meaningfully above guidance (setting up for disappointment even on a beat)? Are peer read-throughs conflicting (creating genuine uncertainty)? Is there a potential surprise catalyst that could overshadow the numbers? Give the analyst the single most important thing to watch.
Referenced files: 1
earnings-review15.4 KB
---
name: earnings-review
description: Full earnings analysis with guidance tracking for a given company
---
Perform a comprehensive earnings analysis for the company named in the user's request. If no ticker or company is provided, ask for one before proceeding.
**Before starting, read `../data-access.md` for data access methods and `../design-system.md` for formatting conventions.** Follow the data access detection logic and design system throughout this skill.
Follow these steps:
## 1. Company Lookup
Look up the company by ticker using `discover_companies`. Capture:
- `company_id`
- `latest_calendar_quarter` — anchor for all period calculations below (see `../data-access.md` Section 1.5)
- `latest_fiscal_quarter`
- Firm name for report attribution (default: "Daloopa") — see `../data-access.md` Section 4.5
## 2. Core Financial Metrics
Calculate 8 quarters backward from `latest_calendar_quarter`. Search for these metrics, then pull:
**Income Statement:**
- Revenue / Net Sales
- Gross Profit
- Operating Income / EBIT
- EBITDA (if not reported, compute as Operating Income + D&A — label it "EBITDA (calc.)")
- Net Income
- Diluted EPS
- Operating Expenses (SG&A, R&D where available)
**Cash Flow & Balance Sheet:**
- Operating Cash Flow
- CapEx (Purchases of property, plant and equipment)
- Free Cash Flow (compute as Operating Cash Flow - CapEx — label it "FCF (calc.)")
- D&A (needed for EBITDA calc if not directly reported)
For any derived/computed metric, mark it with "(calc.)" so the reader knows it's not directly sourced.
Flag any one-time items that distort a quarter (e.g., tax charges, impairments, litigation settlements) with a footnote so YoY comparisons aren't misleading.
## 3. Company-Specific KPIs
First, think about what the most important KPIs are for THIS specific company based on its business model and what drives its valuation. For example:
- **SaaS/cloud**: ARR, net revenue retention, RPO/cRPO, customers >$100K
- **Consumer tech**: DAU/MAU, ARPU, engagement metrics, installed base, paid subscribers
- **E-commerce/marketplace**: GMV, take rate, active buyers/sellers, order frequency
- **Retail**: same-store sales, store count, average ticket, transactions
- **Telecom/media**: subscribers, churn, ARPU, content spend
- **Hardware**: units shipped, ASP, attach rate
- **Financial services**: AUM, NIM, loan growth, credit quality metrics
- **Pharma/biotech**: pipeline stage, patient starts, scripts, market share
Then search for those specific KPIs by name, plus cast a wider net for anything else available. Also search for:
- Segment/product revenue breakdown
- Geographic revenue breakdown
Pull for the same 8-quarter period. If some KPIs only have data for recent quarters, include what's available and note the gap.
## 4. Growth & Margins
Calculate and present:
- YoY revenue growth for each of the last 4 quarters (not just one)
- Gross margin, operating margin, EBITDA margin, net margin trends over 8 quarters
- EPS growth YoY for each of the last 4 quarters
- Segment revenue YoY growth for the most recent quarter
- Geographic revenue YoY growth for the most recent quarter
- KPI growth rates where applicable
If the company has strong seasonality (e.g., retail Q4 holiday, back-to-school, cyclical patterns), add a note so the reader interprets QoQ swings correctly.
## 4.5. Cost Structure & Margin Drivers
Decompose what's driving margin trends. This turns the margin table from Section 4 into an analytical narrative.
**COGS Analysis:**
- Pull product COGS and services COGS (or equivalent cost breakdown) if available
- Identify the 3-5 biggest cost line items and their YoY trends
- Is COGS growing faster or slower than revenue? If slower, what's driving the efficiency — input costs, mix shift, pricing power, or scale leverage?
**OpEx Breakdown:**
- Pull R&D and SG&A separately for the last 8 quarters
- Compute R&D % of revenue and SG&A % of revenue trends
- Is the company investing more in R&D (growth mode) or cutting SG&A (efficiency mode)? Both? Neither?
- Flag any quarter where OpEx growth materially exceeds revenue growth — that's operating deleverage
**Margin Driver Synthesis:**
For each major margin (gross, operating, net), write 1-2 sentences identifying what's driving expansion or compression:
- Pricing power vs cost inflation
- Mix shift (higher-margin products/services growing faster)
- Scale leverage vs investment spending
- One-time items distorting the trend
- FX impact if material
Include this as a commentary block after the margins table in the report. Cite specific Daloopa figures.
## 5. Guidance vs Actuals
Search for guidance series (revenue guidance, EPS guidance, margin guidance, OpEx guidance, any KPI guidance). If available:
- Pull guidance and actual results
- CRITICAL: Apply +1 quarter offset — guidance from Q(N) applies to Q(N+1) results
- Calculate beat/miss amounts and percentages
- Note patterns (consistent beats, narrows, etc.)
- If the company provides directional guidance (e.g., "low-to-mid-teens growth") rather than hard numbers, note this and compare against the actual growth rate
If no formal guidance series exist, note that the company does not provide quantitative guidance.
## 6. Consensus Context (if available)
If consensus estimates are available (see `../data-access.md` Section 3), add:
- Consensus revenue and EPS vs actual results — beat/miss vs Street
- Estimate revision trends (are estimates moving up or down?)
- Note the source of consensus data used
If consensus data is not available, skip this section and note "consensus data not available."
## 7. Management Commentary
Search SEC filings/documents for management commentary. Try multiple searches to get broad coverage:
- First search: "results" or "record" for earnings highlights
- Second search: "outlook" or "guidance" for forward-looking commentary
- Third search: strategy-specific terms relevant to the company (e.g., "AI", "cloud", "subscribers")
- If a search returns empty, try broader single-keyword searches before giving up
Extract:
- Earnings results and key drivers
- Forward outlook and guidance language
- Segment performance highlights
- Any notable call-outs (one-time items, macro commentary, strategic updates)
- Direct management quotes where available (with document citations)
## 7.5. News Context & Stock Reaction
**Stock price reaction (from Daloopa):**
Use `get_stock_prices` (see `../data-access.md` Section 1.7) to get the actual post-earnings price move. Pull prices for a window around the earnings date: `start_date` = 1 trading day before the likely earnings date (estimate from the `latest_calendar_quarter` end + ~30-45 days), `end_date` = 3 trading days after. Compute the next-day percentage change from the pre-earnings close to the post-earnings close. This gives you the hard number for "how did the stock react."
Also pull the current stock price (3 most recent calendar days) so the report includes where the stock trades NOW relative to the post-earnings reaction.
**Web search for context:**
Run 2 WebSearch queries to add external context around the earnings:
1. `"{TICKER} {company_name} earnings {latest_quarter} {year}"` — coverage and analyst reactions
2. `"{TICKER} analyst price target {year}"` — sell-side sentiment
Distill into a brief **Earnings Context** block (3-5 bullet points):
- How did the stock react to earnings? (use the actual price data from `get_stock_prices`, not just search results)
- What were the key analyst takeaways or debates?
- Any price target changes or rating changes post-earnings?
- Any macro/industry context that affected the quarter?
Keep this concise — it supplements the Daloopa data with market reaction context. Include it as a short section in the report before the Forward Outlook.
## 7.6. Forward Outlook & Revenue Drivers
Synthesize the backward-looking data into a forward-looking view. This section turns the earnings analysis from "what happened" into "what it means for the future."
**Forward Guidance Analysis:**
- What is management guiding for NEXT quarter and/or full year? Extract specific numbers (revenue range, EPS range, margin targets, CapEx plans).
- Is the guide conservative or aggressive? Compare to: (a) the company's historical beat rate from Section 5, (b) the current run rate extrapolated forward, (c) consensus if available. A company that beats by 3% every quarter and guides flat is sandbagging; a company that guides for acceleration after 3 quarters of deceleration is aggressive.
- How does forward guidance compare to trailing trends? If revenue grew +8% YoY last quarter and guidance implies +5%, is management signaling deceleration or being conservative?
**Revenue Driver Decomposition:**
- Break down what's driving growth: volume vs price vs mix. Which segments are contributing vs dragging?
- For each major segment, identify the unit economics driver: units x ASP, subscribers x ARPU, GMV x take rate, etc.
- What has to happen for current growth rates to sustain? If growth is coming from price increases, is there a ceiling? If from volume, is the TAM expanding or saturating?
**KPI Trajectory Implications:**
- Connect KPI trends to revenue outlook. If subscriber growth is decelerating, what does that imply for next quarter's revenue? If ASPs are rising but units are flat, is that sustainable?
- If backlog/RPO/deferred revenue is building, when does it convert to recognized revenue? If it's declining, that's a leading indicator of future revenue pressure.
- Flag any KPI-to-revenue divergences (e.g., user growth accelerating but ARPU declining — net effect on revenue?)
**Trend Synthesis:**
- Looking at the last 4-8 quarters holistically — is this company accelerating, decelerating, or at a plateau?
- What's the single most important metric to watch next quarter? Why?
- Are operating KPIs leading or lagging the financial results?
**Risks to the Forward View:**
- What could go wrong with the guidance? What assumptions are embedded that could break?
- Identify the 2-3 biggest risks to the forward trajectory: competitive threats, macro sensitivity, product cycle dependency, regulatory risk, customer concentration.
- If the bull case requires multiple things to go right simultaneously, flag that explicitly.
## 7.7. Read-Throughs & Competitive Implications
This is one of the most valuable sections of the report. Every company's earnings contain signal about adjacent companies — suppliers, customers, competitors, and the broader industry. An analyst covering a sector doesn't just read one company's print; they read it for what it says about every other name in their portfolio.
**Identify the Read-Through Universe:**
Think about who is most affected by this company's results. Consider:
- **Suppliers**: If this company's revenue/COGS/CapEx changed materially, which suppliers feel it? (e.g., AAPL iPhone strength → TSMC, Broadcom, Corning benefit; AAPL CapEx guidance up → supplier order books filling)
- **Customers**: If this company is a major input to others, what do its pricing/volume trends imply? (e.g., TSMC price increases → margin pressure for AAPL, AMD, NVDA)
- **Direct competitors**: How does this quarter compare to what peers have reported or guided? Is this company gaining or losing share? (e.g., MSFT cloud growth accelerating while AMZN AWS decelerates → share shift)
- **Indirect competitors / substitutes**: Any signals about demand shifting between categories? (e.g., strong enterprise software spend → weak services/consulting spend)
- **Industry bellwether signals**: If this is a large company, what do its results say about the macro/sector? (e.g., consumer discretionary weakness at WMT → read-through to all retail)
**For each read-through (aim for 5-8), state:**
1. **The affected company** (ticker + name)
2. **The specific data point** from this earnings that creates the read-through — cite the Daloopa figure
3. **The implication** — bullish or bearish for the adjacent company, and why
4. **Confidence level** — is this a direct/disclosed relationship (high confidence) or an inferred/estimated one (moderate)?
**Example read-throughs:**
- "AAPL Services revenue grew +14% YoY to $26.3B → **Positive for APP (AppLovin)**: Apple's App Store is a major distribution channel; growing Services revenue confirms healthy app ecosystem spending. **Negative for GOOG**: AAPL's growing services monetization strengthens their negotiating leverage on the Google TAC agreement."
- "TSMC guided CapEx up 25% YoY → **Positive for ASML, AMAT, LRCX, KLAC**: equipment spend is the most direct read-through to semicap names. ASML in particular given EUV concentration."
- "NFLX added 19M subscribers vs 13M expected → **Negative for DIS, WBD, PARA**: In a zero-sum attention economy, NFLX's accelerating sub growth likely came partly at the expense of other streamers."
**Sequencing context:**
- Note whether this company reported before or after its peers this earnings season. If it's early in the cycle, the read-throughs are forward-looking predictions. If it's late, compare against what peers already reported — confirm or contradict the emerging narrative.
- If a peer has already reported, note any divergence: "MSFT reported cloud growth of +29% last week; today's AMZN AWS at +19% confirms the share shift narrative."
**Web research for validation:**
Run 1-2 targeted searches to validate read-throughs:
- `"{TICKER} earnings read through implications {year}"` — analyst commentary on cross-company signals
- `"{TICKER} {peer_ticker} competitive positioning {year}"` — specific competitive dynamics
Present as a structured list in the report, grouped by relationship type (Suppliers / Customers / Competitors / Industry). Each read-through should be a concise 2-3 sentence paragraph with the data citation, the affected name, and the implication.
## 8. Save Report
Save to `reports/{TICKER}_earnings_{PERIOD}.html` (where PERIOD is the most recent quarter analyzed) using the HTML report template from `../design-system.md`. Write the full analysis as styled HTML with the design system CSS inlined. This is the final deliverable — no intermediate markdown step needed.
The report should include:
- Executive summary (2-3 sentence overview of the quarter + 2-3 most notable findings)
- Core financial metrics table (8 quarters, periods as columns, metrics as rows, including FCF)
- Segment and geographic revenue breakdown tables
- KPI table (with notes on any data gaps)
- Margin trends table (8 quarters)
- Cost structure & margin driver commentary (after margins table)
- YoY growth rates table (last 4 quarters, showing each quarter's YoY)
- Guidance vs actuals table (if applicable) with pattern analysis
- News context (analyst reactions, price target changes, market sentiment)
- Forward outlook and revenue drivers analysis
- Management commentary with direct quotes and document citations
- Read-throughs & competitive implications (grouped by Suppliers / Customers / Competitors / Industry)
- Seasonality note if applicable
All financial figures must use Daloopa citation format: `<a href="https://daloopa.com/src/{fundamental_id}">$X.XX million</a>`
Tell the user where the HTML report was saved.
Highlight the 2-3 most notable findings with a critical lens:
- **Quality of earnings**: Are the beats sustainable or driven by one-time items, favorable timing, or accounting changes? Is revenue growth real or pulled forward?
- **Red flags**: Any deterioration in cash conversion, growing GAAP vs non-GAAP gaps, rising SBC dilution, margin expansion from under-investment?
- **What the market is missing**: What does the data say that consensus might not be pricing in — positive or negative?
Referenced files: 1
guidance-tracker9.65 KB
---
name: guidance-tracker
description: Track management guidance accuracy over time for a given company
---
Track management guidance accuracy for the company named in the user's request. If no ticker or company is provided, ask for one before proceeding.
**Before starting, read `../data-access.md` for data access methods and `../design-system.md` for formatting conventions.** Follow the data access detection logic and design system throughout this skill.
Follow these steps:
## 1. Company Lookup
Look up the company by ticker using `discover_companies`. Capture:
- `company_id`
- `latest_calendar_quarter` — anchor for all period calculations below (see `../data-access.md` Section 1.5)
- `latest_fiscal_quarter`
- Firm name for report attribution (default: "Daloopa") — see `../data-access.md` Section 4.5
## 2. Discover Guidance Series
Search for series with keywords like "guidance", "outlook", "estimate", "forecast", "target" to find all available guidance metrics. Common guidance series include:
**Financial guidance:**
- Revenue guidance (quarterly and/or annual)
- EPS guidance
- Operating income / margin guidance
- EBITDA guidance
- Segment-level revenue guidance
- CapEx guidance
- Free Cash Flow guidance
**Operational KPI guidance** — many companies guide on KPIs, and tracking these beats/misses is often more informative than financial guidance:
- Subscriber / user count guidance (e.g., "we expect to add X million subscribers")
- Unit shipment guidance (e.g., "iPhone units", "deliveries")
- ARPU / ASP guidance
- Same-store sales guidance
- GMV / bookings guidance
- Net revenue retention guidance
- Store openings / closings guidance
- Production volume / capacity guidance
Search explicitly for KPI-specific guidance series using terms like "subscriber guidance", "unit guidance", "ARPU guidance", "same-store sales outlook", "deliveries forecast", "bookings target". These are separate from financial guidance and often reside in different series.
## 3. Pull Guidance Data
Calculate 8+ quarters backward from `latest_calendar_quarter`. Pull all discovered guidance series for those periods.
## 4. Pull Actual Results
For each guidance metric, pull the corresponding actual result series for the same periods.
## 5. Build Guidance vs Actuals Tracker
CRITICAL OFFSET RULES:
- **Quarterly guidance**: Guidance from Q(N) earnings call applies to Q(N+1) results. Compare Q(N) guidance -> Q(N+1) actual.
- **Annual guidance from Q1/Q2/Q3**: Applies to current fiscal year. Compare to FY actual.
- **Annual guidance from Q4**: Applies to NEXT fiscal year. Compare to next FY actual.
For each guidance-actual pair, calculate:
- Guidance value
- Actual value
- Delta (Actual - Guidance)
- Beat/Miss % ((Actual - Guidance) / |Guidance| x 100)
- Classification: Beat / In-line / Miss (use +/-1% threshold for in-line)
## 6. Pattern Analysis
Analyze the guidance track record:
- Overall beat rate (% of quarters where actual > guidance)
- Average beat/miss magnitude
- Trend in guidance accuracy (getting tighter? more conservative? less reliable?)
- Any metrics where management is notably conservative or aggressive
- Guidance range width trends (if range guidance is given)
**Management credibility assessment:**
- If the company consistently beats by a similar margin, call out sandbagging — this suggests management is deliberately setting low bars, which can mask underlying deceleration. A 100% beat rate is not necessarily bullish; it may mean guidance is uninformative.
- If guidance has been cut or missed, assess whether management acknowledged the miss honestly or buried it in adjusted metrics.
- Flag any pattern where qualitative language ("strong demand," "robust pipeline") didn't translate to actual results.
## 7. Commentary from Filings
Search SEC filings/documents across multiple queries to build a complete picture of guidance practices. If any search returns empty, try alternative keywords before giving up.
- **Explicit guidance language**: Try "guidance", "outlook"; fallback to "expect", "anticipate", "forecast"
- **Qualitative / directional guidance**: Try "similar to", "consistent with", "growth rate"; fallback to "low single digit", "mid single digit", "high single digit", "double digit", "sequential"
- Many companies provide directional revenue guidance on earnings calls (e.g., "similar to the March quarter" or "low-to-mid-single-digit growth") rather than numeric ranges. Capture these and compare against actual growth rates.
- **Guidance methodology changes**: Try "change", "methodology", "no longer providing"; fallback to "withdraw", "suspend", "discontinue"
- Flag any quarters where the company changed what metrics it guides on, or withdrew guidance entirely
- **Key drivers behind guidance**: Try "assumes", "includes", "excludes"; fallback to "headwind", "tailwind", "impact"
- Capture what management said about the assumptions underpinning their guidance (e.g., FX assumptions, macro assumptions, one-time items included/excluded)
Extract direct management quotes where available and cite the document source.
## 7.5. Guidance Read-Throughs to Adjacent Companies
When a company raises, cuts, or materially changes its guidance, the implications often matter more for adjacent names than for the company itself. This section translates guidance signals into actionable read-throughs.
**For each major guidance change identified in the tracker, analyze the implications for adjacent companies:**
**Identify who is affected by this company's guidance:**
- **Suppliers**: Revenue/CapEx guidance changes directly affect supplier order books. A CapEx guidance raise is a near-term purchase order for equipment/component suppliers. A revenue guide-down signals softer demand flowing upstream.
- **Customers**: If this company supplies critical inputs, pricing or capacity guidance affects customer margins. Guiding for price increases = margin headwind for customers. Guiding for capacity expansion = supply relief.
- **Competitors**: Guidance on market growth, pricing environment, or demand trends is often the most honest signal about the competitive landscape. If Company A guides for share gains, that's a direct share loss for Company B.
- **Channel partners / distributors**: Volume guidance changes affect channel inventory and distributor revenue.
**For each read-through (aim for 4-6), state:**
1. **The guidance data point** — which metric changed, by how much, and in which quarter's call
2. **The affected company** (ticker + name)
3. **The implication** — bullish or bearish, with specific logic
4. **Timing** — is this a next-quarter impact or a multi-quarter trend?
**Focus on the highest-signal guidance changes:**
- Guidance raises after a period of conservatism → strong signal that the underlying business is inflecting
- Guidance cuts or "reaffirmed" when the market expected a raise → often more bearish than an explicit cut
- New metrics being guided on (or old metrics withdrawn) → management is redirecting attention, which itself is a signal
- Segment-level guidance changes → more specific read-throughs than consolidated figures
- KPI guidance (subscriber adds, unit volumes, ARPU) → often the most direct read-through to suppliers and competitors
**Example:**
- "NFLX raised Q2 subscriber guidance from +5M to +8M → **Negative for DIS+, WBD**: attention economy is zero-sum; NFLX's accelerating growth likely pressures competing streamers' subscriber adds. **Positive for cloud/CDN names (AMZN/AWS, NET)**: more streaming = more infrastructure demand."
- "TSMC raised full-year CapEx guidance by $4B (from $32B to $36B) → **Positive for ASML**: TSMC is ASML's largest customer; incremental CapEx skews toward EUV tools. **Positive for AMAT, LRCX, KLAC**: broader equipment spend benefits all semicap names."
**Web research for validation:**
Run 1 targeted search: `"{TICKER} guidance change implications read through {year}"` — analyst commentary on cross-company signals from guidance moves.
Present as a structured section in the report after the Pattern Analysis, grouped by guidance change (each major guide raise/cut gets its own sub-block with the read-throughs beneath it).
## 8. Save Report
Save to `reports/{TICKER}_guidance_tracker.html` using the HTML report template from `../design-system.md`. Write the full analysis as styled HTML with the design system CSS inlined. This is the final deliverable — no intermediate markdown step needed.
The report should include:
- Summary header with company name, ticker, and period covered
- Quarter mapping reference table showing the +1 offset explicitly:
```
| Guidance Source Quarter | Guidance Applies To | Actual Result Quarter |
| CQ1 2024 | CQ2 2024 | CQ2 2024 |
| CQ2 2024 | CQ3 2024 | CQ3 2024 |
```
This makes the offset rule visible and auditable for every row in the tracker.
- Main tracker table with columns: Guidance Source, Metric, Guidance, Actual Period, Actual, Delta, Beat/Miss (with Daloopa citations on all values)
- Summary statistics (beat rate, avg beat/miss by metric)
- Pattern analysis narrative
- Guidance read-throughs to adjacent companies (grouped by guidance change, with affected tickers and implications)
- Key guidance quotes from filings with document citations
All financial figures must use Daloopa citation format: `<a href="https://daloopa.com/src/{fundamental_id}">$X.XX million</a>`
Tell the user where the HTML report was saved.
Highlight the key patterns (e.g., "Management has beat revenue guidance 7 of the last 8 quarters by an average of 2.3%"). Include an honest credibility verdict: Is management's guidance informative or performative? Should investors trust the forward guidance, and if not, what should they anchor to instead?
Referenced files: 1
ib-deck6.44 KB
---
name: ib-deck
description: Generate an institutional-grade investment banking pitch deck (HTML)
---
Build an institutional-grade pitch deck for the company named in the user's request. If no ticker or company is provided, ask for one before proceeding.
**Before starting, read `../design-system.md` for formatting conventions and `../data-access.md` for data access methods.** Also read the reference files in this skill's `references/` directory for slide templates and components.
This skill generates a self-contained HTML presentation that can be opened in a browser and printed to PDF if needed.
## Phase 1 — Requirements
Determine the deck category and scope:
**Category** (infer from context, or default to IB Advisory):
- **IB Advisory** — M&A advisory, fairness opinions, board presentations. Navy/steel/gold palette. "CONFIDENTIAL" marking.
- **Activist / L-S Equity** — Shareholder campaigns, investment memos as decks. Navy/blue/orange or navy/sky/green palette.
**Firm Attribution:**
- Firm name defaults to "Daloopa". If the user specifies a firm name in their prompt, use that instead.
- **NEVER hallucinate a firm name** (Goldman Sachs, Morgan Stanley, JPMorgan, etc.). See `../data-access.md` Section 4.5.
- Include firm name on the cover slide and in all slide footers.
**Gather from the user or infer:**
- Target company (ticker)
- Purpose (M&A pitch, fairness opinion, investment memo, activist campaign)
- Key thesis or strategic rationale
- Specific slides needed (or use the default 14-slide deck)
## Phase 2 — Data Gathering
Look up the company by ticker using `discover_companies`. Capture `company_id`, `latest_calendar_quarter`, and `latest_fiscal_quarter`. Use `latest_calendar_quarter` to anchor all period calculations (see `../data-access.md` Section 1.5).
Use Daloopa MCP for all financial data. Target comprehensive coverage:
- **5+ years of quarterly financials** — calculate 20+ quarters backward from `latest_calendar_quarter` (income statement, balance sheet, cash flow)
- **Segment and geographic breakdowns**
- **All company-specific operating KPIs**
- **6-10 peers** — get trading multiples and fundamentals from Daloopa + market data (see `../data-access.md` Section 2)
- **Guidance and consensus** (see `../data-access.md` Section 3)
- **SEC filings** — risk factors, growth drivers, M&A commentary, strategic language
Get market data for the target and all peers:
- Current price, market cap, shares outstanding, beta, trading multiples
- Historical price data for TSR comparison
Market data resolution order (see `../data-access.md` Section 2):
1. MCP market data tools (if available)
2. Web search for current quotes, multiples, and historical data
3. Sensible defaults (industry-average multiples if specific data unavailable)
## Phase 3 — Analysis
Run the core analyses needed for the deck:
- **Valuation**: DCF (WACC, 5Y FCF projections, terminal value, sensitivity), comps table, implied valuation range
- **Scenario analysis**: Bull/base/bear with bottoms-up segment builds — be honest about which scenario is most likely
- **Capital allocation**: Buybacks, dividends, shareholder yield, leverage — flag any value-destructive patterns
- **Financial projections**: 3-5 year forward estimates — challenge assumptions, don't just extrapolate
**DCF Methodology** (inline calculation):
- Project 5 years of unlevered free cash flows (UFCF = NOPAT + D&A - CapEx - ΔWC)
- Discount at WACC (beta-based or peer-median if unavailable)
- Terminal value using perpetuity growth method (TGR 2-3%)
- PV of FCFs + PV of TV = EV → subtract net debt → equity value → per-share price
**Critical assessment:** The deck should present an honest analytical view, not a promotional pitch. If the valuation looks stretched, say so. If growth is decelerating, show it clearly. If risks are material, give them proper weight. Institutional investors will dismiss analysis that reads as advocacy rather than research.
## Phase 4 — Build Presentation
Generate a self-contained HTML file following the templates in `references/slide-templates.md`. Use components from `references/financial-components.md`.
**Slide structure** (default 14-slide deck — adapt based on purpose):
1. **Cover** — Company name, deck title, date, "CONFIDENTIAL" (if IB Advisory)
2. **Disclaimer** — Standard legal boilerplate
3. **Table of Contents** — Numbered sections
4. **Section Divider: Situation Overview**
5. **Executive Summary** — Two-column: situation overview + key findings
6. **Company Overview** — KPI callout row + business description + segment breakdown
7. **Financial Summary** — Dense income statement + margins + per-share + growth rates
8. **Section Divider: Valuation Analysis**
9. **Peer Benchmarking** — Full comps table (6-10 peers, trading multiples, footnoted)
10. **Valuation Analysis** — Football field chart + methodology summary
11. **DCF Detail** — Projection table + sensitivity matrix + assumptions
12. **Section Divider: Conclusion**
13. **Scenario Analysis** — Bull/base/bear bars + metric comparison table
14. **Appendix** — Raw data tables, dense formatting
**Key rules:**
- Every content slide must have minimum 2-3 data-rich elements (tables, charts, commentary)
- No sparse slides — fill the space with analysis
- All financial figures must include Daloopa citations
- Follow `../design-system.md` for colors, typography, number formatting
- Use CSS `@page` with landscape orientation, 16:9 aspect ratio (1280×720px per slide)
- Each slide is a `<div class="slide">` with `page-break-after: always`
- All data displayed in tables (no chart generation)
See `references/ib-advisory-patterns.md` for valuation methodology templates.
## Phase 5 — Output
Save the complete HTML deck as a local file and summarize the output. Use the HTML Report Template structure from `../design-system.md` with slide-specific CSS from `references/slide-templates.md`.
Tell the user:
- The deck is ready to view — open in any browser
- To create a PDF: open in Chrome/Edge → Print → Save as PDF → set to Landscape orientation
- 2-3 sentence summary of the deck's key findings
- Implied valuation range
- How many slides were generated
## Citation Format
Every financial figure must use Daloopa citation format: [$X.XX million](https://daloopa.com/src/{fundamental_id})
All tables must follow the standard financial analysis format:
- **Columns** = time periods (Q1 2024, Q2 2024, etc.)
- **Rows** = financial metrics (Revenue, Net Income, etc.)
Data sourced from Daloopa.
Referenced files: 4
industry7.08 KB
---
name: industry
description: Cross-company industry comparison across multiple tickers
---
Perform an industry comparison across the companies named in the user's request. If no ticker or company is provided, ask for one before proceeding.
The user will provide multiple tickers separated by spaces (e.g., "AAPL MSFT GOOG AMZN").
**Before starting, read `../data-access.md` for data access methods and `../design-system.md` for formatting conventions.** Follow the data access detection logic and design system throughout this skill.
Follow these steps:
## 1. Company Lookups
Look up all provided tickers using `discover_companies`. For each company, capture:
- `company_id`
- `latest_calendar_quarter` — use the earliest `latest_calendar_quarter` across all companies as the anchor for period calculations (see `../data-access.md` Section 1.5)
- `latest_fiscal_quarter`
- Note each company's fiscal year end — this is critical for calendar quarter alignment
- Firm name for report attribution (default: "Daloopa") — see `../data-access.md` Section 4.5
## 2. Comparable Financial Metrics
Calculate 8 quarters backward from the anchor `latest_calendar_quarter`. For each company, find and pull these metrics:
**Income Statement:**
- Revenue
- Gross Profit / Gross Margin
- Operating Income / Operating Margin
- EBITDA (if not reported, compute as Operating Income + D&A — label "(calc.)")
- Net Income / Net Margin
- Diluted EPS
- R&D Expense
- Stock-Based Compensation (SBC)
**Cash Flow:**
- Operating Cash Flow
- CapEx (Purchases of property, plant and equipment)
- Free Cash Flow (compute as OCF - CapEx — label "(calc.)")
- D&A (needed for EBITDA calc if not directly reported)
For any derived/computed metric, mark it with "(calc.)" so the reader knows it's not directly sourced.
## 3. Company-Specific KPIs
First, think about what KPIs matter for the specific industry being compared. Use the full sector taxonomy to guide discovery:
- **SaaS/Cloud**: ARR, net revenue retention, RPO/cRPO, customers >$100K, cloud gross margin
- **Consumer Tech**: DAU/MAU, ARPU, engagement metrics, installed base, paid subscribers
- **E-commerce/Marketplace**: GMV, take rate, active buyers/sellers, order frequency
- **Retail**: same-store sales, store count, average ticket, transactions
- **Telecom/Media**: subscribers, churn, ARPU, content spend
- **Hardware**: units shipped, ASP, attach rate, installed base
- **Financial Services**: AUM, NIM, loan growth, credit quality metrics, fee income ratio
- **Pharma/Biotech**: pipeline stage, patient starts, scripts, market share
- **Industrials/Energy**: backlog, book-to-bill, utilization, production volumes, reserves
For each company, discover and pull the most relevant KPIs. Note which KPIs are common across the group (apples-to-apples comparison) and which are unique to specific companies. For mixed-sector comparisons, focus on the KPIs that apply to the largest revenue segments of each company.
## 4. Normalize & Compare
- **Calendar quarter alignment is critical.** Ensure all companies are compared on the same calendar quarters. Note each company's fiscal year end and map fiscal quarters to calendar quarters.
- Build side-by-side comparison tables
- Calculate margins for ALL 4 recent quarters (not just the latest) to show trends
- Calculate YoY growth rates for each of the last 4 quarters
## 5. Ranking & Analysis
- Rank companies on each key metric (revenue growth, margins, FCF yield, etc.)
- Identify the leader and laggard for each metric
- Flag notable outliers (unusually high/low margins, accelerating/decelerating growth)
- Note any divergence in KPIs or business model differences
- Compute R&D as % of revenue and SBC as % of revenue for each company — these reveal structural differences in how each company invests and compensates
- Show YoY segment growth rates for the most recent quarter, not just absolute segment revenue
- Flag one-time items that distort any quarter's comparison
## 6. Document Search
For each company, search the most recent 2 quarters of filings across multiple queries. If any search returns empty, try alternative keywords before giving up.
- **Competitive positioning**: Try "competition", "market share"; fallback to "competitive", "leader", "position"
- **Industry trends**: Try "industry", "market", "demand"; fallback to "secular", "trend", "adoption"
- **Strategic differentiation**: Try "differentiate", "advantage", "moat"; fallback to "unique", "proprietary", "platform"
- **Growth strategy**: Try "growth", "opportunity", "expansion"; fallback to "invest", "launch", "new market"
- **Macro / headwinds**: Try "macro", "headwind"; fallback to "tariff", "regulatory", "geopolitical", "inflation"
If a company returns sparse results across all searches, try broader single-keyword searches (e.g., just "competitive" or just "growth") and search additional periods.
For each company, extract:
- How management describes their competitive position
- Key strategic priorities and investments
- Industry or macro commentary that affects the whole group
- Any direct references to competitors in the comparison set
Use these findings to enrich the rankings analysis — numbers tell you who's winning, filings tell you why.
## 7. Save Report
Save to `reports/{INDUSTRY_LABEL}_industry_comp.html` (where INDUSTRY_LABEL is derived from the tickers, e.g., "AAPL_MSFT_GOOG_AMZN") using the HTML report template from `../design-system.md`. Write the full analysis as styled HTML with the design system CSS inlined. This is the final deliverable — no intermediate markdown step needed.
The report should include:
- Summary header listing all companies compared, with fiscal year end dates
- Side-by-side financial metrics table (last 4 calendar quarters, companies as columns, metrics as rows, Daloopa citations)
- Trailing 4-quarter totals for revenue, operating income, net income, EPS, OCF, CapEx, FCF
- **Margin trend table**: Gross margin, operating margin, net margin for ALL 4 quarters per company (not just latest quarter snapshot)
- **Growth comparison table**: Revenue YoY and EPS YoY for each of the last 4 quarters per company
- **R&D and SBC comparison**: R&D % of revenue and SBC % of revenue for each company (latest quarter + trend)
- Segment revenue tables per company with YoY growth rates for each segment in the most recent quarter
- KPI comparison (where applicable), noting common vs company-specific KPIs
- **Cash flow comparison**: OCF, CapEx, FCF side-by-side with CapEx as % of revenue to highlight investment intensity differences
- Rankings summary table
- Key competitive insights from filings (with document citations)
- Note on calendar quarter alignment and any fiscal year differences
All financial figures must use Daloopa citation format: `<a href="https://daloopa.com/src/{fundamental_id}">$X.XX million</a>`
Tell the user where the HTML report was saved.
Give a clear competitive verdict: Who is winning and who is losing? Which company has the strongest competitive position and why? Which company looks most vulnerable? Are any of the companies structurally mispriced relative to peers (too cheap or too expensive given the fundamentals)? Don't hedge — rank them honestly.
Referenced files: 1
inflection5.86 KB
---
name: inflection
description: Auto-detect biggest acceleration/deceleration inflections across all
metrics
---
Detect the biggest financial and operating inflections for the company named in the user's request. If no ticker or company is provided, ask for one before proceeding.
**Before starting, read `../data-access.md` for data access methods and `../design-system.md` for formatting conventions.** Follow the data access detection logic and design system throughout this skill.
Follow these steps:
## 1. Company Lookup
Look up the company by ticker using `discover_companies`. Capture:
- `company_id`
- `latest_calendar_quarter` — anchor for all period calculations below (see `../data-access.md` Section 1.5)
- `latest_fiscal_quarter`
- Firm name for report attribution (default: "Daloopa") — see `../data-access.md` Section 4.5
## 2. Broad Series Discovery
Cast a wide net to discover ALL available series for this company. Search with multiple keyword sets to maximize coverage:
- Financial: "revenue", "income", "profit", "margin", "eps", "cash flow"
- Operating: "subscriber", "user", "customer", "unit", "arpu", "retention"
- Segment: "segment", "product", "service", "geographic"
- Balance sheet: "debt", "asset", "equity", "cash"
- Other: "backlog", "bookings", "pipeline", "store", "employee"
Collect all unique series IDs. The goal is comprehensiveness — capture every metric Daloopa tracks for this company.
## 3. Pull 8 Quarters of Data
Calculate 8 quarters backward from `latest_calendar_quarter`. Pull all discovered series for those periods. This gives enough history to compute both QoQ and YoY rates plus their second derivatives.
## 4. Compute Growth Rates and Inflections
For each series with sufficient data (at least 5 quarters):
**YoY Growth Rate** for each quarter:
- growth_t = (value_t - value_{t-4}) / |value_{t-4}|
**YoY Acceleration (second derivative):**
- accel_t = growth_t - growth_{t-1}
- Positive = accelerating, Negative = decelerating
**QoQ Sequential Growth** (for non-seasonal metrics):
- seq_growth_t = (value_t - value_{t-1}) / |value_{t-1}|
**QoQ Acceleration:**
- seq_accel_t = seq_growth_t - seq_growth_{t-1}
Skip series where values are too small (< 1% of revenue) or where data is sparse. For margin/ratio series (values between 0-1 or percentages), compute change in basis points rather than % change.
## 5. Rank Inflections
Rank all series by the magnitude of their most recent acceleration/deceleration:
**Top 10 Accelerating** — series with the largest positive acceleration in the most recent quarter. These are metrics that are improving faster than before.
**Top 10 Decelerating** — series with the largest negative acceleration (or deceleration). These are metrics where momentum is fading.
For each inflection, note:
- Series name
- Most recent value (with Daloopa citation)
- Current YoY growth rate
- Prior-quarter YoY growth rate
- Acceleration (the delta)
- Whether this is a new trend (1Q) or sustained (2-3Q in same direction)
## 6. Contextualize Key Inflections
For the top 5 most significant inflections (by magnitude and importance to the business):
- Search SEC filings for context on what's driving the change
- Try keywords related to the specific metric (e.g., if "Services Revenue" is accelerating, search for "services", "subscription", "recurring")
- Extract management commentary explaining the inflection
- Note whether the inflection aligns with or contradicts management guidance
## 7. Synthesize
Identify the narrative:
- Is the company broadly accelerating or decelerating?
- Are there divergent trends (e.g., revenue accelerating but margins decelerating)?
- Which inflections matter most for the investment case?
- Are operating KPIs leading or lagging the financial inflections?
**Critically assess sustainability:**
- For positive inflections: Is this a durable trend change or a one-time comp effect? Will it persist next quarter when the base normalizes? Is it driven by organic strength or by pull-forward, price increases, or easy comps?
- For negative inflections: Is this the beginning of a structural deterioration or a temporary blip? Is the company investing through it (good) or cutting to protect margins (potentially bad long-term)?
- Flag any inflections where the magnitude seems too good/bad to be sustainable.
## 8. Save Report
Save to `reports/{TICKER}_inflection.html` using the HTML report template from `../design-system.md`. Write the full analysis as styled HTML with the design system CSS inlined. This is the final deliverable — no intermediate markdown step needed.
Structure the report with these sections:
```
<h1>{Company Name} ({TICKER}) — Inflection Analysis</h1>
<p>Generated: {date}</p>
<h2>Summary</h2>
{2-3 sentence overview: Is the company accelerating, decelerating, or mixed? What are the most important inflections?}
<h2>Top Accelerating Metrics</h2>
<table>
| Rank | Metric | Latest Value | YoY Growth | Prior YoY Growth | Acceleration | Trend |
{table with Daloopa citations}
</table>
<h2>Top Decelerating Metrics</h2>
<table>
| Rank | Metric | Latest Value | YoY Growth | Prior YoY Growth | Deceleration | Trend |
{table with Daloopa citations}
</table>
<h2>Key Inflection Deep Dives</h2>
<h3>1. {Metric Name} — {Accelerating/Decelerating}</h3>
{Context from filings, management commentary, what's driving it}
<h3>2. {Metric Name} — {Accelerating/Decelerating}</h3>
{...}
{repeat for top 5}
<h2>Divergences & Signals</h2>
{Analysis of divergent trends, leading indicators, and implications}
<h2>Inflection Heatmap</h2>
<table>
| Metric | Q(-3) YoY | Q(-2) YoY | Q(-1) YoY | Q(latest) YoY | Direction |
{visual trend using labels: Accelerating / Steady / Decelerating}
</table>
```
All financial figures must use Daloopa citation format: `<a href="https://daloopa.com/src/{fundamental_id}">$X.XX million</a>`
Tell the user where the HTML report was saved.
Highlight the 2-3 most notable inflections and what they signal.
Referenced files: 1
initiate19.6 KB
---
name: initiate
description: Initiate coverage — generate both research note (HTML) and Excel model
(.xlsx)
---
Initiate coverage on the company named in the user's request. If no ticker or company is provided, ask for one before proceeding.
**Before starting, read `../data-access.md` for data access methods and `../design-system.md` for formatting conventions.** Follow the data access detection logic and design system throughout this skill.
This is the capstone skill that produces both a research note (styled HTML) and an Excel model (.xlsx) from a single comprehensive data gathering pass.
## Strategy
Rather than running the research-note and build-model skills independently (which would duplicate data gathering), this skill gathers a superset of data once, then renders both outputs.
## Phase 1 — Company Setup
Look up the company by ticker using `discover_companies`. Capture:
- `company_id`
- `latest_calendar_quarter` — anchor for all period calculations (see `../data-access.md` Section 1.5)
- `latest_fiscal_quarter`
- Firm name for report attribution (default: "Daloopa") — see `../data-access.md` Section 4.5
Get market data using the 3-step resolution: (1) MCP market data tools if available, (2) web search, (3) sensible defaults (see `../data-access.md` Section 2):
- Current price, market cap, shares outstanding, beta
- Trading multiples (P/E, EV/EBITDA, P/S, P/B)
- Risk-free rate (for DCF)
Initialize context: `context = {company_name, ticker, date, price, market_cap, firm_name, ...}`
## Phase 2 — Comprehensive Data Gathering
Calculate 8-16 quarters backward from `latest_calendar_quarter`. Pull:
**Income Statement — search and pull all available:**
- Revenue / Net Sales
- Cost of Revenue / COGS
- Gross Profit
- Research & Development
- Selling, General & Administrative
- Total Operating Expenses
- Operating Income
- Interest Expense / Income
- Pre-tax Income
- Tax Expense
- Net Income
- Diluted EPS
- Diluted Shares Outstanding
- EBITDA (or compute from Op Income + D&A, label "(calc.)")
- D&A
**Balance Sheet — search and pull all available:**
- Cash and Equivalents
- Short-term Investments
- Accounts Receivable
- Inventory
- Total Current Assets
- PP&E (net)
- Goodwill
- Total Assets
- Accounts Payable
- Short-term Debt
- Long-term Debt
- Total Liabilities
- Total Equity
**Cash Flow — search and pull all available:**
- Operating Cash Flow
- Capital Expenditures
- Depreciation & Amortization
- Acquisitions
- Dividends Paid
- Share Repurchases
- Free Cash Flow (compute if not direct: OCF - CapEx, label "(calc.)")
**Segments:**
- Revenue by segment
- Operating income by segment (if available)
**Geographic:**
- Revenue by geography
**KPIs:**
- All company-specific operating metrics (subscribers, units, ARPU, retention, etc.)
**Guidance:**
- All guidance series and corresponding actuals
**Share Activity:**
- Share count, buyback amounts
**For every value returned by `get_company_fundamentals`, record its `fundamental_id` (the `id` field).** Store each data point as `{value, fundamental_id}` so citations can be rendered in both outputs.
Compute margins, YoY growth rates, and ratios for each quarter.
### Cost Structure & Margin Analysis
After the core financial pull:
- **COGS driver identification**: Search for cost-related series ("cost of goods", "materials", "manufacturing", "input cost"). Identify 3-5 biggest cost line items and their trends.
- **OpEx breakdown**: Pull R&D and SG&A separately. Compute R&D % of revenue and SG&A % of revenue trends.
- **Margin driver analysis**: For each major margin (gross, operating, net), identify what's driving expansion or compression — pricing power, cost leverage, mix shift, or one-time items.
## Phase 3 — Industry-Specific Deep Dive
Determine the company's sector and apply the relevant analysis template:
- **Manufacturing/Industrial**: Bookings & backlog, book-to-bill ratio, pipeline by geography, capacity utilization
- **SaaS/Technology**: ARR/MRR trajectory, net retention rate, customer cohort analysis, RPO/deferred revenue trends
- **Retail/Consumer**: Same-store sales, store count trajectory, traffic vs ticket decomposition, inventory health
- **Financials/Banks**: NIM trajectory, provision trends, loan growth by category, capital ratios (CET1, TCE)
- **Healthcare/Pharma**: Pipeline summary (drug, indication, phase, milestone), product revenue breakdown, patent cliff timeline
- **Energy**: Production volumes, realized pricing vs benchmark, proved reserves, breakeven analysis
Search for relevant series using `discover_company_series` with sector-appropriate keywords. Pull available data and build the narrative.
Build `context.industry_deep_dive` (string) — sector-specific analysis narrative with Daloopa citations, organized by the relevant template above.
## Phase 4 — Peer Analysis
Identify 5-8 comparable companies.
Get peer trading multiples using the 3-step resolution: (1) MCP market data tools if available, (2) web search, (3) sensible defaults (see `../data-access.md` Section 2).
If consensus forward estimates are available (`../data-access.md` Section 3), include NTM estimates.
Pull peer fundamentals from Daloopa where available (revenue growth, margins).
Build `context.comps` and `context.comps_table`.
## Phase 5 — Projections
Build forward estimates using the following methodology:
- **Revenue:** Start with latest guidance (if available), then decay to long-term growth rate (industry average or historical trend). Apply quarterly seasonality patterns from trailing data.
- **Gross Margin:** Mean-revert to trailing 8-quarter average, with adjustment for recent trends or guidance commentary.
- **Operating Expenses:** Project as % of revenue, trending toward trailing averages. R&D and SG&A may have different trajectories.
- **CapEx:** Project as % of revenue based on trailing 4-8 quarter average and guidance.
- **D&A:** Project based on trailing average as % of revenue or PP&E.
- **Tax Rate:** Use trailing effective tax rate or guidance.
- **Share Count:** Project dilution/buyback based on trailing trends and guidance.
- **Working Capital:** Project DSO, DIO, DPO based on trailing averages.
Calculate all quarterly projections, then sum to annual. Project 4-8 quarters forward. Describe methodology inline and perform calculations directly.
## Phase 6 — DCF Valuation
Calculate:
- **WACC:** Use CAPM for cost of equity (Rf + Beta × ERP, where ERP = 6.0%). Cost of debt = Interest Expense / Total Debt. WACC = (E/V × Re) + (D/V × Rd × (1 - Tax Rate)).
- **5-year FCF projections:** Annualize from quarterly projections (FCF = Op Cash Flow - CapEx).
- **Terminal Value:** Use perpetuity growth at 2.5-3.0%.
- **Implied Share Price:** (PV of FCFs + Terminal Value - Net Debt) / Shares Outstanding
- **Sensitivity Matrix:** WACC (7 values: -3% to +3% from base) × Terminal Growth (6 values: 1.5% to 4.0%).
Build `context.dcf` and `context.dcf_summary` (set `context.has_dcf = true`).
## Phase 7 — Qualitative Research + News & Catalysts
### SEC Filing Research
Search SEC filings across multiple queries:
- "risk" / "uncertainty" / "challenge" for risk factors
- "growth" / "opportunity" / "expansion" for growth drivers
- "competition" / "market share" for competitive dynamics
- "outlook" / "guidance" for management's forward view
- Company-specific strategic topics (e.g., "AI", "cloud", etc.)
Extract and organize into:
- `context.risks` — ranked list of risks with impact/probability
- `context.investment_thesis` — variant perception, thesis pillars, catalysts
- `context.company_description` — 2-3 sentence business description
### News & Catalysts via WebSearch
Run 4 WebSearch queries to gather recent external context:
1. `"{TICKER} {company_name} news {year}"` — recent headlines and developments
2. `"{TICKER} analyst upgrade downgrade price target"` — sell-side sentiment shifts
3. `"{TICKER} catalysts risks"` — forward-looking events and risk factors
4. `"{company_name} industry outlook {sector}"` — macro and industry trends
Organize results into:
- `context.news_timeline` (string) — 6-10 key events from the last 6-12 months in reverse chronological order. Each event: date, headline, 1-sentence impact, sentiment tag (Positive / Negative / Mixed / Upcoming). Format as a numbered list.
- `context.forward_catalysts` (string) — Organized by timeframe:
- **Near-term (0-3 months, HIGH priority)**: earnings dates, product launches, regulatory decisions
- **Medium-term (3-12 months, MEDIUM priority)**: strategic milestones, contract renewals, industry events
- **Long-term (1-3 years, LOW priority)**: secular trends, market expansion, competitive dynamics
- `context.policy_backdrop` (string) — Macro/regulatory context affecting the company. Tariffs, regulation, interest rates, sector-specific policy. Leave empty string if not material.
## Phase 8 — Guidance Track Record
Search for guidance series ("guidance", "outlook", "forecast", "estimate", "target").
Pull guidance and corresponding actuals. Apply +1 quarter offset rule for quarterly guidance, same-year rule for annual guidance from Q1/Q2/Q3, next-year rule for annual guidance from Q4.
Compute beat/miss rates and patterns.
Build `context.guidance` and `context.guidance_table` (set `context.has_guidance = true/false`).
## Phase 9 — What You Need to Believe
Build falsifiable bull/bear beliefs:
### Bull Beliefs (To Go Long)
Write 4-6 numbered beliefs, each with:
- One **bold statement** (the belief itself)
- 2-3 sentences of **evidence** with Daloopa citations supporting why this could be true
- Each belief must be **falsifiable** — testable with observable data within 6 months
Example format: "1. **Revenue growth re-accelerates to 15%+ as AI monetization scales.** Cloud segment grew [$X.Xbn](link) last quarter, up X% YoY, with management noting..."
### Bear Beliefs (To Go Short)
Same format — 4-6 numbered falsifiable beliefs with evidence for the downside case.
### Valuation Math
For each side:
- Bull target: forward multiple × forward earnings estimate = price target. Show the math.
- Bear target: same structure with bear-case multiple and earnings.
### Risk/Reward Assessment
- Compare bull upside % vs bear downside % from current price
- If asymmetry is significant (e.g., 30% upside vs 40% downside), flag it explicitly
- State which side has the better risk/reward and why
Build `context.bull_beliefs`, `context.bull_target`, `context.bear_beliefs`, `context.bear_target`, `context.risk_reward_assessment`.
## Phase 10 — Capital Allocation
Pull buyback, dividend, share count, FCF data.
Compute shareholder yield, FCF payout ratio, net leverage.
Build `context.capital_allocation_commentary`.
## Phase 11 — Synthesis + Tensions + Monitoring
This is the most judgment-intensive step. Be honest and critical — the reader is a professional investor who needs your real assessment, not a balanced summary.
### Core Synthesis
Write:
- **Executive Summary**: 3-4 sentence TL;DR covering current state, key thesis, valuation view. Include a clear directional view — is this stock attractive, fairly valued, or overvalued at the current price?
- **Variant Perception**: What does the market think vs what do you see in the data? Where is the consensus wrong? If you agree with consensus, say that too — but explain what could change.
- **Key Findings**: Top 3-5 most notable data points or trends — prioritize what changes the investment thesis, not just what's interesting
- **Red Flags & Concerns**: Any quality-of-earnings issues, sustainability questions, or risks the market may be underpricing
- Build `context.executive_summary`, `context.variant_perception`
### Five Key Tensions
Identify the 5 most critical bull/bear debates for this stock. Each tension is a single line that frames both sides. Alternate between bullish-leaning and bearish-leaning tensions. Every tension must reference a specific data point from the analysis.
Format as a numbered list:
1. "[Bullish factor] vs [Bearish factor]" — cite the specific metric
2. "[Bearish factor] vs [Bullish factor]" — cite the specific metric
...etc.
Build `context.five_key_tensions` (string).
### Monitoring Framework
Build two monitoring lists for ongoing tracking:
**Quantitative Monitors** — 5-7 specific metrics with explicit thresholds:
- Format: "Metric: current value → bull threshold / bear threshold"
- Example: "Gross Margin: 45.2% → above 46% confirms pricing power / below 43% signals cost pressure"
**Qualitative Monitors** — 5-7 factors to watch:
- Management tone shifts on earnings calls
- Competitive dynamics (new entrants, pricing pressure)
- Regulatory developments
- Customer concentration changes
- Capital allocation pivots
Build `context.monitoring_quantitative` and `context.monitoring_qualitative` (strings, numbered lists).
### Structured Tables
Build structured tables for both outputs:
- `context.key_metrics_table` — [{metric, value, vs_prior}] for the exec summary table
- `context.financials_table` — [{metric, q1, q2, ...}] for the financial analysis section
- `context.segments_table`, `context.geo_table`, `context.shares_outstanding_table`
- `context.opex_breakdown_table` — [{metric, q1, q2, ...}] for R&D, SG&A, % of revenue rows
- `context.guidance_table`, `context.comps_table`, etc.
## Phase 12 — Render Research Note (HTML)
Using the HTML Report Template from `../design-system.md`, generate a styled HTML report with full CSS inlined. The report should include:
**Header Section:**
- Company name and ticker
- Report date and firm attribution
- Five Key Tensions (numbered list)
**Section 1: Executive Summary**
- Key metrics table
- Executive summary narrative
- Variant perception
**Section 2: Company Overview**
- Business description
- Investment thesis
**Section 3: Recent News & Catalysts**
- News timeline
- Forward catalysts
- Policy backdrop
**Section 4: Financial Analysis**
- Financials table (8-16 quarters)
- Cost structure & margin analysis
- OpEx breakdown table
- Segment and geographic tables
- Share count table
**Section 5: Industry-Specific Analysis**
- Industry deep dive narrative
**Section 6: Guidance Track Record**
- Guidance table and beat/miss analysis (if available)
**Section 7: What You Need to Believe**
- Bull beliefs with valuation target
- Bear beliefs with valuation target
- Risk/reward assessment
**Section 8: Catalysts**
- Forward catalysts
- Policy backdrop
**Section 9: Capital Allocation**
- Capital allocation commentary
**Section 10: Valuation**
- DCF summary and sensitivity (if available)
- Comps commentary (if available)
**Section 11: Risks**
- Risks summary
**Section 12: Monitoring Framework**
- Quantitative monitors
- Qualitative monitors
**Appendix:**
- Additional context or data
### Context Key Checklist
Verify these keys exist before rendering (set empty string if data unavailable):
**Cover & Summary:**
`company_name`, `ticker`, `date`, `price`, `market_cap`, `five_key_tensions`, `executive_summary`, `key_metrics_table`
**Thesis & Overview:**
`investment_thesis`, `variant_perception`, `company_description`
**News:**
`news_timeline`
**Financials:**
`financials_table`, `cost_margin_analysis`, `opex_breakdown_table`, `segments_table`, `geo_table`, `shares_outstanding_table`
**Industry:**
`industry_deep_dive`
**Guidance:**
`has_guidance`, `guidance_track_record`
**What You Need to Believe:**
`bull_beliefs`, `bull_target`, `bear_beliefs`, `bear_target`, `risk_reward_assessment`
**Catalysts:**
`forward_catalysts`, `policy_backdrop`
**Capital Allocation:**
`capital_allocation_commentary`
**Valuation:**
`has_dcf`, `dcf_summary`, `has_comps`, `comps_commentary`
**Risks:**
`risks_summary`
**Monitoring:**
`monitoring_quantitative`, `monitoring_qualitative`
**Appendix:**
`appendix_content`
**Citation enforcement:** Every financial figure from Daloopa in the HTML report must use citation format: `[$X.XX million](https://daloopa.com/src/{fundamental_id})`. If a number came from `get_company_fundamentals`, it must have a citation link. No exceptions.
## Phase 13 — Render Excel Model
Generate the `.xlsx` file directly using the best available spreadsheet-generation workflow. For Codex, prefer bundled spreadsheet tooling or Python/openpyxl when available. The workbook should:
1. Create 8 tabs with the following structure:
**Tab 1: Income Statement**
- Rows: Revenue, COGS, Gross Profit, R&D, SG&A, Total OpEx, Op Income, Interest, Pre-Tax Income, Tax, Net Income, Diluted EPS, Shares
- Columns: Historical periods (8-16Q) + Projected periods (4-8Q)
- Sub-rows: YoY growth %, margin % where applicable
- Header: Company name, ticker, report date
- Formatting: Numbers with commas/decimals, percentages, bold headers, frozen panes
**Tab 2: Balance Sheet**
- Rows: Assets section (Cash, Investments, AR, Inventory, Current Assets, PP&E, Goodwill, Total Assets), Liabilities section (AP, ST Debt, LT Debt, Total Liabilities, Equity)
- Columns: Historical + Projected periods
- Sub-rows: % of Total Assets for key line items
- Same formatting standards
**Tab 3: Cash Flow**
- Rows: Op Cash Flow, CapEx, Free Cash Flow, Acquisitions, Dividends, Buybacks, Net Change in Cash
- Columns: Historical + Projected periods
- Sub-rows: FCF yield %, CapEx as % Revenue
- Same formatting standards
**Tab 4: Segments**
- Rows: Revenue by segment, Op Income by segment (if available)
- Columns: Historical + Projected periods
- Sub-rows: Segment as % of total, segment growth rates
- Same formatting standards
**Tab 5: KPIs**
- Rows: All company-specific operating metrics discovered
- Columns: Historical + Projected periods
- Sub-rows: YoY growth or relevant unit economics
- Same formatting standards
**Tab 6: Projections**
- Editable assumption inputs (yellow highlighting): Revenue growth %, Gross margin %, Op margin %, CapEx % revenue, Tax rate %, Buyback rate QoQ
- Calculated outputs: Projected P&L, BS, CF driven by assumptions
- Commentary box explaining methodology
- Same formatting standards
**Tab 7: DCF**
- Inputs: WACC, Terminal Growth, Risk-Free Rate, ERP, Beta, Cost of Debt
- FCF Projection (5 years annualized)
- Terminal Value calculation
- PV calculations
- Enterprise Value → Equity Value → Implied Share Price
- Sensitivity table: WACC (rows) × Terminal Growth (cols) showing implied price
- Color scale: green (upside) to red (downside) vs current price
- Same formatting standards
**Tab 8: Summary**
- Company overview (name, ticker, sector, description)
- Current market data (price, market cap, shares, beta)
- Valuation summary: DCF implied price, peer-implied range, current price, upside/downside %
- Peer trading multiples table
- Key model outputs: Trailing revenue, Projected revenue growth, Trailing/Projected margins
- Same formatting standards
2. Apply `../design-system.md` formatting conventions:
- Number format: $X.Xbn for large numbers, X.X% for percentages, X.Xx for multiples
- Color palette: Navy #1B2A4A (headers), Steel Blue #4A6FA5 (sub-headers), Gold #C5A55A (highlights), Green #27AE60 (positive), Red #C0392B (negative)
- Bold headers, frozen top row and left column
- Yellow fill (#FFEB3B) for editable input cells
3. Save the workbook as `reports/{TICKER}_model.xlsx`
## Output
Present both deliverables to the user:
**Research Note (HTML):**
- Save the styled HTML report to `reports/{TICKER}_initiate_report.html`.
- Tell the user where the HTML file was saved and that it can be opened in a browser for full formatting.
**Excel Model:**
- Save the generated Excel model to `reports/{TICKER}_model.xlsx`.
- Tell the user where the `.xlsx` file was saved.
- Note that yellow cells in the Projections tab are editable inputs.
**Summary:**
- 3-4 sentence executive summary
- Key valuation range (DCF implied price + comps range)
- Top 3 findings
- Bull upside % vs bear downside % risk/reward assessment
All financial figures must use Daloopa citation format: [$X.XX million](https://daloopa.com/src/{fundamental_id})
Referenced files: 1
precedent-transactions9.27 KB
---
name: precedent-transactions
description: Precedent M&A transactions analysis with deal multiples and acquisition
history
---
Build a precedent transactions analysis for the company named in the user's request. If no ticker or company is provided, ask for one before proceeding.
This is the third pillar of valuation (alongside trading comps and DCF) — it answers: what have acquirers actually paid for businesses like this one? The output is two tables: comparable M&A transactions with deal multiples, and the subject company's own acquisition history.
**Before starting, read `../data-access.md` for data access methods and `../design-system.md` for formatting conventions.** Follow the data access detection logic and design system throughout this skill.
Follow these steps:
## 1. Company Lookup
Look up the company by ticker using `discover_companies`. Capture:
- `company_id`
- `latest_calendar_quarter` — anchor for all period calculations below (see `../data-access.md` Section 1.5)
- `latest_fiscal_quarter`
- Firm name for report attribution (default: "Daloopa") — see `../data-access.md` Section 4.5
Identify:
- Full legal company name
- Primary stock exchange and reporting currency
- Country of domicile and primary operations
- Industry and sub-sector
- Approximate revenue and EBITDA scale (to calibrate comparable deal sizing)
## 2. Subject Company Financials
Calculate 4 quarters backward from `latest_calendar_quarter`. Pull from Daloopa:
- Revenue (compute trailing 4Q / LTM total)
- EBITDA (compute trailing 4Q; if not available, use Operating Income + D&A, label "(calc.)")
- Operating Income
- Net Income
- Free Cash Flow (OCF - CapEx, label "(calc.)")
These serve as the reference point for comparing deal multiples — what would an acquirer be paying relative to this company's current financials?
## 3. Identify Comparable Precedent Transactions
Find 8-15 completed M&A transactions from the last 7-10 years involving target companies comparable to the subject. "Comparable" means:
- Same industry and sub-sector
- Similar business model (e.g., SaaS, semiconductor IP, consumer internet, industrials)
- Roughly comparable scale — within ~0.5x-4x of the subject's revenue
- Completed transactions only (not rumored, not pending)
**Research sources in priority order:**
1. **SEC EDGAR** (for US targets) — SC TO, DEFM14A, 8-K filings disclose EV and deal terms
2. **Equivalent regulators for non-US targets:** FCA (UK), EDINET (Japan), HKEx (Hong Kong), SEDAR+ (Canada), ASX (Australia)
3. **Official investor relations press releases** from acquirer or target
4. **Reputable financial news:** Reuters, Bloomberg, Wall Street Journal, Financial Times
Use web search to identify deals: `"{industry} acquisitions {sub-sector} last 10 years"`, `"{TICKER} comparable M&A transactions"`, `"{sector} deal comps precedent transactions"`.
**Do NOT use:** finance blogs, Seeking Alpha, Reddit, anonymous wiki contributions, or aggregators without a traceable primary source.
For each transaction, capture:
- Announcement date
- Acquirer name
- Target name
- Transaction Enterprise Value
- Deal consideration (All Cash / All Stock / Cash + Stock)
- Source (press release URL, SEC filing, or regulatory filing)
## 4. Source Target Financials via Daloopa
For each target company in the precedent transactions table, source LTM Revenue and EBITDA from Daloopa:
1. **Look up the target** using `discover_companies` with the target's ticker or name
2. **Find relevant series** using `discover_company_series` with keywords `["revenue", "EBITDA"]` and the appropriate period (the last complete fiscal year before the deal announcement)
3. **Pull the data** using `get_company_fundamentals` with the discovered series IDs
4. For EBITDA, look for series containing "Adjusted EBITDA", "EBITDA", or fall back to "Operating Income" + D&A
5. If a target is not in Daloopa (e.g., pre-IPO targets, private companies), fall back to SEC filings, press releases, or regulatory filings
**Daloopa is the primary source.** Only fall back to other sources when a target is genuinely unavailable in the database.
## 5. Compute Deal Multiples
For each transaction where both EV and financials are available:
- **EV/Revenue** = Transaction EV ÷ LTM Revenue
- **EV/EBITDA** = Transaction EV ÷ LTM EBITDA
- Round to one decimal, append "x"
- If a figure cannot be sourced, mark as **N/A** — do not estimate
Compute summary statistics (excluding N/A values):
- 75th Percentile
- **Average** (bold)
- **Median** (bold)
- 25th Percentile
If fewer than 3 valid data points exist for a multiple, note that the statistic is not meaningful.
## 6. Subject Company's Acquisition History
Find deals where the subject company itself was the acquirer. Sources: company IR page, SEC 8-K or equivalent filings, Reuters/Bloomberg/WSJ.
For each acquisition, capture:
- Date
- Target name
- Deal value (if disclosed)
- Consideration (Cash / Stock / Mix)
- Strategic rationale (one sentence from press release or filing)
## 7. Implied Valuation for Subject Company
Apply the precedent transaction multiples to the subject's current financials:
| Methodology | Percentile | Multiple | Subject LTM Metric | Implied EV |
|---|---|---|---|---|
| EV/Revenue | Median | XX.Xx | $XXX | $XXX |
| EV/Revenue | 25th-75th | XX.Xx-XX.Xx | $XXX | $XXX-$XXX |
| EV/EBITDA | Median | XX.Xx | $XXX | $XXX |
| EV/EBITDA | 25th-75th | XX.Xx-XX.Xx | $XXX | $XXX-$XXX |
Convert implied EV to implied equity value (EV - Net Debt) and implied share price where market data is available (see `../data-access.md` Section 2). Compare to current market price.
**Context matters more than precision:**
- Precedent transaction multiples are snapshots from specific deal contexts (competitive auctions, strategic premiums, distressed sales). Note which deals had unusual dynamics.
- Control premiums are embedded in these multiples — a public market investor should not expect to realize the full precedent transaction value unless a takeout actually happens.
- If the current market cap is well below precedent transaction implied value, that's a signal of takeout optionality, not necessarily undervaluation.
## 8. Deal Environment Commentary
Search filings and news for context on the M&A environment:
- Search: `"{industry} M&A outlook {current_year}"` — deal activity trends
- Search: `"{TICKER} acquisition target rumors"` — is the subject itself a takeout candidate?
Summarize in 3-5 bullets:
- Is deal activity in this sector accelerating or declining?
- What are typical premiums being paid (control premium trends)?
- Are strategic buyers or financial sponsors (PE) driving activity?
- Any regulatory headwinds to deals in this space (antitrust scrutiny)?
- Is the subject company a plausible acquisition target? Why or why not?
## 9. Save Report
Save to `reports/{TICKER}_precedent_transactions.html` using the HTML report template from `../design-system.md`. Write the full analysis as styled HTML with the design system CSS inlined. This is the final deliverable — no intermediate markdown step needed.
The report should include interactive features:
- **Clickable acquirer names** in Table 1 that open a modal showing all source links for that transaction (press release, SEC filing, Daloopa data links). Implement with `data-` attributes and safe DOM methods (`createElement`, `textContent`, `appendChild`) — never `innerHTML`.
- **Consideration badges** styled inline: All Cash (green background), All Stock (purple background), Cash + Stock (amber background).
Structure the report with these sections:
```
<h1>{Company Name} ({TICKER}) — Precedent Transactions Analysis</h1>
<p>Generated: {date}</p>
<h2>Summary</h2>
{2-3 sentences: What do precedent transactions imply for this company's valuation? How does it compare to the current market price?}
<h2>Subject Company Overview</h2>
{Exchange, currency, industry, LTM Revenue and EBITDA with Daloopa citations}
{Note: "Revenue and EBITDA sourced from Daloopa where available"}
<h2>Selected Precedent Transactions</h2>
<table>
| Date | Acquirer | Target | EV ($M) | LTM Rev ($M) | LTM EBITDA ($M) | EV/Rev | EV/EBITDA | Consideration |
{data rows with Daloopa-cited financials, footnote superscripts, clickable acquirers}
| 75th Percentile | | | | | | XX.Xx | XX.Xx | |
| **Average** | | | | | | **XX.Xx** | **XX.Xx** | |
| **Median** | | | | | | **XX.Xx** | **XX.Xx** | |
| 25th Percentile | | | | | | XX.Xx | XX.Xx | |
</table>
<h2>Implied Valuation</h2>
<table>
| Methodology | Multiple | Subject Metric | Implied EV | Implied Equity | Implied Price | vs Current |
{valuation bridge using median and range multiples}
</table>
<h2>{Company Name} Acquisition History</h2>
<table>
| Date | Target | Deal Value | Consideration | Strategic Rationale |
{company's own M&A deals}
</table>
<h2>Deal Environment</h2>
<ul>{3-5 bullets on sector M&A trends, control premiums, takeout potential}</ul>
<h2>Sources</h2>
{Numbered footnote list — each deal with press release link, SEC filing, Daloopa data links}
{Data sourced from Daloopa attribution}
```
All financial figures from Daloopa must use citation format: `<a href="https://daloopa.com/src/{fundamental_id}">$X.XX million</a>`
Tell the user where the HTML report was saved.
Highlight: what precedent transactions imply about the company's takeout value, how it compares to the current market price, and whether the sector M&A environment supports deal activity.
Referenced files: 1
research-note15.1 KB
---
name: research-note
description: Generate a professional Word document research note
---
Generate a professional research note (HTML report) for the company specified by the user named in the user's request. If no ticker or company is provided, ask for one before proceeding.
**Before starting, read `../data-access.md` for data access methods and `../design-system.md` for formatting conventions.** Follow the data access detection logic and design system throughout this skill.
This is an orchestrator skill that gathers comprehensive data, then renders a styled HTML report using the HTML Report Template from `../design-system.md` (full CSS inlined, zero dependencies).
## Phase A — Company Setup
Look up the company by ticker using `discover_companies`. Capture:
- `company_id`
- `latest_calendar_quarter` — anchor for all period calculations (see `../data-access.md` Section 1.5)
- `latest_fiscal_quarter`
- Firm name for report attribution (default: "Daloopa") — see `../data-access.md` Section 4.5
Get current stock price, market cap, shares outstanding, beta, and trading multiples for {TICKER} using the 3-step resolution: (1) MCP market data tools if available, (2) web search, (3) sensible defaults (see `../data-access.md` Section 2 for how to source market data).
Initialize context: `context = {company_name, ticker, date, price, market_cap, firm_name, ...}`
## Phase B — Core Financials + Cost Structure
Calculate 8 quarters backward from `latest_calendar_quarter`. Pull Income Statement metrics:
- Revenue, Gross Profit, Operating Income, Net Income, Diluted EPS
- EBITDA (compute as Op Income + D&A if not direct, label "(calc.)")
- Operating Expenses (SG&A, R&D where available)
Pull Cash Flow & Balance Sheet:
- Operating Cash Flow, CapEx, Free Cash Flow (OCF - CapEx, label "(calc.)")
- Cash, Total Debt, Net Debt
- D&A
**For every value returned by `get_company_fundamentals`, record its `fundamental_id` (the `id` field).** Store each data point as `{value, fundamental_id}` so citations can be rendered in the final document.
Compute margins and YoY growth rates for each quarter. Build `context.financials` with tables. Every Daloopa-sourced number must include its citation link: `[$X.XX million](https://daloopa.com/src/{fundamental_id})`.
### Cost Structure & Margin Analysis
After the core financial pull, add:
- **COGS driver identification**: Search for cost-related series ("cost of goods", "materials", "manufacturing", "input cost"). Identify 3-5 biggest cost line items and their trends over 8Q.
- **OpEx breakdown**: Pull R&D and SG&A separately. Compute R&D % of revenue and SG&A % of revenue trends over 8Q.
- **Margin driver analysis**: For each major margin (gross, operating, net), identify what's driving expansion or compression — pricing power, cost leverage, mix shift, or one-time items.
New context keys:
- `cost_margin_analysis` (string) — narrative explaining what's driving margins, with Daloopa citations
- `opex_breakdown_table` (dynamic table) — [{metric, Q1, Q2, ...}] rows for R&D, SG&A, Other OpEx, each with absolute values and % of revenue sub-rows
## Phase C — KPIs, Segments & Industry Deep Dive
Think about what KPIs matter most for THIS company's business model. Search for:
- Company-specific operating KPIs (subscribers, units, ARPU, retention, etc.)
- Segment revenue breakdown
- Geographic revenue breakdown
- Share count and buyback activity
Pull the same 8 quarters (from `latest_calendar_quarter`). Build `context.kpis` and `context.segments`.
### Industry-Specific Deep Dive
After the KPI/segment pull, determine the company's sector and apply the relevant analysis template:
- **Manufacturing/Industrial**: Bookings & backlog, book-to-bill ratio, pipeline by geography, capacity utilization
- **SaaS/Technology**: ARR/MRR trajectory, net retention rate, customer cohort analysis, RPO/deferred revenue trends
- **Retail/Consumer**: Same-store sales, store count trajectory, traffic vs ticket decomposition, inventory health
- **Financials/Banks**: NIM trajectory, provision trends, loan growth by category, capital ratios (CET1, TCE)
- **Healthcare/Pharma**: Pipeline summary (drug, indication, phase, milestone), product revenue breakdown, patent cliff timeline
- **Energy**: Production volumes, realized pricing vs benchmark, proved reserves, breakeven analysis
Search for relevant series using `discover_company_series` with sector-appropriate keywords. Pull available data and build the narrative.
New context key:
- `industry_deep_dive` (string) — sector-specific analysis narrative with Daloopa citations, organized by the relevant template above
## Phase D — Guidance Track Record (follows /guidance-tracker methodology)
Search for guidance series ("guidance", "outlook", "forecast", "estimate", "target").
Pull guidance and corresponding actuals. Apply +1 quarter offset rule.
Compute beat/miss rates and patterns.
Build `context.guidance` (set `context.has_guidance = true/false`).
## Phase E — What You Need to Believe (replaces Scenario Analysis)
Using the financial baseline from Phase B:
- Compute trailing 4Q totals for key metrics (revenue, EBITDA, EPS, FCF)
- Analyze segment-level trends and inflections
Build **falsifiable bull/bear beliefs** instead of probability-weighted scenarios:
### Bull Beliefs (To Go Long)
Write 4-6 numbered beliefs, each with:
- One **bold statement** (the belief itself)
- 2-3 sentences of **evidence** with Daloopa citations supporting why this could be true
- Each belief must be **falsifiable** — testable with observable data within 6 months
Example format: "1. **Revenue growth re-accelerates to 15%+ as AI monetization scales.** Cloud segment grew [$X.Xbn](link) last quarter, up X% YoY, with management noting..."
### Bear Beliefs (To Go Short)
Same format — 4-6 numbered falsifiable beliefs with evidence for the downside case.
### Valuation Math
For each side:
- Bull target: forward multiple × forward earnings estimate = price target. Show the math.
- Bear target: same structure with bear-case multiple and earnings.
### Risk/Reward Assessment
- Compare bull upside % vs bear downside % from current price
- If asymmetry is significant (e.g., 30% upside vs 40% downside), flag it explicitly
- State which side has the better risk/reward and why
New context keys:
- `bull_beliefs` (string) — numbered falsifiable beliefs with evidence
- `bear_beliefs` (string) — numbered falsifiable beliefs with evidence
- `bull_target` (string) — price target + valuation math
- `bear_target` (string) — price target + valuation math
- `risk_reward_assessment` (string) — asymmetry analysis
## Phase F — Capital Allocation (follows /capital-allocation methodology)
Pull buyback, dividend, share count, FCF data.
Compute shareholder yield, FCF payout ratio, net leverage.
Build `context.capital_allocation`.
## Phase G — Valuation (follows /dcf + /comps methodology)
**DCF:**
- Get risk-free rate using the 3-step resolution: (1) MCP market data tools if available, (2) web search, (3) sensible defaults (see `../data-access.md` Section 2)
- Calculate WACC using CAPM
- Project FCF 5 years manually (describe methodology inline and perform calculations directly)
- Compute terminal value, implied share price, sensitivity table
- Build `context.dcf` (set `context.has_dcf = true`)
**Comps:**
- Identify 5-8 peers
- Get peer trading multiples using the 3-step resolution: (1) MCP market data tools if available, (2) web search, (3) sensible defaults (see `../data-access.md` Section 2)
- If consensus forward estimates are available (`../data-access.md` Section 3), include forward multiples
- Compute implied valuation range from peer multiples
- Build `context.comps` (set `context.has_comps = true`)
## Phase H — Qualitative Research + News & Catalysts
### SEC Filing Research
Search SEC filings across multiple queries:
- "risk" / "uncertainty" / "challenge" for risk factors
- "growth" / "opportunity" / "expansion" for growth drivers
- "competition" / "market share" for competitive dynamics
- "outlook" / "guidance" for management's forward view
- Company-specific strategic topics (e.g., "AI", "cloud", etc.)
Extract and organize into:
- `context.risks` — ranked list of risks with impact/probability
- `context.investment_thesis` — variant perception, thesis pillars, catalysts
- `context.company_description` — 2-3 sentence business description
### News & Catalysts via WebSearch
Run 4 WebSearch queries to gather recent external context:
1. `"{TICKER} {company_name} news {year}"` — recent headlines and developments
2. `"{TICKER} analyst upgrade downgrade price target"` — sell-side sentiment shifts
3. `"{TICKER} catalysts risks"` — forward-looking events and risk factors
4. `"{company_name} industry outlook {sector}"` — macro and industry trends
Organize results into three new context keys:
- `news_timeline` (string) — 6-10 key events from the last 6-12 months in reverse chronological order. Each event: date, headline, 1-sentence impact, sentiment tag (Positive / Negative / Mixed / Upcoming). Format as a numbered list.
- `forward_catalysts` (string) — Organized by timeframe:
- **Near-term (0-3 months, HIGH priority)**: earnings dates, product launches, regulatory decisions
- **Medium-term (3-12 months, MEDIUM priority)**: strategic milestones, contract renewals, industry events
- **Long-term (1-3 years, LOW priority)**: secular trends, market expansion, competitive dynamics
- `policy_backdrop` (string) — Macro/regulatory context affecting the company. Tariffs, regulation, interest rates, sector-specific policy. Leave empty string if not material.
## Phase I — Charts
Present all chart data in well-formatted tables. No chart generation needed.
## Phase J — Synthesis + Tensions + Monitoring
This is the most judgment-intensive step. Be honest and critical — the reader is a professional investor who needs your real assessment, not a balanced summary.
### Core Synthesis
Write:
- **Executive Summary**: 3-4 sentence TL;DR covering current state, key thesis, valuation view. Include a clear directional view — is this stock attractive, fairly valued, or overvalued at the current price?
- **Variant Perception**: What does the market think vs what do you see in the data? Where is the consensus wrong? If you agree with consensus, say that too — but explain what could change.
- **Key Findings**: Top 3-5 most notable data points or trends — prioritize what changes the investment thesis, not just what's interesting
- **Red Flags & Concerns**: Any quality-of-earnings issues, sustainability questions, or risks the market may be underpricing
- Build `context.executive_summary`, `context.variant_perception`
### Five Key Tensions
Identify the 5 most critical bull/bear debates for this stock. Each tension is a single line that frames both sides. Alternate between bullish-leaning and bearish-leaning tensions. Every tension must reference a specific data point from the analysis.
Format as a numbered list:
1. "[Bullish factor] vs [Bearish factor]" — cite the specific metric
2. "[Bearish factor] vs [Bullish factor]" — cite the specific metric
...etc.
Build `context.five_key_tensions` (string).
### Monitoring Framework
Build two monitoring lists for ongoing tracking:
**Quantitative Monitors** — 5-7 specific metrics with explicit thresholds:
- Format: "Metric: current value → bull threshold / bear threshold"
- Example: "Gross Margin: 45.2% → above 46% confirms pricing power / below 43% signals cost pressure"
**Qualitative Monitors** — 5-7 factors to watch:
- Management tone shifts on earnings calls
- Competitive dynamics (new entrants, pricing pressure)
- Regulatory developments
- Customer concentration changes
- Capital allocation pivots
Build `context.monitoring_quantitative` and `context.monitoring_qualitative` (strings, numbered lists).
### Structured Tables
Also build structured tables for the template:
- `context.key_metrics_table` — [{metric, value, vs_prior}] for the exec summary table
- `context.financials_table` — [{metric, q1, q2, ...}] for the financial analysis section
- `context.segments_table`, `context.geo_table`, `context.shares_outstanding_table`
- `context.opex_breakdown_table` — [{metric, q1, q2, ...}] for R&D, SG&A, % of revenue rows
- `context.guidance_table`, `context.comps_table`, etc.
## Phase K — Render HTML Report
Using the HTML Report Template from `../design-system.md`, generate a styled HTML report with full CSS inlined. The report should include:
**Header Section:**
- Company name and ticker
- Report date and firm attribution
- Five Key Tensions (numbered list)
**Section 1: Executive Summary**
- Key metrics table
- Executive summary narrative
- Variant perception
**Section 2: Company Overview**
- Business description
- Investment thesis
**Section 3: Recent News & Catalysts**
- News timeline
- Forward catalysts
- Policy backdrop
**Section 4: Financial Analysis**
- Financials table (8 quarters)
- Cost structure & margin analysis
- OpEx breakdown table
- Segment and geographic tables
- Share count table
**Section 5: Industry-Specific Analysis**
- Industry deep dive narrative
**Section 6: Guidance Track Record**
- Guidance table and beat/miss analysis (if available)
**Section 7: What You Need to Believe**
- Bull beliefs with valuation target
- Bear beliefs with valuation target
- Risk/reward assessment
**Section 8: Catalysts**
- Forward catalysts
- Policy backdrop
**Section 9: Capital Allocation**
- Capital allocation commentary
**Section 10: Valuation**
- DCF summary and sensitivity (if available)
- Comps commentary (if available)
**Section 11: Risks**
- Risks summary
**Section 12: Monitoring Framework**
- Quantitative monitors
- Qualitative monitors
**Appendix:**
- Additional context or data
### Context Key Checklist
Verify these keys exist before rendering (set empty string if data unavailable):
**Cover & Summary:**
`company_name`, `ticker`, `date`, `price`, `market_cap`, `five_key_tensions`, `executive_summary`, `key_metrics_table`
**Thesis & Overview:**
`investment_thesis`, `variant_perception`, `company_description`
**News:**
`news_timeline`
**Financials:**
`financials_table`, `cost_margin_analysis`, `opex_breakdown_table`, `segments_table`, `geo_table`, `shares_outstanding_table`
**Industry:**
`industry_deep_dive`
**Guidance:**
`has_guidance`, `guidance_track_record`
**What You Need to Believe:**
`bull_beliefs`, `bull_target`, `bear_beliefs`, `bear_target`, `risk_reward_assessment`
**Catalysts:**
`forward_catalysts`, `policy_backdrop`
**Capital Allocation:**
`capital_allocation_commentary`
**Valuation:**
`has_dcf`, `dcf_summary`, `has_comps`, `comps_commentary`
**Risks:**
`risks_summary`
**Monitoring:**
`monitoring_quantitative`, `monitoring_qualitative`
**Appendix:**
`appendix_content`
## Output
Save the styled HTML report as a local file and summarize the output. Tell the user:
- A 3-4 sentence executive summary of the research note
- Key findings and valuation range
- Tell them where the HTML file was saved and that it can be opened in a browser for full formatting
**Citation enforcement:** Every financial figure from Daloopa in the HTML report must use citation format: `[$X.XX million](https://daloopa.com/src/{fundamental_id})`. If a number came from `get_company_fundamentals`, it must have a citation link. No exceptions.
Referenced files: 1
setup2 KB
--- name: setup description: Verify Daloopa MCP connection and show available skills --- Walk the user through verifying their Daloopa setup for Codex or ChatGPT. Be conversational and helpful. ## Step 1: Verify Runtime Confirm the user is working in Codex, ChatGPT, or another OpenAI environment that can use skills. Explain that this skill checks whether the Daloopa MCP tools are available. ## Step 2: Verify MCP Connection This plugin connects to two Daloopa MCP servers: - **daloopa** (`mcp.daloopa.com/server/mcp`) - Financial data (fundamentals, KPIs, SEC filings) - **daloopa-docs** (`docs.daloopa.com/mcp`) - Daloopa knowledgebase (API docs, how-tos, usage help) Run a quick test by calling `discover_companies` with a well-known ticker like "AAPL" to confirm the data MCP server is connected and responding. Show the user the result. If this fails: - Check that `.mcp.json` is present and configured for the Daloopa MCP servers. - In Codex, reinstall or reload the plugin after changing MCP configuration. - In ChatGPT, verify that the Daloopa MCP connector or equivalent tool access is enabled. - If the server returns `401` or `Reauthentication required`, restart the Daloopa OAuth/login flow in the current environment. - On first use, OAuth may open a browser window for Daloopa login. ## Step 3: Quick Tour Tell the user about the available analysis skills. Use natural-language examples such as: - "Create a tearsheet for AAPL." - "Review MSFT earnings and guidance." - "Build a DCF valuation for NVDA." - "Create an industry comp sheet for AAPL and peers." Each reporting skill saves generated files to the `reports/` directory when file access is available. ## Step 4: Note on Enhanced Features For file-heavy workflows such as Word research notes, Excel models, and pitch decks, use the local document, spreadsheet, or presentation generation workflow available in the current OpenAI environment. If a file cannot be generated in the current environment, provide the complete structured content and explain the limitation.
Referenced files: 1
supply-chain53.7 KB
---
name: supply-chain
description: Interactive supply chain dashboard mapping suppliers, customers, and
financial interdependencies
---
Generate an interactive supply chain dashboard for the company named in the user's request. If no ticker or company is provided, ask for one before proceeding.
**Before starting, read `../data-access.md` for data access methods and `../design-system.md` for formatting conventions.** Follow the data access detection logic and design system throughout this skill.
This skill maps the upstream (supplier) and downstream (customer) relationships for a target company, quantifying financial interdependencies in both directions. The output enables an analyst to understand: Who are the critical suppliers and customers? Where is concentration risk on both sides? Which suppliers depend heavily on this company for revenue? Which customers depend on this company's products as critical inputs? How does a shock propagate both upstream (demand shock to suppliers) and downstream (supply disruption to customers)?
## Output Format
The final deliverable is a **single self-contained HTML file** with:
- Embedded CSS and JavaScript (no external dependencies)
- **Tier-grouped Canvas network visualization** — columns: Tier 3 → Tier 2 → Tier 1 → Target → Customers, with connection lines. Clickable nodes open detail overlays.
- **Inventory Health Overview table** — for all suppliers: RM%, WIP%, FG% of total inventory shown as stacked colored bars, plus latest total inventory value
- **Supplier cards grouped by tier** — Tier 1 (Critical/Sole-source), Tier 2 (Major Component), Tier 3 (Specialty) with click-to-expand detail overlays
- **Detail overlays** for each supplier containing:
- 10-quarter financial table (Revenue, Gross Profit, Net Income, Gross Margin %)
- 10-quarter inventory breakdown table (Raw Materials, WIP, Finished Goods, Total, RM%, WIP%, FG%)
- Canvas chart: stacked bar chart of inventory composition with Gross Margin % line overlay
- Business description and relationship to target company
- **Customer cards grouped by category** — Channel Partners, Enterprise/B2B, End-Market Exposure — with click-to-expand detail overlays matching supplier depth
- **Detail overlays** for each customer containing:
- 10-quarter financial table (Revenue, Gross Profit, Net Income, Gross Margin %)
- 10-quarter inventory breakdown table (Raw Materials, WIP, Finished Goods, Total, RM%, WIP%, FG%)
- Canvas chart: stacked bar chart of inventory composition with Gross Margin % line overlay
- Business description and relationship to target company
- **Upstream Shock Analysis** section — narrative analysis of how a demand/supply shock to the target company ripples upstream through the supplier chain, with an impact matrix table (Revenue Impact, Margin Impact, Overall Risk per supplier)
- **Downstream Shock Analysis** section — narrative analysis of how a supply disruption at the target company ripples downstream through the customer chain, with an impact matrix table (Input Criticality, Switching Cost, Revenue at Risk, Overall Disruption Risk per customer)
- All financial figures hyperlinked to Daloopa source citations
- A "Download as PDF" button (uses `window.print()`)
**DOM Safety**: All JavaScript MUST use `createElement()` + `textContent` + `appendChild()` for DOM construction. NEVER use `innerHTML`, `outerHTML`, or any HTML-string injection methods. Use helper functions like `ce(tag)`, `ca(el, attrs)`, `cA(parent, children)` to keep code compact.
Save to `reports/{TICKER}_supply-chain.html` and open it with `open`.
---
## RESEARCH WORKFLOW
This is a multi-phase research process. Each phase builds on the previous one. Maximize parallelism across independent API calls.
### Phase 1: Target Company Identification
1. Use `discover_companies` with the ticker symbol to get the `company_id`, `latest_calendar_quarter`, and `latest_fiscal_quarter`. Note the firm name for report attribution (default: "Daloopa") — see `../data-access.md` Section 4.5.
2. Pull key financials for the target company:
- Use `discover_company_series` with keywords: ["revenue", "cost of goods", "gross profit", "operating income", "net income", "total cost"]
- Calculate 4 quarters backward from `latest_calendar_quarter`. Use `get_company_fundamentals` for those periods to get TTM figures.
3. Note the target company's total COGS / cost of revenue (TTM) — this is the denominator for supplier % calculations.
### Phase 2: Supplier Identification
Run these concurrently to build a comprehensive supplier list:
**2a. Daloopa Document Search:**
- Search keywords: ["supplier", "vendor", "purchase", "procurement"] across last 2-4 quarters
- Search keywords: ["supply agreement", "supply chain", "manufacturing"] across last 2-4 quarters
- Search keywords: ["sole source", "single source", "key supplier"] across last 2-4 quarters
- Search keywords: ["concentration", "significant supplier"] across last 2-4 quarters
- Search the company's 10-K specifically for supplier disclosures
**2b. Web Research:**
- `"[TICKER] [company name] key suppliers list 2025 2026"` — supplier identification
- `"[TICKER] supply chain analysis suppliers"` — analyst/industry reports
- `"[TICKER] 10-K supplier disclosure"` — SEC filing analysis
- `"[company name] supply chain map"` — industry supply chain maps
- `"[company name] supplier concentration risk"` — risk analysis
- `"[company name] who manufactures for [company]"` — manufacturing partners
- `"[company name] component suppliers"` — component-level supply chain
**2c. Industry-Specific Supplier Research:**
For each industry, search for the known critical supply chain relationships:
- **Tech/Hardware**: semiconductor foundries (TSMC, Samsung), display (Samsung, LG, BOE), memory (Samsung, SK Hynix, Micron), sensors/cameras (Sony), glass (Corning), connectors (Amphenol), batteries (CATL, LG Energy), PCB/assembly (Foxconn/Hon Hai, Pegatron, Luxshare)
- **Automotive**: battery (CATL, Panasonic, LG Energy), semiconductors (Infineon, NXP, ON Semi, TI), steel (Nippon, POSCO), tires (Michelin, Bridgestone), glass (AGC, Saint-Gobain)
- **Pharma**: CDMOs (Lonza, Samsung Biologics, Catalent), API suppliers, packaging, distribution
- **Retail**: brand suppliers, logistics (FedEx, UPS), packaging
- **Energy**: equipment (Baker Hughes, Schlumberger), pipe (Tenaris), chemicals
### Phase 3: Supplier Financial Analysis
For each identified supplier (aim for 8-15 key suppliers):
1. **Discover the supplier** using `discover_companies` with their ticker
2. **Pull key financials** from Daloopa:
- `discover_company_series` with keywords: ["revenue", "net income", "gross margin", "operating margin"]
- `get_company_fundamentals` for the same 4 calendar quarters as the target company
3. **Determine revenue concentration**:
- Search Daloopa documents for the supplier: keywords ["[target company name]", "customer", "concentration"]
- Web search: `"[supplier name] [target company] revenue percentage customer"`
- Web search: `"[supplier name] 10-K customer concentration"`
- Many suppliers disclose their top customers in 10-K filings — look for "customers that accounted for 10% or more of revenue"
4. **Determine COGS attribution** (what % of target's costs is this supplier):
- This is often estimated. Use logic like:
- If Apple's COGS is ~$200B TTM and TSMC's revenue from Apple is ~$70B, then TSMC = ~35% of COGS
- Cite the source of each estimate (analyst report, 10-K disclosure, industry research)
- Flag when this is an estimate vs. a disclosed figure
5. **Business & product description**: What does this supplier provide? Be specific (e.g., "5nm/3nm chip fabrication for A-series and M-series SoCs" not just "semiconductors")
### Phase 3b: Inventory & 10-Quarter Financial Data
For the target company AND each identified supplier (8-15 companies), pull **10 quarters** of data:
1. **Discover inventory series** using `discover_company_series` with keywords: ["raw material", "work in process", "finished good", "inventory", "inventories"]
- Look for separate RM, WIP, FG series, plus a total inventory series
- Some companies report "carrying amount" breakdowns — use those for RM/WIP/FG splits
2. **Discover financial series** using `discover_company_series` with keywords: ["revenue", "gross profit", "net income", "gross margin"]
3. **Pull 10 quarters** using `get_company_fundamentals`. Calculate 10 quarters backward from `latest_calendar_quarter`.
- Example: if latest is Q4'25, pull ["2023Q3", "2023Q4", "2024Q1", "2024Q2", "2024Q3", "2024Q4", "2025Q1", "2025Q2", "2025Q3", "2025Q4"]
4. **Compute inventory composition**: For each quarter, calculate RM%, WIP%, FG% of total inventory
- High WIP% can signal production bottlenecks
- Rising FG% can signal demand weakness
- Rising RM% can signal supply hoarding or procurement buildup
5. **Handle missing data gracefully**: Some suppliers may not report full inventory breakdowns — show what's available and note gaps
6. **Multi-currency handling**: Note the reporting currency for each company (USD, NTD, KRW, EUR, etc.) and display with appropriate units (e.g., "NTD B" for TSMC, "KRW T" for Samsung)
Run inventory and financial series pulls in parallel across all companies.
### Phase 4: Customer / Downstream Identification
The downstream side requires the same research rigor as the upstream side. Run these concurrently to build a comprehensive customer list:
**4a. Daloopa Document Search (target company filings):**
- Search keywords: ["customer", "contract", "agreement", "channel"] across last 2-4 quarters
- Search keywords: ["customer concentration", "significant customer", "major customer"] across last 2-4 quarters — many companies disclose customers >10% of revenue
- Search keywords: ["distribution", "retail partner", "reseller", "licensee"] across last 2-4 quarters
- Search keywords: ["accounts receivable", "contract asset", "deferred revenue"] — concentration in A/R often reveals customer dependency even when not explicitly named
- Search the company's 10-K specifically for customer disclosures and segment end-market breakdowns
**4b. Web Research:**
- `"[TICKER] [company name] major customers list"` — direct customer identification
- `"[TICKER] customer concentration revenue breakdown"` — analyst/industry reports
- `"[TICKER] 10-K customer disclosure"` — SEC filing analysis
- `"[company name] who buys from [company name]"` — downstream identification
- `"[company name] channel partners distributors"` — channel analysis
- `"[company name] end market exposure"` — end-market breakdown
**4c. Industry-Specific Customer Research:**
For each industry, search for the known critical downstream relationships:
- **Semiconductors**: Which OEMs depend on these chips? (e.g., NVDA → hyperscalers MSFT/AMZN/GOOG, QCOM → smartphone OEMs AAPL/Samsung, AVGO → networking OEMs Cisco/Arista)
- **Components/Materials**: Which assemblers or product companies use these inputs? (e.g., Corning → AAPL/Samsung for glass, TSMC → fabless semis NVDA/AMD/AAPL)
- **Software/Platform**: Who builds on this platform? (e.g., MSFT Azure → ISVs, AAPL App Store → developers, Salesforce → SI partners)
- **Consumer products**: Channel partners (carriers, retailers, e-commerce) and enterprise customers
- **Industrial/B2B**: End-market verticals (auto, aerospace, medical, telecom)
- **Pharma/Biotech**: Distributors (McKesson, AmerisourceBergen), PBMs, hospital systems
**4d. Customer Financial Analysis:**
For each identified customer (aim for 6-10 key customers):
1. **Discover the customer** using `discover_companies` with their ticker
2. **Pull key financials** from Daloopa:
- `discover_company_series` with keywords: ["revenue", "net income", "gross margin", "cost of goods", "operating income"]
- `get_company_fundamentals` for the same 4 calendar quarters as the target company
3. **Determine revenue attribution** (what % of target's revenue comes from this customer):
- Search Daloopa documents for the target company: keywords ["[customer name]", "customer", "concentration", "accounts receivable"]
- Web search: `"[target company] [customer name] revenue percentage"`
- Web search: `"[target company] 10-K customer concentration"`
- Many companies disclose customers that account for >10% of revenue in their 10-K
4. **Determine input criticality** (what % of customer's COGS comes from target):
- This is the inverse of the supplier analysis: if the target sells $X to a customer with $Y in COGS, then input share = X/Y
- Search for: `"[customer name] [target company] supplier dependence"` or `"[customer name] key inputs components"`
- Flag whether the target's product is a critical, hard-to-substitute input vs. a commodity with alternatives
5. **Assess switching costs**: Can the customer easily replace the target company's product?
- **High switching cost**: Custom/proprietary integration, long qualification cycles, regulatory requirements (e.g., TSMC's process node — customers can't easily switch foundries mid-design)
- **Medium switching cost**: Some integration required but alternatives exist with 6-12 month transition
- **Low switching cost**: Commodity input, multiple qualified alternatives, short switching timeline
6. **Business & product description**: What does the target supply to this customer? Be specific (e.g., "A17 Pro and M4 SoCs fabricated on TSMC's 3nm process" not just "chips")
### Phase 4e: Customer Inventory & 10-Quarter Financial Data
Mirror Phase 3b for the customer side. For each identified customer (6-10 companies), pull **10 quarters** of data:
1. **Discover inventory series** using `discover_company_series` with keywords: ["raw material", "work in process", "finished good", "inventory", "inventories"]
- Look for separate RM, WIP, FG series, plus a total inventory series
2. **Discover financial series** using `discover_company_series` with keywords: ["revenue", "gross profit", "net income", "gross margin"]
3. **Pull 10 quarters** using `get_company_fundamentals` with the same 10 calendar quarters as the target company and suppliers (calculated from `latest_calendar_quarter`)
4. **Compute inventory composition**: RM%, WIP%, FG% of total inventory
- For customers, inventory signals have different meaning:
- Rising RM% at a customer → they're stocking up on target company's inputs (bullish for target's near-term revenue, but may mean future destocking)
- Falling RM% → customer is drawing down inventory, may signal reduced orders ahead
- Rising FG% at a customer → demand for the customer's end product is softening, which will flow back upstream to the target
5. **Handle missing data gracefully**: Some customers may not report inventory breakdowns — show what's available
6. **Multi-currency handling**: Same as suppliers — note reporting currency
Run customer inventory and financial series pulls in parallel, and in parallel with supplier pulls where possible.
### Phase 5: Tier 2 Supplier Research
For the top 3-5 most important Tier 1 suppliers, repeat a lighter version of Phase 2-3:
1. Identify their key suppliers (Tier 2 to the original target)
2. Pull basic financials
3. Determine what they supply and rough revenue/cost relationships
4. This enables the "drill deeper" functionality in the dashboard
### Phase 6: Data Assembly & Synthesis
Before writing HTML, organize all data into this structure:
```
TARGET COMPANY:
- Name, ticker, description
- TTM Revenue, COGS, Gross Profit, Net Income, Gross Margin, Op Margin
- Market cap, stock price (from web)
TIER 1 SUPPLIERS (sorted by estimated % of target COGS, descending):
For each:
- Name, ticker, description
- What they supply (specific products/components)
- Estimated % of target company COGS (with source/logic)
- % of supplier revenue from target company (with source)
- TTM Revenue, Net Income, Gross Margin
- Market cap
- Relationship summary (sole source? multi-source? critical?)
- Their key suppliers (Tier 2) if researched
- 10-quarter financials: Revenue, Gross Profit, Net Income, GM% (with Daloopa citation IDs)
- 10-quarter inventory: RM, WIP, FG, Total, RM%, WIP%, FG% (with Daloopa citation IDs)
- Reporting currency and unit (e.g., USD $M, NTD B, KRW T)
TIER 1 CUSTOMERS (sorted by estimated % of target revenue, descending):
For each:
- Name, ticker, description
- What target company supplies to them (specific products/services)
- Estimated % of target revenue from this customer (with source/logic)
- Estimated % of customer COGS from target (input criticality, with source)
- Switching cost assessment (High/Medium/Low with reasoning)
- TTM Revenue, COGS, Net Income, Gross Margin
- Market cap
- Relationship summary (exclusive? multi-source? long-term contract? spot?)
- 10-quarter financials: Revenue, Gross Profit, Net Income, GM% (with Daloopa citation IDs)
- 10-quarter inventory: RM, WIP, FG, Total, RM%, WIP%, FG% (with Daloopa citation IDs)
- Reporting currency and unit (e.g., USD $M, EUR M, JPY B)
TIER 2 CUSTOMERS (for top 3-5 Tier 1 customers — who do THEY sell to?):
For each Tier 1 customer, their key customers with basic data
This traces the value chain forward: Target → Customer → End Market
TIER 2 SUPPLIERS (for top 3-5 Tier 1 suppliers):
For each Tier 1 supplier, their key suppliers with basic data
```
### Phase 6b: Upstream Shock Analysis (Demand Shock → Suppliers)
Prepare a narrative analysis of how a demand shock at the target company would ripple upstream through the supplier chain:
1. **Classify each supplier by dependency level**:
- **High dependency**: Target company is >20% of supplier's revenue → severe impact from demand shock
- **Moderate dependency**: Target is 10-20% of revenue → meaningful but manageable impact
- **Low dependency**: Target is <10% of revenue → diversified, minimal direct impact
2. **Assess shock propagation for each supplier**:
- **Revenue Impact** (High/Medium/Low): Based on % of revenue from target
- **Margin Impact** (High/Medium/Low): Based on operating leverage, fixed costs, ability to find replacement demand
- **Inventory Risk**: Suppliers with high FG% are more exposed to demand shocks; those with high RM% face supply-side risk
- **Substitutability**: Can the target switch to alternatives? Can the supplier find other customers?
3. **Build an impact matrix table** with columns: Supplier, Tier, Revenue Dependency, Revenue Impact, Margin Impact, Overall Risk
4. **Write narrative sections**:
- "Most Exposed Suppliers" — 2-3 paragraphs on suppliers facing highest risk
- "Resilient Suppliers" — suppliers with diversified revenue bases
- "Second-Order Effects" — how Tier 2 suppliers would be indirectly affected
- "Key Monitoring Metrics" — what an analyst should watch (inventory days, order backlog, etc.)
### Phase 6c: Downstream Shock Analysis (Supply Disruption → Customers)
Prepare a narrative analysis of how a supply disruption at the target company (production halt, quality issue, capacity constraint, export ban) would ripple downstream through the customer chain:
1. **Classify each customer by input criticality**:
- **Critical input**: Target's product is a key component with no drop-in replacement; disruption halts customer production (e.g., TSMC to Apple — no alternative foundry for A-series chips)
- **Important input**: Target is a significant but not sole supplier; customer can partially substitute with 3-6 month lead time
- **Supplementary input**: Target provides a non-critical input; customer has multiple qualified alternatives
2. **Assess downstream disruption for each customer**:
- **Input Criticality** (High/Medium/Low): How essential is the target's product to the customer's operations?
- **Switching Cost** (High/Medium/Low): How long and expensive to qualify an alternative? Are there contractual lock-ins?
- **Revenue at Risk**: What portion of the customer's revenue depends on products that use the target's inputs?
- **Inventory Buffer**: Does the customer hold significant RM inventory of the target's product? How many weeks/months of supply?
- **Alternative Sources**: Who else could supply this? What's the capacity gap?
3. **Build a downstream impact matrix table** with columns: Customer, Category, Input Criticality, Switching Cost, Revenue at Risk, Inventory Buffer, Overall Disruption Risk
4. **Write narrative sections**:
- "Most Vulnerable Customers" — customers who would face production disruption or revenue loss
- "Customers with Alternatives" — those who can substitute away from the target
- "Pricing Power Implications" — if the target faces a supply constraint, which customers have the leverage to secure allocation vs. which get cut first?
- "Channel Inventory Signals" — what customer inventory levels (especially RM%) tell you about near-term order patterns for the target company
- "Second-Order Downstream Effects" — how end consumers or Tier 2 customers would be affected
---
## HTML TEMPLATE & DESIGN SYSTEM
Start from the HTML Report Template in `../design-system.md` (copy the full `<style>` block). Then add the following **additional CSS** for interactive dashboard components. Use the design system's color palette throughout.
### Design Principles
- Follow `../design-system.md` for color palette, typography, and table conventions
- **Information density**: Show data compactly but with clear hierarchy
- **Interactive but not flashy**: Smooth transitions, click-to-expand, no animations for animation's sake
### Core CSS
Start with the full CSS from `../design-system.md`, then append these dashboard-specific styles:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>[TICKER] Supply Chain Dashboard</title>
<style>
/* === PASTE FULL CSS FROM design-system.md HTML Report Template HERE === */
/* === DASHBOARD-SPECIFIC EXTENSIONS BELOW === */
@media print {
.no-print { display: none !important; }
.interactive { pointer-events: none; }
@page { margin: 0.5in; size: landscape; }
}
:root {
/* Extended palette for dashboard components — supplements design-system.md vars */
--bg: var(--light-gray);
--surface: #ffffff;
--border: var(--mid-gray);
--border-light: var(--light-gray);
--text-primary: var(--near-black);
--text-secondary: var(--dark-gray);
--text-tertiary: #8a8a85;
--accent: var(--steel-blue);
--green-bg: #f0f9f2;
--red-bg: #fef2f2;
--amber: #92600a;
--amber-bg: #fefce8;
--blue-bg: #eff6ff;
--node-supplier: var(--mid-gray);
--node-customer: #dde8f0;
--node-target: var(--navy);
--sans: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
--mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
}
/* Layout */
.page-header {
background: var(--surface);
border-bottom: 3px solid var(--navy);
padding: 24px 40px 16px;
}
.page-header h1 {
font-size: 28px;
font-weight: 700;
color: var(--navy);
letter-spacing: -0.5px;
line-height: 1.2;
}
.page-header .subtitle {
font-size: 14px;
color: var(--text-secondary);
margin-top: 4px;
}
.page-header .dateline {
font-size: 12px;
color: var(--text-tertiary);
margin-top: 8px;
font-family: var(--mono);
}
.container {
max-width: 1400px;
margin: 0 auto;
padding: 24px 40px;
}
/* Section Headers */
h2 {
font-family: var(--sans);
font-size: 20px;
font-weight: 700;
margin: 32px 0 16px;
padding-bottom: 6px;
border-bottom: 1px solid var(--mid-gray);
letter-spacing: -0.3px;
color: var(--navy);
}
h3 {
font-family: var(--sans);
font-size: 13px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.8px;
color: var(--steel-blue);
margin: 20px 0 10px;
}
/* KPI Bar */
.kpi-bar {
display: flex;
gap: 0;
border: 1px solid var(--border);
border-radius: 6px;
overflow: hidden;
background: var(--surface);
margin: 16px 0;
}
.kpi-item {
flex: 1;
padding: 12px 16px;
border-right: 1px solid var(--border-light);
text-align: center;
}
.kpi-item:last-child { border-right: none; }
.kpi-label {
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.5px;
color: var(--text-tertiary);
font-weight: 600;
}
.kpi-value {
font-size: 18px;
font-weight: 700;
margin-top: 2px;
font-variant-numeric: tabular-nums;
}
.kpi-sub {
font-size: 11px;
color: var(--text-tertiary);
margin-top: 1px;
}
/* Supply Chain Visualization */
.chain-view {
display: flex;
gap: 24px;
align-items: flex-start;
margin: 20px 0;
overflow-x: auto;
padding-bottom: 16px;
}
.chain-column {
min-width: 280px;
flex-shrink: 0;
}
.chain-column-header {
font-family: var(--sans);
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 1px;
color: var(--text-tertiary);
margin-bottom: 12px;
padding-bottom: 6px;
border-bottom: 1px solid var(--border);
text-align: center;
}
.chain-arrow {
display: flex;
align-items: center;
justify-content: center;
color: var(--text-tertiary);
font-size: 24px;
min-width: 40px;
padding-top: 40px;
flex-shrink: 0;
}
/* Company Cards */
.company-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 6px;
padding: 14px 16px;
margin-bottom: 10px;
cursor: pointer;
transition: border-color 0.15s, box-shadow 0.15s;
}
.company-card:hover {
border-color: var(--text-secondary);
box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.company-card.target-card {
background: var(--navy);
color: white;
border-color: var(--navy);
}
.company-card.target-card .card-ticker { color: rgba(255,255,255,0.7); }
.company-card.target-card .card-metric-label { color: rgba(255,255,255,0.5); }
.company-card.target-card .card-metric-value { color: white; }
.company-card.target-card .card-desc { color: rgba(255,255,255,0.7); }
.company-card.expanded { border-color: var(--steel-blue); box-shadow: 0 2px 12px rgba(74,111,165,0.15); }
.company-card.supplier-card { border-left: 3px solid var(--node-supplier); }
.company-card.customer-card { border-left: 3px solid var(--node-customer); }
.card-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
}
.card-name {
font-family: var(--sans);
font-size: 16px;
font-weight: 700;
line-height: 1.2;
}
.card-ticker {
font-family: var(--mono);
font-size: 11px;
color: var(--text-tertiary);
margin-top: 2px;
}
.card-badge {
font-size: 10px;
font-weight: 700;
padding: 2px 8px;
border-radius: 3px;
white-space: nowrap;
}
.badge-pct-high { background: var(--red-bg); color: var(--red); }
.badge-pct-med { background: var(--amber-bg); color: var(--amber); }
.badge-pct-low { background: var(--green-bg); color: var(--green); }
.card-supplies {
font-size: 12px;
color: var(--text-secondary);
margin-top: 6px;
line-height: 1.4;
}
.card-metrics {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 8px;
margin-top: 10px;
padding-top: 10px;
border-top: 1px solid var(--border-light);
}
.card-metric-label {
font-size: 9px;
text-transform: uppercase;
letter-spacing: 0.3px;
color: var(--text-tertiary);
}
.card-metric-value {
font-size: 13px;
font-weight: 700;
font-variant-numeric: tabular-nums;
}
.card-desc {
font-size: 12px;
color: var(--text-secondary);
margin-top: 8px;
line-height: 1.45;
}
/* Expanded Detail Panel */
.detail-panel {
display: none;
margin-top: 12px;
padding-top: 12px;
border-top: 1px solid var(--border-light);
}
.company-card.expanded .detail-panel { display: block; }
.detail-section {
margin-bottom: 14px;
}
.detail-section h4 {
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5px;
color: var(--text-tertiary);
margin-bottom: 6px;
}
.relationship-bar {
height: 8px;
background: var(--border-light);
border-radius: 4px;
overflow: hidden;
margin: 4px 0;
}
.relationship-fill {
height: 100%;
border-radius: 4px;
transition: width 0.3s;
}
.fill-red { background: var(--red); }
.fill-amber { background: var(--amber); }
.fill-green { background: var(--green); }
.fill-blue { background: var(--accent); }
/* Drill-down button */
.drill-btn {
display: inline-block;
font-size: 11px;
font-weight: 600;
color: var(--accent);
cursor: pointer;
padding: 4px 0;
border: none;
background: none;
font-family: var(--sans);
}
.drill-btn:hover { text-decoration: underline; }
/* Concentration Table */
.conc-table {
width: 100%;
border-collapse: collapse;
font-size: 13px;
margin: 12px 0;
}
.conc-table th {
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.5px;
color: var(--text-tertiary);
font-weight: 600;
text-align: left;
padding: 6px 10px;
border-bottom: 2px solid var(--border);
background: var(--bg);
}
.conc-table th:not(:first-child) { text-align: right; }
.conc-table td {
padding: 8px 10px;
border-bottom: 1px solid var(--border-light);
font-variant-numeric: tabular-nums;
}
.conc-table td:not(:first-child) { text-align: right; }
.conc-table tr:hover { background: var(--blue-bg); }
.conc-table .row-total {
font-weight: 700;
border-top: 2px solid var(--border);
background: var(--bg);
}
/* Risk indicator */
.risk-tag {
display: inline-block;
font-size: 10px;
font-weight: 700;
padding: 1px 6px;
border-radius: 3px;
}
.risk-high { background: var(--red-bg); color: var(--red); }
.risk-med { background: var(--amber-bg); color: var(--amber); }
.risk-low { background: var(--green-bg); color: var(--green); }
/* Tabs for switching views */
.tab-bar {
display: flex;
gap: 0;
border-bottom: 2px solid var(--border);
margin-bottom: 20px;
}
.tab {
padding: 10px 20px;
font-size: 13px;
font-weight: 600;
color: var(--text-tertiary);
cursor: pointer;
border-bottom: 2px solid transparent;
margin-bottom: -2px;
transition: color 0.15s, border-color 0.15s;
font-family: var(--sans);
background: none;
border-top: none;
border-left: none;
border-right: none;
}
.tab:hover { color: var(--text-primary); }
.tab.active {
color: var(--text-primary);
border-bottom-color: var(--text-primary);
}
.tab-content { display: none; }
.tab-content.active { display: block; }
/* Methodology / Source Notes */
.methodology-box {
background: var(--bg);
border: 1px solid var(--border);
border-radius: 6px;
padding: 16px 20px;
margin: 16px 0;
font-size: 12px;
color: var(--text-secondary);
line-height: 1.5;
}
.methodology-box h4 {
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5px;
color: var(--text-tertiary);
margin-bottom: 8px;
}
/* Links & References */
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.source-tag {
font-size: 9px;
color: var(--text-tertiary);
font-style: italic;
}
/* Footer */
.page-footer {
margin-top: 40px;
padding: 16px 0;
border-top: 3px solid var(--navy);
font-size: 11px;
color: var(--text-tertiary);
text-align: center;
}
/* Print button */
.dl-btn {
display: inline-block;
padding: 10px 24px;
background: var(--navy);
color: white;
border: none;
border-radius: 5px;
font-size: 13px;
font-weight: 600;
cursor: pointer;
font-family: var(--sans);
}
.dl-btn:hover { background: var(--steel-blue); }
/* Two-column layout */
.two-col {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
}
@media (max-width: 800px) {
.two-col { grid-template-columns: 1fr; }
.chain-view { flex-direction: column; }
.chain-arrow { transform: rotate(90deg); padding-top: 0; }
}
</style>
</head>
```
### Core JavaScript Pattern
The dashboard uses vanilla JavaScript for interactivity. Include these functions in a `<script>` tag at the end of the body:
```javascript
<script>
// Tab switching
function switchTab(tabId) {
document.querySelectorAll('.tab').forEach(t => t.classList.remove('active'));
document.querySelectorAll('.tab-content').forEach(c => c.classList.remove('active'));
document.querySelector(`[data-tab="${tabId}"]`).classList.add('active');
document.getElementById(tabId).classList.add('active');
}
// Card expand/collapse
function toggleCard(cardId) {
const card = document.getElementById(cardId);
card.classList.toggle('expanded');
}
// Navigate to tier 2 view for a specific supplier
function drillDown(companyTicker) {
// Switch to the tier-2 tab and scroll to the relevant section
switchTab('tier2');
const section = document.getElementById('tier2-' + companyTicker);
if (section) {
section.scrollIntoView({ behavior: 'smooth', block: 'start' });
section.style.outline = '2px solid var(--accent)';
setTimeout(() => { section.style.outline = 'none'; }, 2000);
}
}
// Initialize
document.addEventListener('DOMContentLoaded', () => {
// Set first tab active
const firstTab = document.querySelector('.tab');
if (firstTab) firstTab.click();
});
</script>
```
---
## DOCUMENT STRUCTURE
The HTML document has these sections. Every section is mandatory.
### Section 1: Print Button Bar
```html
<div class="no-print" style="text-align:center; padding:16px; background:var(--surface); border-bottom:1px solid var(--border);">
<button class="dl-btn" onclick="window.print()">Download as PDF</button>
<span style="font-size:12px; color:var(--text-tertiary); margin-left:12px;">or Cmd+P → Save as PDF</span>
</div>
```
### Section 2: Page Header
```html
<div class="page-header">
<h1>[TICKER] — Supply Chain Map</h1>
<div class="subtitle">[Full Company Name] · Interactive Supply Chain Analysis</div>
<div class="dateline">Prepared [Date] · Data sourced from <a href="https://daloopa.com">Daloopa</a> · TTM through [Latest Quarter]</div>
</div>
```
### Section 3: Target Company KPI Bar
Show 6 KPIs for the target company:
```html
<div class="container">
<div class="kpi-bar">
<div class="kpi-item"><div class="kpi-label">TTM Revenue</div><div class="kpi-value">$XXB</div></div>
<div class="kpi-item"><div class="kpi-label">TTM COGS</div><div class="kpi-value">$XXB</div></div>
<div class="kpi-item"><div class="kpi-label">Gross Margin</div><div class="kpi-value">XX.X%</div></div>
<div class="kpi-item"><div class="kpi-label">Suppliers Mapped</div><div class="kpi-value">XX</div></div>
<div class="kpi-item"><div class="kpi-label">Top 5 = % of COGS</div><div class="kpi-value">~XX%</div></div>
<div class="kpi-item"><div class="kpi-label">Key Customers</div><div class="kpi-value">XX</div></div>
</div>
```
### Section 4: Page Layout
The dashboard uses a **single scrollable page** (no tabs) with the following vertical order:
1. KPI bar (target company overview)
2. Canvas network visualization (full chain: Tier 3 → Tier 2 → Tier 1 → Target → Customers → Tier 2 Customers)
3. Inventory Health Overview table (suppliers AND customers)
4. Supplier cards grouped by tier
5. Customer cards grouped by category
6. Upstream Shock Analysis (demand shock → suppliers, narrative + impact matrix)
7. Downstream Shock Analysis (supply disruption → customers, narrative + impact matrix)
8. Concentration Analysis summary (both upstream and downstream)
9. Footer
Each supplier and customer card is clickable — opening a **full-screen detail overlay** with 10-quarter financials, inventory tables, and Canvas charts. The overlay is dismissed with × or backdrop click.
### Section 5: Canvas Network Visualization
Replace the HTML card-based chain view with a **Canvas-based tier-grouped network**:
- Use a `<canvas>` element spanning the full container width, ~420px height
- **Column layout**: Tier 3 (left) → Tier 2 → Tier 1 → Target (center) → Customers (right)
- Draw each company as a rounded rectangle node with ticker label
- Draw connection lines (bezier curves or straight lines) between related nodes
- Color-code by tier: Target = navy (#1B2A4A), Tier 1 = steel blue (#4A6FA5), Tier 2 = gold (#C5A55A), Tier 3 = dark gray (#6C757D), Customers = mid gray (#E9ECEF)
- **Clickable nodes**: Track click coordinates with a `click` event listener on the canvas, determine which node was clicked via hit-testing, then open the detail overlay for that company
- Column headers ("TIER 1", "TIER 2", "TARGET", etc.) drawn as text above each column
- Responsive: redraw on `window.resize`
```javascript
// Example network drawing function pattern:
function drawNetwork() {
const cv = document.getElementById('networkCanvas');
const ctx = cv.getContext('2d');
cv.width = cv.parentElement.clientWidth;
cv.height = 420;
ctx.clearRect(0, 0, cv.width, cv.height);
// Define columns: x positions for each tier
const cols = {
tier3: cv.width * 0.08,
tier2: cv.width * 0.28,
tier1: cv.width * 0.48,
target: cv.width * 0.68,
customers: cv.width * 0.88
};
// Draw column headers, nodes, and connection lines
// Store node positions for hit-testing on click
}
```
### Section 5b: Inventory Health Overview
Below the network, add an **Inventory Health Overview** table showing all suppliers AND customers:
```
| Company | Ticker | Role | Total Inventory | RM% | WIP% | FG% | Composition Bar |
```
- The "Role" column shows "Supplier T1", "Supplier T2", "Customer", or "Target"
- The "Composition Bar" column renders a stacked horizontal bar (RM = blue, WIP = amber, FG = green) using inline CSS `background: linear-gradient(...)`
- Sort by total inventory descending or by FG% descending (highest FG% = most demand-shock exposure)
- Include the target company at the top of the table, then suppliers, then customers
- Each inventory value must link to its Daloopa citation
- **Analytical note**: For suppliers, rising FG% signals demand weakness from the target. For customers, rising RM% signals stockpiling of the target's inputs (bullish near-term, potential destocking risk later). Falling RM% at customers signals reduced orders ahead.
### Section 5c: Supplier Cards by Tier
Below the inventory overview, render supplier cards grouped under tier headings:
```
── TIER 1 · Critical / Sole-Source ──────
[Card: TSMC] [Card: Samsung] [Card: Broadcom] ...
── TIER 2 · Major Component ─────────────
[Card: Qualcomm] [Card: Skyworks] [Card: TXN] ...
── TIER 3 · Specialty ───────────────────
[Card: Corning] [Card: Cirrus Logic] ...
```
Each card shows: Company name, ticker, what they supply, TTM revenue, gross margin, estimated % of target COGS, a colored dot for tier. Clicking a card opens the detail overlay.
### Section 5d: Customer Cards by Category
Below the supplier cards, render customer cards grouped under category headings:
```
── CHANNEL PARTNERS · Distribution & Retail ──────
[Card: Best Buy] [Card: AT&T] [Card: Verizon] ...
── ENTERPRISE / B2B · Direct Customers ───────────
[Card: Enterprise customer 1] [Card: Enterprise customer 2] ...
── END-MARKET EXPOSURE · Indirect Demand ─────────
[Card: End-market exposure 1] ...
```
Categories should be adapted to the target company's business model:
- **B2B/Components companies**: Group by end-market vertical (Auto, Aerospace, Consumer Electronics, Data Center, etc.)
- **Consumer products**: Group by channel (Direct, Retail Partners, Carriers, Enterprise)
- **Software/Platform**: Group by customer type (Enterprise, SMB, Consumer, Government)
- **Industrials**: Group by end-market (Energy, Infrastructure, Transportation, Defense)
Each card shows: Company name, ticker, what the target supplies to them, TTM revenue, gross margin, estimated % of target revenue from this customer, input criticality badge (HIGH/MED/LOW), switching cost indicator. Clicking a card opens the detail overlay.
Customer cards use the `.customer-card` CSS class (border-left color = `--node-customer`).
### Section 6: Detail Overlay
When a user clicks a supplier card, customer card, or network node, show a **full-screen overlay** with comprehensive detail. The overlay structure is the same for both suppliers and customers.
**Structure:**
- Fixed overlay div covering the viewport with semi-transparent backdrop
- Close button (×) in top-right corner
- Content area with four sub-sections:
**6a. Financial History Table (10 Quarters)**
```
| Metric | Q3'23 | Q4'23 | Q1'24 | ... | Q4'25 |
|---------------|-------|-------|-------|-----|-------|
| Revenue | $XXB | $XXB | ... | | |
| Gross Profit | $XXB | $XXB | ... | | |
| Net Income | $XXB | $XXB | ... | | |
| Gross Margin | XX.X% | XX.X% | ... | | |
```
- Every value must be a Daloopa citation link: `<a href="https://daloopa.com/src/{id}">$value</a>`
- Display currency unit in header (e.g., "USD $M", "NTD B", "KRW T")
**6b. Inventory Breakdown Table (10 Quarters)**
```
| Metric | Q3'23 | Q4'23 | ... |
|------------------|-------|-------|-----|
| Raw Materials | $XXM | $XXM | ... |
| Work in Process | $XXM | $XXM | ... |
| Finished Goods | $XXM | $XXM | ... |
| Total Inventory | $XXM | $XXM | ... |
| RM% | XX% | XX% | ... |
| WIP% | XX% | XX% | ... |
| FG% | XX% | XX% | ... |
```
- Absolute values are Daloopa citation links; percentages are computed (no link needed)
**6c. Canvas Chart — Inventory Composition vs. Gross Margin**
- **Stacked bar chart**: Each bar represents a quarter. Segments = RM (blue), WIP (amber), FG (green), stacked to total inventory value
- **Line overlay**: Gross Margin % plotted as a line with dots on the right Y-axis (0-100%)
- **Left Y-axis**: Inventory value in reporting currency
- **X-axis**: Quarter labels (Q3'23, Q4'24, etc.)
- Draw using Canvas 2D API with `createElement('canvas')`, NOT any charting library
- Include a legend below the chart
**6d. Relationship Context Panel**
- For **suppliers**: Show "% of target COGS" bar, "% of supplier revenue from target" bar, switching cost assessment, sole-source flag, geographic risk
- For **customers**: Show "% of target revenue from customer" bar, "% of customer COGS from target" (input criticality) bar, switching cost assessment, contract type (long-term/spot), alternative sources available
- Both: Business description, specific products/services in the relationship, and source attribution for all estimates
### Section 7: Upstream Shock Analysis
A dedicated section (below the customer cards) analyzing how a demand shock at the target company would propagate upstream:
**7a. Narrative Analysis** — 3-4 paragraphs covering:
- "Most Exposed Suppliers" — those with highest revenue dependency on target
- "Resilient Suppliers" — diversified revenue, low target concentration
- "Second-Order Effects" — how Tier 2/3 suppliers are indirectly affected
- "Key Monitoring Metrics" — inventory days, order backlogs, WIP trends to watch
**7b. Upstream Impact Matrix Table**
```
| Supplier | Tier | Rev. from Target | Revenue Impact | Margin Impact | Inventory Risk | Overall |
|----------|------|------------------|---------------|---------------|----------------|---------|
| TSMC | 1 | ~25% | HIGH | MEDIUM | LOW | HIGH |
| ... | | | | | | |
```
- Color-code risk cells: HIGH = red background, MEDIUM = amber, LOW = green
- Sort by Overall Risk descending
### Section 7c: Downstream Shock Analysis
A dedicated section analyzing how a supply disruption at the target company would propagate downstream. This is the mirror of Section 7 — instead of "what happens to suppliers if target demand drops," this asks "what happens to customers if the target can't deliver."
**7c-i. Narrative Analysis** — 3-4 paragraphs covering:
- "Most Vulnerable Customers" — customers with highest input criticality and switching costs; a target disruption would directly impair their revenue
- "Customers with Alternatives" — those who can substitute within a reasonable timeframe; quantify how long and at what cost
- "Pricing Power Dynamics" — if the target faces constrained supply, who gets allocation priority? Large customers with long-term contracts typically get served first; smaller or spot customers get cut. This reveals the target's pricing power and customer hierarchy.
- "Channel Inventory as Leading Indicator" — what customer RM% trends tell you about the target's forward order book. If customers are building inventory, the target's next 1-2 quarters look strong but risk destocking later. If customers are drawing down, near-term orders may disappoint.
**7c-ii. Downstream Impact Matrix Table**
```
| Customer | Category | Input Criticality | Switching Cost | Rev. at Risk | Inventory Buffer | Overall Disruption Risk |
|----------|----------|-------------------|---------------|-------------|-----------------|------------------------|
| Best Buy | Channel | LOW | LOW | ~$40B | ~4 weeks | LOW |
| ... | | | | | | |
```
- Color-code risk cells: HIGH = red background, MEDIUM = amber, LOW = green
- Sort by Overall Disruption Risk descending
- "Rev. at Risk" = the customer's revenue that depends on products using the target's inputs
- "Inventory Buffer" = estimated weeks/months of the target's product the customer holds in RM inventory
### Section 8: Concentration Analysis
Summary of concentration risk on BOTH sides of the value chain:
**Upstream (Supplier) Concentration:**
- Supplier concentration: flag any supplier >20% of COGS
- Revenue dependency: flag any supplier where target is >25% of their revenue
- Geographic concentration: note country exposure (Taiwan, China, South Korea, etc.)
- Single-source dependencies: list sole-source suppliers
**Downstream (Customer) Concentration:**
- Customer concentration: flag any customer >15% of target's revenue
- Input criticality: flag any customer where target's product is a critical, hard-to-substitute input (high switching cost)
- Channel concentration: what % of revenue flows through the top 3 channels? Is there a single channel that could be disrupted (e.g., carrier subsidies ending, retail partner going bankrupt)?
- Geographic exposure: note country/region concentration in the customer base
- Contract risk: flag any large customer relationships that are up for renewal, at risk of in-sourcing, or where the customer is developing alternatives
**Bidirectional Risk Summary:**
- Which relationships have asymmetric power? (target depends on supplier more than supplier depends on target, or vice versa)
- Where are the mutual dependencies? (both parties depend heavily on each other — most stable but hardest to exit)
- What's the "weakest link"? Identify the single point of failure in the full chain that would cause the most damage if disrupted
### Section 10: Footer
```html
<div class="page-footer">
Prepared by {FIRM_NAME} | Data sourced from <a href="https://daloopa.com">Daloopa</a>. All financial figures link to original source filings.
[Date]. Supply chain relationships are based on public filings, analyst research, and industry reports. Not investment advice.
</div>
</div><!-- end container -->
</body>
</html>
```
---
## CRITICAL RULES
### Citation & Formatting Rules
Follow `../data-access.md` Section 4 for all citation requirements and `../design-system.md` for number formatting. Additional supply-chain-specific conventions:
- For estimated figures (% of COGS, % of revenue), always explain the methodology in the detail panel
- Use `~` prefix for all estimates (e.g., `~35%` of COGS)
- Use `–` for ranges, `—` for em-dashes, `·` for separators
### Upstream Concentration Risk Classification
- **HIGH** (red): >15% of COGS, sole/single source, or geopolitical risk
- **MED** (amber): 5-15% of COGS, limited alternatives, or moderate switching costs
- **LOW** (green): <5% of COGS, multiple alternatives, easy to switch
### Downstream Criticality Classification
- **HIGH** (red): Customer is >15% of target's revenue, OR target's product is a critical input with high switching costs for the customer
- **MED** (amber): Customer is 5-15% of revenue, OR target's product is important but substitutable with 6-12 month transition
- **LOW** (green): Customer is <5% of revenue, AND target's product is a commodity input with multiple alternatives
### Supply Chain Data Quality
- Always distinguish between **disclosed** (from 10-K, investor reports) and **estimated** (from analyst research, proportional analysis)
- When estimating % of COGS, show your math: "TSMC Apple revenue ~$70B (per TSMC 10-K customer disclosure) / Apple TTM COGS ~$200B = ~35%"
- Use `~` prefix for all estimates
- Include source attribution for every data point in the detail panel
- If a figure cannot be reliably estimated, say "Not disclosed" rather than guessing
### Interactivity Rules
- Every company card (supplier AND customer) and network node must be clickable to open a detail overlay
- Detail overlays show: 10-quarter financials, 10-quarter inventory breakdown, Canvas inventory chart, relationship context panel, business description
- Close overlay with × button or clicking the backdrop
- Network visualization must redraw on window resize
- All interactions must be smooth and not reload the page
### DOM Safety Rules (CRITICAL)
- ALL JavaScript DOM construction MUST use `createElement()` + `textContent` + `appendChild()`
- NEVER use `innerHTML`, `outerHTML`, or any HTML-string-based injection methods
- NEVER use DOM write/writeln methods
- Define compact helper functions to keep DOM construction code readable:
- `ce(tag)` → `document.createElement(tag)`
- `ca(el, attrs)` → sets attributes/textContent on an element
- `cA(parent, children)` → appends array of children to parent
- This is required because security hooks will block the file if HTML-string injection is detected
---
## EXECUTION SEQUENCE
Follow this exact sequence. Maximize parallelism — run independent searches and API calls concurrently. The 10-quarter pull is the most data-intensive step; batch aggressively.
1. **discover_companies** → get target company_id
2. **discover_company_series + get_company_fundamentals** → pull target company financials (revenue, COGS, margins) AND inventory series for 10 quarters
3. **search_documents + WebSearch** → identify suppliers AND customers (run in parallel, multiple queries for each direction)
4. **discover_companies** → look up each identified supplier AND customer by ticker (batch all at once)
5. **discover_company_series** → for each supplier AND customer, pull BOTH financial series (revenue, GP, NI, GM) AND inventory series (RM, WIP, FG, total) — batch these in parallel
6. **get_company_fundamentals** → pull 10 quarters of data for all suppliers AND customers (batch in parallel, group series_ids per company)
7. **search_documents + WebSearch** → determine revenue concentration for each supplier AND revenue attribution + input criticality for each customer (parallel)
8. **Repeat lighter version of 3-6** for Tier 2 suppliers (top 3-5 Tier 1 suppliers' suppliers) AND Tier 2 customers (top 3-5 Tier 1 customers' end markets)
9. **Upstream Shock Analysis** → classify suppliers by dependency, assess propagation, build upstream impact matrix
10. **Downstream Shock Analysis** → classify customers by input criticality and switching costs, assess disruption propagation, build downstream impact matrix
11. **Synthesize** → organize all data (suppliers, customers, financials, inventory breakdowns, both shock analyses) into the framework
12. **Write HTML** → generate the complete self-contained HTML file using DOM-safe JavaScript (no HTML-string injection)
13. **Save & Open** → save and open in browser
## Save Report
Save to `reports/{TICKER}_supply-chain.html` using the HTML Report Template from `../design-system.md` as the CSS base, extended with the dashboard-specific styles above. Write the full analysis as styled HTML with all CSS inlined. This is the final deliverable — no intermediate markdown step needed.
All financial figures must use Daloopa citation format: `<a href="https://daloopa.com/src/{fundamental_id}">$X.XX million</a>`
Tell the user where the HTML report was saved.
Highlight the key findings with a critical lens:
- **Upstream concentration risk**: Which suppliers represent the biggest single points of failure? Are there sole-source dependencies the market may be underpricing?
- **Downstream concentration risk**: Is the target overly dependent on a few customers? Are any major customers at risk of in-sourcing or switching?
- **Asymmetric exposure (upstream)**: Which suppliers depend heavily on the target for revenue — and what would happen to them in a demand shock?
- **Asymmetric exposure (downstream)**: Which customers depend heavily on the target as a critical input — and what would happen to them in a supply disruption?
- **Inventory signals (bidirectional)**: Supplier FG% rising = demand weakness. Customer RM% rising = stockpiling (bullish near-term, destocking risk later). Customer RM% falling = reduced orders ahead.
- **Pricing power**: Does the target have more leverage over its customers or do its suppliers have more leverage over it? Where does the target sit in the power hierarchy of its value chain?
- **What the market is missing**: Is there a supply chain vulnerability, customer concentration risk, or value chain shift that isn't widely discussed?
Referenced files: 1
tearsheet9.2 KB
---
name: tearsheet
description: Quick one-page company overview and snapshot
---
Generate a concise company tearsheet for the company specified by the user named in the user's request. If no ticker or company is provided, ask for one before proceeding.
This should be a quick, one-page overview — the kind of snapshot an analyst pulls up before a meeting.
**Before starting, read `../data-access.md` for data access methods and `../design-system.md` for formatting conventions.** Follow the data access detection logic and design system throughout this skill.
Follow these steps:
## 1. Company Lookup
Look up the company by ticker using `discover_companies`. Capture:
- `company_id`
- `latest_calendar_quarter` — anchor for all period calculations below (see `../data-access.md` Section 1.5)
- `latest_fiscal_quarter`
- Firm name for report attribution (default: "Daloopa") — see `../data-access.md` Section 4.5
## 1b. Current Stock Price
Get the current stock price using `get_stock_prices` (see `../data-access.md` Section 1.7). Pass `company_id` and `dates` for the 3 most recent calendar days — use the most recent returned close price. Include the price, date, and a simple context line (e.g., 52-week range or YTD change if you have enough history from a quick `start_date`/`end_date` pull of the last 12 months). Display this prominently at the top of the report next to the company name.
## 2. Key Financials
Calculate periods backward from `latest_calendar_quarter` (8 quarters total: last 4 + year-ago for each to enable YoY):
Pull:
- Revenue
- Gross Profit
- Operating Income
- EBITDA (if not reported, compute as Operating Income + D&A — label it "EBITDA (calc.)" in the report)
- Net Income
- Diluted EPS
- Operating Cash Flow
- CapEx (Purchases of property, plant and equipment)
- Free Cash Flow (compute as Operating Cash Flow - CapEx — label it "FCF (calc.)" in the report)
For any derived/computed metric, mark it with "(calc.)" so the reader knows it's not directly sourced.
## 3. Key Operating KPIs
This section is strictly for **business-driver metrics** — the operational numbers that actually move revenue and earnings. Do NOT put financial statement items (D&A, share count, buybacks, dividends) here — those belong in the financials or capital return sections.
First, think about what the most important KPIs are for THIS specific company based on its business model and what drives its valuation. For example:
- **SaaS/cloud**: ARR, net revenue retention, RPO/cRPO, customers >$100K, cloud gross margin
- **Consumer tech**: DAU/MAU, ARPU, engagement metrics, installed base, paid subscribers
- **E-commerce/marketplace**: GMV, take rate, active buyers/sellers, order frequency
- **Retail**: same-store sales, store count, average ticket, transactions
- **Telecom/media**: subscribers, churn, ARPU, content spend
- **Hardware**: units shipped, ASP, attach rate, installed base, products vs services gross margin split
- **Financial services**: AUM, NIM, loan growth, credit quality metrics
- **Pharma/biotech**: pipeline stage, patient starts, scripts, market share
- **Industrials/energy**: backlog, book-to-bill, utilization, production volumes
Then search for those specific KPIs by name, plus cast a wider net for anything else Daloopa has. Also search for:
- Segment/product revenue breakdown
- Geographic revenue breakdown
**If the company discloses few operational KPIs** (e.g., Apple stopped reporting iPhone units in 2019), acknowledge the disclosure gap explicitly rather than padding the section with financial metrics. A short note like "Apple does not disclose unit volumes or ASPs; segment revenue is the finest granularity available" is more informative than showing D&A and buybacks as fake KPIs.
**Always search broadly** — companies often disclose more KPIs than you'd expect. For Apple, beyond segment revenue, Daloopa also has: installed base active devices (~2.5bn), products gross margin vs services gross margin (the mix shift story), and paid subscriptions. These are real operational metrics. Search with keywords like "installed", "active", "subscriber", "margin" by segment, not just the obvious financial terms.
Pull for the same period as financials.
## 3b. Capital Return
Pull share count, share repurchases, and dividends paid for the same periods. This is a separate section from operating KPIs — it shows how the company is returning cash to shareholders.
## 4. Compute Key Ratios
Show trend over the last 4 quarters with YoY change for EACH quarter (not just the earliest):
- Gross Margin %
- Operating Margin %
- EBITDA Margin %
- Net Margin %
- Revenue Growth (YoY)
- EPS Growth (YoY)
If the company has strong seasonality (e.g., retail Q4, back-to-school, etc.), add a brief note flagging it so YoY comparisons are read in context rather than sequential QoQ.
## 5. Recent Developments
Search the most recent 2 quarters of filings. Try multiple keyword searches to get coverage:
- First search: company name + "results" or "record" for earnings highlights
- Second search: "outlook" or "guidance" or "expect" for forward-looking commentary
- Third search: strategy-specific terms relevant to the company (e.g., "AI", "cloud", "subscribers", "margin")
- If a search returns empty, try broader single-keyword searches before giving up
Extract:
- Business description / what the company does (2-3 sentences)
- Key recent developments or announcements
- Management's top priorities or strategic focus areas
- Any notable management quotes (with document citations)
Keep this brief — 3-5 bullet points max.
## 6. Five Key Tensions
Identify the 5 most critical bull/bear debates for this stock. Each tension is a single line that frames both sides. Alternate between bullish-leaning and bearish-leaning tensions. Every tension must reference a specific data point from the analysis above.
Format as a numbered list:
1. "[Bullish factor] vs [Bearish factor]" — cite the specific metric
2. "[Bearish factor] vs [Bullish factor]" — cite the specific metric
...etc.
This goes at the top of the report, right after the Company Overview — it gives the reader the bull/bear framing before they dive into the data.
## 7. News Snapshot
Run 2 WebSearch queries to gather recent context:
1. `"{TICKER} {company_name} news {current_year}"` — recent headlines
2. `"{TICKER} catalysts risks {current_year}"` — forward-looking events
Distill into **3-5 key events** from the last 6 months, reverse chronological. Each event: date, one-line headline, sentiment tag (Positive / Negative / Mixed / Upcoming). Keep it tight — this is a tearsheet, not a research note.
## 8. What to Watch
Build a **Quantitative Monitors** list — 5 metrics with explicit thresholds:
- Format: "Metric: current value → bull threshold / bear threshold"
- Example: "Gross Margin: 45.2% → above 46% confirms pricing power / below 43% signals cost pressure"
Choose the 5 metrics that matter most for THIS company's thesis based on the data you pulled above. These should be actionable — an analyst should be able to check these next quarter and know whether the thesis is intact.
## 9. Save Report
Save to `reports/{TICKER}_tearsheet.html` using the HTML report template from `../design-system.md`. Write the full analysis as styled HTML with the design system CSS inlined. This is the final deliverable — no intermediate markdown step needed.
Structure the report with these sections:
```
<h1>{Company Name} ({TICKER}) — Tearsheet</h1>
<p>Generated: {date}</p>
<h2>Company Overview</h2>
{2-3 sentence description from filings}
<h2>Five Key Tensions</h2>
{numbered list of 5 bull/bear debates with data citations}
<h2>Key Financials (Last 4 Quarters)</h2>
<table>
| Metric | Q(oldest) | Q | Q | Q(latest) |
{table with Daloopa citations; derived metrics marked (calc.)}
</table>
<h2>Segment / Geographic Breakdown</h2>
{segment revenue table or geographic revenue table, whichever is more relevant}
<h2>Key Operating KPIs</h2>
<table>
| KPI | Q(oldest) | Q | Q | Q(latest) |
{table with Daloopa citations — ONLY business-driver metrics, NOT financial items}
{if few KPIs available, note the disclosure gap}
</table>
<h2>Capital Return</h2>
<table>
| Metric | Q(oldest) | Q | Q | Q(latest) |
{share count, buybacks, dividends — separate from operating KPIs}
</table>
<h2>Margins & Growth</h2>
<table>
| Metric | Q(oldest) | Q | Q | Q(latest) |
| Gross Margin % | X% | X% | X% | X% |
| ... | ... | ... | ... | ... |
| Rev Growth YoY | X% | X% | X% | X% |
| EPS Growth YoY | X% | X% | X% | X% |
{each cell shows the YoY change for THAT quarter}
{note on seasonality if applicable}
</table>
<h2>Recent Developments</h2>
<ul>{bullet points from filings with document citations}</ul>
<h2>News Snapshot</h2>
{3-5 recent events with date, headline, sentiment tag}
<h2>What to Watch</h2>
{5 quantitative monitors with current value and bull/bear thresholds}
```
All financial figures must use Daloopa citation format: `<a href="https://daloopa.com/src/{fundamental_id}">$X.XX million</a>`
Tell the user where the HTML report was saved.
Give a 2-3 sentence summary of the company's current state, including an honest assessment: What is the single biggest risk or concern? Does the current valuation (price, implied multiples) seem warranted given the growth trajectory? What would make you cautious about owning this stock?
Referenced files: 1
unit-economics13.1 KB
---
name: unit-economics
description: Bottoms-up unit economics decomposition for any public company
---
Perform a bottoms-up unit economics decomposition for the company named in the user's request. If no ticker or company is provided, ask for one before proceeding.
**Before starting, read `../data-access.md` for data access methods and `../design-system.md` for formatting conventions.** Follow the data access detection logic and design system throughout this skill.
Follow these steps:
## 1. Company Lookup
Look up the company by ticker using `discover_companies`. Capture:
- `company_id`
- `latest_calendar_quarter` — anchor for all period calculations below (see `../data-access.md` Section 1.5)
- `latest_fiscal_quarter`
- Firm name for report attribution (default: "Daloopa") — see `../data-access.md` Section 4.5
## 2. Series Discovery & Business Archetype Detection
Cast a wide net to discover ALL available series for this company. Search with multiple keyword sets to maximize coverage:
- Financial: "revenue", "income", "profit", "margin", "eps", "cost"
- Operating KPIs: "subscriber", "user", "customer", "unit", "arpu", "retention", "churn"
- Segment/Product: "segment", "product", "service", "geographic"
- Business-specific: "store", "gmv", "order", "booking", "backlog", "premium", "loan", "aum", "room", "seat", "bed", "acreage"
Collect all unique series IDs. Read every series name and description returned. **This is how you learn what kind of business this is and what unit-level KPIs Daloopa tracks for it.**
Based on series availability, classify the business into one of these archetypes (or a hybrid). This classification drives the entire report structure:
| If you find series like... | Archetype | Unit = |
|---|---|---|
| ARR, MRR, net dollar retention, customers, ACV, churn, CAC, LTV | **SaaS / Subscription** | Customer or subscription |
| Store count, same-store sales, AUV, restaurant-level margin, new openings | **Unit-based retail / Restaurant** | Store or unit |
| GMV, take rate, orders, AOV, active buyers/sellers | **Marketplace / E-commerce** | Order or transaction |
| Subscribers, ARPU, churn, content spend per sub | **Consumer subscription (media/streaming)** | Subscriber |
| Premiums written, loss ratio, combined ratio, policies in force | **Insurance** | Policy |
| NIM, loans, deposits, provision for credit losses, NCOs | **Banking / Lending** | Loan or account |
| ASP, units shipped, cost per unit, gross margin per unit | **Hardware / Manufacturing** | Unit shipped |
| AUM, management fee rate, performance fees, fund flows | **Asset Management** | Dollar of AUM |
| Revenue per available room (RevPAR), occupancy, ADR | **Hospitality / Lodging** | Room night |
| RPM, RASM, CASM, load factor, ASMs | **Airlines / Transportation** | Available seat mile |
| Revenue per user, DAU, MAU, ARPU, engagement | **Digital platform / Advertising** | User |
| Beds, admissions, revenue per admission, case mix | **Healthcare facilities** | Admission or bed |
| Acreage, production per acre, realized price per unit | **Commodity / E&P** | Unit of production |
If the business is a hybrid or doesn't fit neatly, construct a custom framework from the available series. The archetype is a starting guide, not a constraint.
**Edge cases:**
- **Diversified / multi-segment companies**: Pick the largest or most analytically interesting segment for primary analysis. Note other segments briefly. If the user specifies a segment, focus there.
- **Pre-revenue / early-stage companies**: Focus on burn rate per unit of growth, cash efficiency, and path to unit profitability.
- **Financial companies (banks, insurance, asset managers)**: These have specialized unit economics. For banks, the "unit" is a dollar of assets — focus on NIM, fee income/assets, efficiency ratio, credit costs. For insurance, focus on the combined ratio decomposition. Don't force a SaaS or retail framework onto financials.
- **Companies with no obvious unit-level KPIs in Daloopa**: Fall back to a margin bridge / operating leverage analysis using standard income statement data. Decompose revenue into whatever sub-components are available (segment, geography, product line) and analyze profitability at that level. Note the limitation.
- **Companies that stopped disclosing unit data**: Some major companies (e.g., Apple post-2018) no longer report unit shipments or ASPs. If unit-level data is not available, adapt to the highest-resolution decomposition the data supports (e.g., segment revenue × segment margin). Clearly flag the data gap and explain what proxy you used. Do not fabricate unit estimates.
## 3. Unit Economics Data Pull
Calculate 10 quarters backward from `latest_calendar_quarter`. Pull all archetype-relevant series identified in Step 2 for those periods, plus standard financials:
- Revenue (total and segment)
- COGS / cost of revenue
- Gross profit
- Operating income
- Net income
- All operating KPIs relevant to the detected archetype
**Derived metrics** (calculate from pulled data, label each as "(calc.)" and show formulas):
- Revenue per unit (Revenue / units)
- Gross margin per unit
- Contribution margin per unit (if variable costs are available)
- Unit growth rate (QoQ and YoY)
- Revenue per unit growth rate (QoQ and YoY)
- Any archetype-specific derived metrics (e.g., CAC payback = CAC / (ARPU × gross margin), LTV/CAC, 4-wall margin, take rate, combined ratio)
## 4. Qualitative Research
Search SEC filings for context on the unit economics. Use archetype-specific search terms:
- **SaaS**: Try "net dollar retention", "customer acquisition cost"; fallback to "expansion", "churn", "upsell"
- **Restaurant/Retail**: Try "average unit volume", "restaurant-level margin"; fallback to "same-store", "new unit", "unit opening"
- **Marketplace**: Try "take rate", "gross merchandise value"; fallback to "active buyers", "order volume", "monetization"
- **Hardware/Manufacturing**: Try "average selling price", "units shipped"; fallback to "ASP", "volume", "mix"
- **Insurance**: Try "combined ratio", "loss ratio"; fallback to "underwriting", "premium", "policy"
- **Banking**: Try "net interest margin", "provision"; fallback to "loan growth", "credit quality", "efficiency"
- **Digital platform**: Try "average revenue per user", "monthly active users"; fallback to "engagement", "monetization", "ARPU"
- **General (all archetypes)**: Try "unit economics", "pricing"; fallback to "profitability", "margin", "per unit"
Extract management commentary on pricing, retention, expansion, new unit openings, margin levers, etc. with document citations.
## 5. Analysis & Report Synthesis
**Section 1: Business Model & Unit Definition (brief)**
- 2-3 sentence description of what the "unit" is for this business
- Why this decomposition matters for understanding the company's economics
- What the revenue build-up looks like: units × revenue-per-unit, or equivalent
**Section 2: Revenue Decomposition**
- Show the bottoms-up revenue build: how units × price/rate × utilization (or equivalent) bridges to reported revenue
- Table: quarterly history (10 quarters) showing each component
- Highlight which lever is driving growth: volume vs. price vs. mix
- Include growth rates (YoY) as sub-rows beneath each metric
**Section 3: Unit-Level Profitability**
The core of the report. Show margin/profitability at the unit level over time:
- For SaaS: gross margin per customer, CAC payback period, LTV/CAC ratio
- For restaurants: 4-wall EBITDA margin, new unit payback, cash-on-cash return
- For marketplace: contribution margin per order, after accounting for fulfillment/transaction costs
- For insurance: loss ratio + expense ratio = combined ratio per policy
- For hardware: gross margin per unit, cost per unit breakdown
- Adapt to whatever the business actually is
- Table: historical trend with period-over-period change
- Explicitly call out whether unit economics are improving or deteriorating and by how much
**Section 4: Cohort / Vintage Analysis (if data supports it)**
- For subscription businesses: net retention curves, expansion vs. contraction
- For unit-based businesses: same-store vs. new-store contribution, unit maturation
- For lending: vintage loss curves, seasoning
- If insufficient data for true cohort analysis, note this and substitute with proxy analysis (e.g., new customer growth rate vs. retention rate implies cohort behavior)
**Section 5: Scalability & Operating Leverage**
- How do unit economics change as the business scales?
- Fixed cost absorption: which costs are truly fixed vs. variable per unit?
- Show operating leverage by plotting revenue growth vs. cost growth
- Incremental margins: are they expanding or compressing as the business grows?
**Section 6: Key Drivers & What to Watch**
This is the most analytically valuable section. Based on the data, identify:
- **The 3-5 metrics that matter most** for this company's unit economics, ranked by sensitivity / impact
- For each metric: current level, historical range, direction of travel, and what would cause it to inflect
- **Bull case drivers**: what would improve unit economics (e.g., pricing power, mix shift to higher-margin products, operating leverage kicking in, retention improving)
- **Bear case risks**: what would deteriorate unit economics (e.g., competitive pricing pressure, rising CAC, input cost inflation, regulatory impact on take rates)
- Connect each driver to its P&L impact: "a 100bps improvement in net retention would add ~$X to ARR" or "each new store generates ~$Xm in 4-wall EBITDA in year 2"
**Section 7: Summary Assessment**
- 3-4 sentence verdict on the health and trajectory of the company's unit economics
- Is this a business with improving, stable, or deteriorating unit economics?
- What is the single most important thing to monitor going forward?
**Analytical standards:**
- **Three-layer density**: every data point should have context (vs. prior period, vs. peers if known) and an implication (what it means for the investment case)
- **Show your math**: when you derive a metric (e.g., implied CAC = S&M expense / new customers added), show the calculation explicitly so the reader can verify
- **Flag data gaps**: if a key metric for the archetype isn't available in Daloopa's data, say so explicitly and explain what proxy you used or why the analysis is limited
- **No generic filler**: if you don't have data to support a section, skip it or shorten it. Never pad with boilerplate
- **Source everything**: every number should be traceable. Use Daloopa source citations per the design system conventions
- **Prefer rates and ratios over absolutes**: unit economics are about efficiency, not scale. Lead with margins, returns, and per-unit metrics. Include absolutes as context
## 6. Charts
Use `infra/chart_generator.py` for charts. Include at minimum:
1. A **revenue decomposition chart** (waterfall or time-series showing units × price → revenue)
2. A **unit profitability trend chart** (time-series showing the key unit margin metric over time)
3. Additional charts as warranted by the archetype (e.g., net retention waterfall for SaaS, same-store sales trend for restaurants, take rate trend for marketplaces)
**All charts must be embedded in the HTML as base64 data URIs** (e.g., `<img src="data:image/png;base64,...">`) so the report is fully self-contained with no external file dependencies. After generating each chart PNG, read the file and convert to base64 for embedding. Do not use relative `<img src="filename.png">` paths.
If chart_generator.py is unavailable, embed simple inline SVG charts directly in the HTML.
## 7. Save Report
Save to `reports/{TICKER}_unit_economics.html` using the HTML report template from `../design-system.md`. Write the full analysis as styled HTML with the design system CSS inlined. This is the final deliverable — no intermediate markdown step needed.
Structure the report with these sections:
```
<h1>{Company Name} ({TICKER}) — Unit Economics Analysis</h1>
<p>Generated: {date}</p>
<h2>Summary</h2>
{2-3 sentences: What is the "unit"? Are unit economics improving or deteriorating? Key takeaway.}
<h2>Business Model & Unit Definition</h2>
{Section 1 content}
<h2>Revenue Decomposition</h2>
<table>
| Component | Q(-9) | Q(-8) | ... | Q(latest) |
{Units, revenue per unit, revenue — with Daloopa citations and YoY growth sub-rows}
</table>
{Commentary on volume vs. price drivers}
<h2>Unit-Level Profitability</h2>
<table>
| Metric | Q(-9) | Q(-8) | ... | Q(latest) |
{Archetype-specific unit margins — with Daloopa citations}
</table>
{Commentary on unit economics trajectory}
<h2>Cohort / Vintage Analysis</h2>
{Section 4 content, or note if insufficient data}
<h2>Scalability & Operating Leverage</h2>
<table>
| Metric | Q(-9) | Q(-8) | ... | Q(latest) |
{Revenue growth vs cost growth, incremental margins}
</table>
{Operating leverage assessment}
<h2>Key Drivers & What to Watch</h2>
{Ranked drivers with sensitivity analysis and bull/bear scenarios}
<h2>Summary Assessment</h2>
{3-4 sentence verdict}
```
All financial figures must use Daloopa citation format: `<a href="https://daloopa.com/src/{fundamental_id}">$X.XX million</a>`
Tell the user where the HTML report was saved.
Highlight the 2-3 most important findings about the company's unit economics and what they signal for the investment case.
Referenced files: 1
working-capital22.8 KB
---
name: working-capital
description: Cash conversion cycle, earnings quality, and working capital deep-dive
---
Perform a cash conversion cycle, earnings quality, and working capital deep-dive for the company named in the user's request. If no ticker or company is provided, ask for one before proceeding.
**Before starting, read `../data-access.md` for data access methods and `../design-system.md` for formatting conventions.** Follow the data access detection logic and design system throughout this skill.
Follow these steps:
## 1. Company Lookup
Look up the company by ticker using `discover_companies`. Capture:
- `company_id`
- `latest_calendar_quarter` — anchor for all period calculations below (see `../data-access.md` Section 1.5)
- `latest_fiscal_quarter`
- Firm name for report attribution (default: "Daloopa") — see `../data-access.md` Section 4.5
## 2. Series Discovery & Working Capital Profile Detection
Cast a wide net to discover ALL available series for this company. Search with multiple keyword sets to maximize coverage:
- Balance sheet: "receivable", "inventory", "payable", "deferred revenue", "contract", "prepaid", "accrued", "current asset", "current liabilit"
- Cash flow: "cash flow from operations", "working capital", "depreciation", "amortization", "stock-based comp", "capital expenditure", "free cash flow"
- Income statement: "revenue", "cost of goods", "cost of revenue", "operating income", "net income"
- Business-specific: "backlog", "billing", "remaining performance obligation", "provision", "allowance", "reserve", "unearned premium", "loss ratio"
Collect all unique series IDs. Read every series name carefully. You need to understand:
- What balance sheet line items are available (receivables, inventory, payables, deferred revenue, contract assets/liabilities, prepaid expenses, accrued liabilities, etc.)
- What cash flow statement detail exists (CFO, changes in working capital components, capex, stock-based comp, D&A, etc.)
- What business-specific KPIs exist that contextualize working capital (e.g., backlog for industrials, deferred revenue for SaaS, policy reserves for insurance, loan loss provisions for banks)
Based on series availability, classify the business's working capital profile:
| If you find series like... | Profile | Primary focus |
|---|---|---|
| Inventory, COGS, accounts payable, accounts receivable | **Inventory-intensive (manufacturing, retail, consumer goods)** | Full CCC decomposition: DIO + DSO − DPO. Inventory is the core risk. Watch for inventory-to-sales divergence, channel stuffing signals, obsolescence risk |
| Deferred revenue, contract liabilities, billings, remaining performance obligations | **Negative working capital / SaaS / subscription** | Deferred revenue is the key asset — cash collected before revenue recognized. Focus on billings vs. revenue spread, deferred revenue growth vs. revenue growth, and whether the cash-first dynamic is strengthening or weakening |
| Receivables and payables but minimal/no inventory | **Asset-light services (consulting, staffing, advertising, tech services)** | DSO is the main event. Receivables quality, aging, concentration. Unbilled receivables or contract assets as early warning. DPO as a secondary lever |
| Loans, deposits, allowance for credit losses, provision expense, net charge-offs | **Financial institutions (banks, specialty finance)** | Traditional CCC is meaningless. Focus on provision adequacy (allowance/loans, provision/NCOs, reserve coverage), deposit cost and mix, and the gap between provision expense and actual cash losses realized as the earnings quality signal |
| Policy reserves, loss reserves, unearned premiums, LAE | **Insurance** | Reserve adequacy is the working capital equivalent. Prior-year reserve development (favorable/adverse), loss ratio trends, reserve-to-premium ratios. Cash flow from underwriting vs. reported underwriting income |
| Contract assets, unbilled receivables, costs to obtain contracts, progress billings | **Long-cycle / contract-based (construction, defense, engineering)** | Percentage-of-completion dynamics. Overbilling vs. underbilling, contract asset growth vs. revenue, cash collection timing on milestones. Watch for aggressive revenue recognition through under-reserved contract losses |
| Deferred commissions, capitalized content/software, prepaid expenses dominate | **High-intangible / platform** | "Hidden" working capital in capitalized costs. Focus on capitalization rate vs. amortization, whether capitalizing faster than amortizing (building a balloon), and the cash flow impact of these non-traditional working capital items |
If the company is a hybrid or doesn't map cleanly, construct a blended framework. The profile is a guide, not a constraint.
**Edge cases:**
- **SaaS / negative working capital businesses**: Traditional CCC is misleading or meaningless. The entire framework should pivot to deferred revenue dynamics, billings analysis, and RPO trends. Working capital is a source of cash, not a use — frame accordingly. The earnings quality analysis still applies (accruals ratio, CFO/NI) but interpret directionally opposite: declining deferred revenue growth is the red flag here, not rising receivables.
- **Financial institutions**: Skip CCC entirely. The balance sheet IS the product. Focus the entire report on credit quality and reserve adequacy: allowance for loan losses / total loans, provision expense / net charge-offs (the "reserve build" or "reserve release"), vintage analysis if available, and the gap between provision expense booked through earnings and actual cash losses realized.
- **Insurance companies**: Skip CCC. Focus on loss reserve adequacy and development. Prior-year reserve development (favorable = prior reserves were adequate or over-reserved; adverse = prior reserves were insufficient). Show the trend. Connect reserve movements to reported combined ratio and operating income.
- **Pre-revenue / early-stage companies**: Focus on burn rate and cash runway. Working capital analysis still applies but framed as "how much cash is being consumed by the operating cycle" rather than earnings quality (since there are no meaningful earnings).
- **Conglomerates / multi-segment**: Use consolidated working capital data but flag if segment mix makes the consolidated CCC misleading. Note which segments are likely driving the consolidated working capital dynamics.
- **Seasonal businesses**: Explicitly normalize for seasonality by comparing each quarter to the same quarter prior year, not the prior sequential quarter. Call out the seasonal pattern so the reader doesn't mistake a normal seasonal build for a structural deterioration.
- **Companies with large non-cash charges**: SBC, amortization of intangibles, and impairments can distort the CFO/NI ratio. When calculating earnings quality metrics, provide both the unadjusted and adjusted (ex-SBC, ex-amortization) versions and explain which is more informative for this specific business.
## 3. Working Capital Data Pull
Calculate 10 quarters backward from `latest_calendar_quarter`. Pull all working capital components identified in Step 2 for those periods:
**Balance sheet** (all working capital components):
- Accounts receivable
- Inventory (total, and breakdown into raw materials / WIP / finished goods if available)
- Accounts payable
- Deferred revenue / contract liabilities
- Contract assets / unbilled receivables
- Prepaid expenses
- Accrued liabilities / other current liabilities
- Total current assets, total current liabilities
**Income statement:**
- Revenue
- COGS / cost of revenue (if applicable)
- Operating income
- Net income
**Cash flow statement:**
- Cash flow from operations (CFO)
- Changes in each working capital component (if available as separate line items)
- Depreciation & amortization
- Stock-based compensation
- Capital expenditures
- Free cash flow (compute as CFO - CapEx if not available directly, label "(calc.)")
**Important: YTD-to-quarterly conversion.** Some companies (e.g., Apple) report cash flow items on a fiscal year-to-date basis rather than quarterly. Check whether CF data appears to be YTD (values increasing monotonically through the fiscal year, then resetting). If so, convert to quarterly values by subtracting the prior quarter's YTD figure. Note this conversion in the report.
**Business-specific KPIs** as identified in Step 2.
**Derived metrics** (calculate from pulled data, label each as "(calc.)" and show formulas):
- DSO = (Accounts Receivable / Revenue) × days-in-period
- DIO = (Inventory / COGS) × days-in-period (if inventory-intensive)
- DPO = (Accounts Payable / COGS) × days-in-period
- CCC = DSO + DIO − DPO (if applicable)
- Accrual ratio = (Net Income − CFO) / Average Total Assets
- Cash conversion ratio = CFO / Net Income
- Working capital intensity = ΔNet Working Capital / ΔRevenue
- Profile-specific derived metrics (e.g., deferred revenue days for SaaS, allowance/loans for banks, reserve-to-premium for insurance)
## 4. Qualitative Research
Search SEC filings for context on working capital dynamics. Use profile-specific search terms:
- **Inventory-intensive**: Try "inventory reserves", "inventory write-down"; fallback to "excess and obsolete", "channel inventory", "sell-through"
- **SaaS/subscription**: Try "remaining performance obligations", "deferred revenue"; fallback to "billings", "contract liabilities", "revenue recognition"
- **Services**: Try "unbilled receivables", "days sales outstanding"; fallback to "allowance for doubtful accounts", "contract assets"
- **Financials**: Try "allowance for credit losses", "provision"; fallback to "net charge-offs", "reserve adequacy", "CECL"
- **General (all profiles)**: Try "accounts receivable", "accounts payable"; fallback to "working capital", "cash conversion", "liquidity"
Extract management commentary on working capital trends, collection issues, inventory management, supplier terms, etc. with document citations.
## 5. Analysis & Report Synthesis
**Section 1: Working Capital Profile (brief)**
- 2-3 sentences identifying the business's working capital archetype and why it matters
- What is the "unit of working capital risk" for this business? (inventory for a manufacturer, receivables for a services firm, deferred revenue for SaaS, reserves for insurance)
- One sentence on the headline finding: is working capital a source of strength, a neutral factor, or a red flag for this company right now?
**Section 2: Cash Conversion Cycle (or profile-adapted equivalent)**
For inventory-intensive businesses, show the full CCC decomposition:
- DSO, DIO, DPO, CCC — quarterly history (10 quarters)
- Include YoY change as sub-rows
- Highlight any quarter where a component moved more than 5 days (or equivalent threshold) — this is a flag
For non-inventory businesses, adapt the framework:
- SaaS/subscription: Show "Days Deferred Revenue Outstanding" (deferred revenue / revenue × days), billings-to-revenue ratio, and net working capital as % of revenue
- Services: DSO decomposition (billed vs. unbilled), DPO, net working capital days
- Financials: Skip CCC entirely — use provision/NCO coverage, allowance/loans, deposit mix
- Insurance: Skip CCC — use reserve development, combined ratio decomposition, cash flow from underwriting vs. reported income
**Section 3: Earnings Quality Assessment**
This is the section that makes the report valuable for a short-seller or skeptical long. Three sub-analyses:
*3a. Accruals Analysis*
- Calculate the Sloan accrual ratio: (Net Income − CFO) / Average Total Assets
- Persistent high positive accruals = low earnings quality = earnings running ahead of cash
- Negative accruals (CFO > Net Income) = high earnings quality
- Show the quarterly trend. Is the accrual ratio rising (deteriorating) or falling (improving)?
- Decompose the accrual: which specific working capital line items are driving the gap between earnings and cash flow? Is it receivables growing faster than revenue? Inventory building? Payables shrinking? Deferred revenue decelerating?
*3b. Cash Conversion Ratio*
- CFO / Net Income, quarterly and trailing-twelve-month
- A healthy business should convert >80% of net income to CFO over time (adjust by business model — SaaS may be >100% due to deferred revenue; capex-heavy businesses need FCF/NI instead)
- Flag any quarter where conversion drops below 60% and explain why
*3c. Revenue-to-Receivables Divergence*
- Show revenue growth vs. receivables growth on the same basis (YoY)
- When receivables growth persistently exceeds revenue growth, it's a classic red flag: the company may be extending payment terms to pull forward sales, booking revenue on deteriorating credits, or facing collection issues
- Calculate the divergence spread (receivables growth − revenue growth) and show whether it's widening or narrowing
**Section 4: Working Capital Intensity & Growth Drag**
How much incremental working capital does this business consume for each dollar of revenue growth?
- Calculate: ΔNet Working Capital / ΔRevenue for each period (the "working capital intensity ratio"). **Use YoY changes (not sequential QoQ)** for this ratio to avoid seasonal noise — QoQ denominators can flip sign due to seasonality, making the ratio meaningless. If computing on a TTM rolling basis, show that instead.
- Show the trend: is the business becoming more or less capital-efficient as it scales?
- Quantify the FCF impact: "In the last four quarters, working capital consumed $Xm of cash, reducing FCF by X% vs. what it would have been at stable working capital"
- For high-growth companies, this is critical: a business growing 30% with 15% working capital intensity is funding growth very differently than one growing 30% with 2% intensity
- Contextualize with capex intensity: total investment requirement = capex + working capital investment. Show both as % of revenue
**Section 5: Component Deep-Dives**
For each material working capital component (the 2-3 that matter most for this business type), provide a focused analysis:
*Structure for each component:*
- Current level (absolute and as days/% of revenue)
- Historical trend (10 quarters)
- Rate of change: is it improving or deteriorating, and is the rate of change itself accelerating?
- Context: why might this be happening? Reference management commentary from filings if available
- Benchmark: where does this sit vs. the company's own history? (Don't fabricate peer comps — only include if data supports it)
*Which components to deep-dive depends on the profile:*
- Inventory-intensive: Inventory (breakdown by raw/WIP/finished if available), Receivables, Payables
- SaaS: Deferred Revenue, Contract Assets, Deferred Commissions (capitalized contract costs)
- Services: Receivables (billed + unbilled), Accrued Liabilities
- Financials: Loan Loss Allowance, Provision Expense, Net Charge-Offs
- Insurance: Loss Reserves, Unearned Premiums, Prior-Year Development
**Section 6: Red Flags & Green Flags**
Explicit, concise checklist format. Scan the data for each of the following and report findings:
*Red flags (earnings quality / liquidity concerns):*
- DSO increasing while revenue growth is slowing (demand deterioration masked by term extensions)
- Inventory growing faster than COGS or revenue (demand softening, potential write-down ahead)
- DPO declining (suppliers tightening terms — potential credit deterioration signal)
- Accrual ratio rising above +5% (earnings quality deteriorating)
- CFO/Net Income < 0.6x for two or more consecutive quarters
- Receivables growth > revenue growth for 3+ consecutive quarters
- Deferred revenue growth decelerating faster than revenue growth (pipeline weakening for subscription businesses)
- Unbilled receivables / contract assets growing rapidly (aggressive percentage-of-completion or ASC 606 recognition)
- Capitalized costs (software, commissions, content) growing faster than associated revenue (building an amortization balloon)
- Working capital intensity ratio rising (growth becoming more capital-consumptive)
- Allowance/loans declining while loan growth accelerates (under-reserving for banks)
*Green flags (strong cash generation / conservative accounting):*
- DSO declining or stable while revenue grows (pricing power, healthy demand)
- CCC shortening over time (operational improvement)
- CFO/Net Income persistently > 1.0x (earnings over-earned in cash)
- Negative net working capital (float-funded business model — customers pay before you deliver)
- Deferred revenue growing faster than revenue (strong forward visibility)
- Accrual ratio consistently negative (cash earnings exceed reported earnings)
- Allowance/loans stable or rising modestly while credit metrics are benign (conservative reserving)
For each flag triggered, include the specific data that triggered it and the implication. Use Daloopa citations for every figure.
**Section 7: Key Drivers & What to Watch**
The forward-looking, analytically highest-value section:
- **The 3-5 working capital metrics that matter most** for this specific company, ranked by sensitivity to the investment thesis
- For each: current level, direction, historical range, and what would cause an inflection
- **Scenario analysis**: "If DSO increases another 5 days from here, the company would need an additional ~$Xm in working capital, reducing FCF by ~X%" — quantify the P&L/cash flow impact of plausible working capital scenarios
- **What to watch next quarter**: specific items to monitor in the next earnings release or 10-Q filing. Be concrete: "Watch the inventory line relative to the revenue guide — if inventory grows >X% sequentially while revenue is guided flat, it would be the third consecutive quarter of inventory build and a meaningful negative signal"
**Section 8: Summary Assessment**
- 3-4 sentence verdict on working capital health and earnings quality
- Is this a cash-generative business with conservative accounting, or is there a gap between reported earnings and economic reality?
- What is the single biggest risk (or source of comfort) in the working capital profile?
**Analytical standards:**
- **Three-layer density**: every metric should have a data point, context (vs. history, vs. expectations), and an implication (so what?)
- **Show your math**: all derived metrics (DSO, DIO, DPO, CCC, accruals ratio, cash conversion ratio, working capital intensity) should show the formula and inputs used, so the reader can verify or adjust
- **Use quarterly data, but show TTM where appropriate**: some metrics (like the accruals ratio) are more meaningful on a trailing-twelve-month basis to smooth seasonality. Show both quarterly and TTM when relevant
- **Flag seasonality**: many businesses have seasonal working capital patterns (retail builds inventory in Q3 for Q4, etc.). Compare YoY, not just QoQ, for directional conclusions. Note when a move is seasonal vs. structural
- **Distinguish levels from changes**: a company can have structurally high DSO (that's the business model) but stable DSO (not a red flag). The concern is when DSO is rising, not when it's high in absolute terms. Always emphasize the direction and rate of change, not just the level
- **No false precision**: working capital metrics calculated from quarterly balance sheets are point-in-time snapshots. Acknowledge this limitation. If average balances are available, use them; if not, use period-end and note the limitation
- **Source everything**: every number traceable to Daloopa. Use citations per the design system conventions
- **Flag data gaps**: if a key balance sheet component isn't broken out in Daloopa's data (e.g., inventory broken into raw/WIP/finished), say so and explain what that limits
## 6. Charts
Use `infra/chart_generator.py` for charts. Include at minimum:
1. **CCC trend chart** (time-series or waterfall showing DSO + DIO − DPO = CCC by quarter, or the equivalent decomposition for non-inventory businesses)
2. **Earnings quality chart** (time-series showing net income vs. CFO over time, with the accrual gap visible)
3. **Revenue vs. receivables growth chart** (two lines on the same axis showing YoY growth rates, with divergence highlighted)
4. Additional charts as warranted by the profile (e.g., inventory/COGS ratio for manufacturers, deferred revenue waterfall for SaaS, reserve adequacy trend for financials)
**All charts must be embedded in the HTML as base64 data URIs** (e.g., `<img src="data:image/png;base64,...">`) so the report is fully self-contained with no external file dependencies. After generating each chart PNG, read the file and convert to base64 for embedding. Do not use relative `<img src="filename.png">` paths.
If chart_generator.py is unavailable, embed simple inline SVG charts directly in the HTML.
## 7. Save Report
Save to `reports/{TICKER}_working_capital.html` using the HTML report template from `../design-system.md`. Write the full analysis as styled HTML with the design system CSS inlined. This is the final deliverable — no intermediate markdown step needed.
Structure the report with these sections:
```
<h1>{Company Name} ({TICKER}) — Working Capital & Earnings Quality Analysis</h1>
<p>Generated: {date}</p>
<h2>Summary</h2>
{2-3 sentences: What is the working capital profile? Headline finding on earnings quality. Key risk or comfort.}
<h2>Working Capital Profile</h2>
{Section 1 content}
<h2>Cash Conversion Cycle</h2>
<table>
| Metric | Q(-9) | Q(-8) | ... | Q(latest) |
{DSO, DIO, DPO, CCC (or profile equivalent) — with Daloopa citations and YoY change sub-rows}
</table>
{Commentary on CCC trend and any flagged moves}
<h2>Earnings Quality Assessment</h2>
<h3>Accruals Analysis</h3>
<table>
| Metric | Q(-9) | Q(-8) | ... | Q(latest) |
{Net Income, CFO, Accrual Ratio — with Daloopa citations}
</table>
{Decomposition of the accrual and trend analysis}
<h3>Cash Conversion Ratio</h3>
<table>
| Metric | Q(-9) | Q(-8) | ... | Q(latest) |
{CFO, Net Income, CFO/NI ratio, TTM CFO/NI — with Daloopa citations}
</table>
{Assessment of cash conversion quality}
<h3>Revenue vs. Receivables Divergence</h3>
<table>
| Metric | Q(-9) | Q(-8) | ... | Q(latest) |
{Revenue YoY growth, Receivables YoY growth, Divergence spread}
</table>
{Analysis of divergence trend}
<h2>Working Capital Intensity & Growth Drag</h2>
<table>
| Metric | Q(-9) | Q(-8) | ... | Q(latest) |
{ΔNet WC, ΔRevenue, WC Intensity Ratio, CapEx % Rev, Total Investment % Rev}
</table>
{FCF impact quantification and growth drag assessment}
<h2>Component Deep-Dives</h2>
{2-3 focused deep-dives on the most material components for this business type}
<h2>Red Flags & Green Flags</h2>
{Checklist format with specific data citations for each triggered flag}
<h2>Key Drivers & What to Watch</h2>
{Ranked drivers with scenario analysis and next-quarter monitoring items}
<h2>Summary Assessment</h2>
{3-4 sentence verdict}
```
All financial figures must use Daloopa citation format: `<a href="https://daloopa.com/src/{fundamental_id}">$X.XX million</a>`
Tell the user where the HTML report was saved.
Highlight the key findings: Is this a cash-generative business? Are there earnings quality concerns? What should an analyst focus on in the next filing?
Referenced files: 1
Technical details
- First seen
- Sep 30, 2026 · 22:02 UTC
- Last seen
- Oct 1, 2026 · 12:00 UTC
- Collection status
- Collected
plugin_connector_692f6343042c8191b6617e8352444692
Download listing JSON