{"id":7997,"plugin_id":"plugin_connector_692f6343042c8191b6617e8352444692","kind":"skill","collection_source":null,"comparison_source":null,"observed_at":"2026-09-30T22:51:45.935Z","digest":"22e71568c4326013bbc19144537425bd380873e271ccc37e51c7e5ea6f44f192","against":null,"payload":{"name":"comps","description":"Trading comparables analysis with peer multiples and implied valuation","included_files":[{"relative_path":"agents/openai.yaml","size_in_bytes":228}],"skill_md_contents":"---\nname: comps\ndescription: Trading comparables analysis with peer multiples and implied valuation\n---\n\nBuild 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.\n\n**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.\n\nFollow these steps:\n\n## 1. Company Lookup\nLook up the company by ticker using `discover_companies`. Capture:\n- `company_id`\n- `latest_calendar_quarter` — anchor for all period calculations below (see `../data-access.md` Section 1.5)\n- `latest_fiscal_quarter`\n- Firm name for report attribution (default: \"Daloopa\") — see `../data-access.md` Section 4.5\n\n## 2. Identify Peer Group\nBased on the company's business model, sector, size, and competitive landscape, identify 5-10 comparable companies. Consider:\n- **Direct competitors** in the same market\n- **Business model peers** (similar revenue model even if different sector)\n- **Size peers** (similar market cap range)\n- **Growth profile peers** (similar growth rate)\n\nPrioritize relevance over size matching. A direct competitor at a different scale is more useful than a similar-sized company in a different industry.\n\nList the peer tickers and briefly justify each selection (1 sentence).\n\n## 3. Target Company Fundamentals\nCalculate 4 quarters backward from `latest_calendar_quarter`. Pull from Daloopa for the target company:\n- Revenue (compute trailing 4Q total)\n- EBITDA (compute trailing 4Q; if not available, use Op Income + D&A, label \"(calc.)\")\n- Net Income (trailing 4Q)\n- Diluted EPS (trailing 4Q sum)\n- Free Cash Flow (trailing 4Q; compute as OCF - CapEx, label \"(calc.)\")\n- Revenue YoY growth (most recent quarter)\n- Operating Margin (most recent quarter)\n- Net Margin (most recent quarter)\n\n## 4. Stock Prices & Valuation Multiples\nUse `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.\n\nCompute valuation multiples by combining stock prices with the fundamentals pulled in Sections 3 and 5:\n- **Market Cap** = Close price × Diluted shares outstanding\n- **Enterprise Value** = Market Cap + Total Debt - Cash (from Daloopa balance sheet if available)\n- **P/E (trailing)** = Market Cap / Net Income (trailing 4Q)\n- **EV/EBITDA** = EV / EBITDA (trailing 4Q)\n- **P/S** = Market Cap / Revenue (trailing 4Q)\n- **P/B** = Market Cap / Total Equity\n- **FCF Yield** = FCF (trailing 4Q) / Market Cap\n- **Dividend Yield** = Dividends Paid (trailing 4Q) / Market Cap\n\nFor beta, PEG ratio, and forward multiples, use infra scripts, consensus data, or web search (see `../data-access.md` Sections 2-3).\n\nIf 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.\n\n## 5. Peer Fundamentals from Daloopa\nFor each peer that is available in Daloopa:\n- Look up the company\n- Calculate 4 quarters backward from `latest_calendar_quarter`. Pull revenue, operating income, net income for those periods.\n- Compute revenue growth YoY, operating margin, net margin\n\nFor peers not in Daloopa, rely on market data multiples only (see `../data-access.md` Section 2) and note the data source limitation.\n\n## 5.5. Peer Operational KPIs\n\nFor 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:\n\n- **SaaS/Cloud**: ARR, net revenue retention, RPO/cRPO, customers >$100K, cloud gross margin\n- **Consumer Tech**: DAU/MAU, ARPU, engagement metrics, installed base, paid subscribers\n- **E-commerce/Marketplace**: GMV, take rate, active buyers/sellers, order frequency\n- **Retail**: same-store sales, store count, average ticket, transactions\n- **Telecom/Media**: subscribers, churn, ARPU, content spend\n- **Hardware**: units shipped, ASP, attach rate, installed base\n- **Financial Services**: AUM, NIM, loan growth, credit quality metrics, fee income ratio\n- **Pharma/Biotech**: pipeline stage, patient starts, scripts, market share\n- **Industrials/Energy**: backlog, book-to-bill, utilization, production volumes, reserves\n\nPull 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.\n\nAdd 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.\n\n## 6. Build Comps Table\nCreate the main comparables table with these columns:\n| Company | Ticker | Mkt Cap | EV | P/E | Fwd P/E | EV/EBITDA | P/S | Rev Growth | Op Margin | Net Margin | FCF Yield |\n\nSort by market cap descending. Include:\n- **Peer median** row\n- **Peer mean** row\n- **Target company** row (highlighted / separated)\n- Target's percentile rank within the peer group for each metric\n\n## 7. Implied Valuation\nApply peer group median and mean multiples to the target's fundamentals:\n\n| Methodology | Peer Median Multiple | Target Metric | Implied Value |\n|---|---|---|---|\n| P/E | XX.Xx | $X.XX EPS | $XXX |\n| EV/EBITDA | XX.Xx | $XXX EBITDA | $XXX |\n| P/S | XX.Xx | $XXX Revenue | $XXX |\n| FCF Yield | X.X% | $XXX FCF | $XXX |\n\nFor each:\n- Implied Enterprise Value = Multiple × Target's Metric\n- Implied Equity Value = EV - Net Debt (for EV-based multiples) or direct (for equity multiples)\n- Implied Share Price = Equity Value / Shares Outstanding\n\nCompute range (min to max implied price) and central tendency.\n\n## 8. Consensus Forward Estimates (if available)\nIf consensus estimates are available (see `../data-access.md` Section 3):\n- Add NTM (next twelve months) revenue and EPS estimates for target and each peer\n- Compute forward P/E and forward EV/EBITDA using consensus NTM estimates\n- Note where the target's forward multiples sit vs the peer group\n- Flag any peers with significant estimate revision trends\n\nIf consensus data is not available, use trailing multiples only and note the limitation.\n\n## 9. Premium/Discount Analysis\nAssess whether the target trades at a premium or discount to peers:\n- For each multiple, show target vs peer median as a % premium/discount\n- Consider whether a premium/discount is justified based on:\n  - Growth differential (higher growth = deserves premium)\n  - Margin differential (higher margins = deserves premium)\n  - Market position (leader vs challenger)\n  - Risk profile\n\n**Be honest about whether the premium is truly justified:**\n- 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?\n- If the stock trades at a significant premium but growth is decelerating toward peer levels, flag the derating risk explicitly.\n- 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?\n- **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.\n\n## 10. Save Report\nSave 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.\n\nStructure the report with these sections:\n\n```\n<h1>{Company Name} ({TICKER}) — Comparable Companies Analysis</h1>\n<p>Generated: {date}</p>\n\n<h2>Summary</h2>\n{2-3 sentences: Where does the company trade relative to peers? Is it cheap or expensive and why?}\n\n<h2>Peer Group Selection</h2>\n<table>\n| Peer | Ticker | Rationale |\n{table with justification for each peer}\n</table>\n\n<h2>Comparables Table</h2>\n<table>\n| Company | Ticker | Mkt Cap | P/E | Fwd P/E | EV/EBITDA | P/S | Rev Growth | Op Margin |\n{full comps table with target highlighted}\n| **Peer Median** | | | XX.Xx | XX.Xx | XX.Xx | XX.Xx | X.X% | X.X% |\n| **Peer Mean** | | | XX.Xx | XX.Xx | XX.Xx | XX.Xx | X.X% | X.X% |\n| **{TICKER}** | | | **XX.Xx** | **XX.Xx** | **XX.Xx** | **XX.Xx** | **X.X%** | **X.X%** |\n</table>\n\n<h2>Target vs Peer Premium/Discount</h2>\n<table>\n| Multiple | Target | Peer Median | Premium/Discount |\n{table showing where target is rich/cheap}\n</table>\n\n<h2>Implied Valuation</h2>\n<table>\n| Methodology | Multiple | Target Metric | Implied Price | vs Current |\n{table with implied values}\n</table>\n\n<table>\n| **Valuation Range** | **Low** | **Median** | **High** |\n| Implied Price | $XXX | $XXX | $XXX |\n| vs Current Price | -X% | +X% | +X% |\n</table>\n\n<h2>Premium/Discount Justification</h2>\n{Analysis of whether current premium/discount is warranted}\n\n<h2>Peer Operational KPIs</h2>\n<table>\n| KPI | {TICKER} | Peer 1 | Peer 2 | ... | Peer Median |\n{KPI comparison table — sparse where data unavailable, footnoted}\n</table>\n\n<h2>Key Observations</h2>\n<ul>{3-5 bullet points on relative valuation, standout metrics, peer group dynamics, KPI differentiation}</ul>\n```\n\nAll financial figures from Daloopa must use citation format: `<a href=\"https://daloopa.com/src/{fundamental_id}\">$X.XX million</a>`\n\nTell the user where the HTML report was saved.\n\nHighlight: where the stock trades relative to peers (premium/discount), the implied valuation range, and the most relevant multiple for this company.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}