| Build institutional-grade comparable company analyses with operating metrics, valuation multiples, and statistical benchmarking in Excel/spreadsheet format.
npx skills add https://github.com/anthropics/financial-services --skill comps-analysis
ALWAYS follow this data source hierarchy:
Why this matters: MCP sources provide verified, institutional-grade data with proper citations. Web search results can be outdated, inaccurate, or unreliable for financial analysis.
This skill teaches Claude to build institutional-grade comparable company analyses that combine operating metrics, valuation multiples, and statistical benchmarking. The output is a structured Excel/spreadsheet that enables informed investment decisions through peer comparison.
Reference Material & Contextualization:
An example comparable company analysis is provided in examples/comps_example.xlsx. When using this or other example files in this skill directory, use them intelligently:
DO use examples for:
DO NOT use examples for:
ALWAYS ask yourself first:
Adapt based on specifics:
Core principle: Use template principles (clear structure, statistical rigor, transparent formulas) but vary execution based on context. The goal is institutional-quality analysis, not institutional-looking templates.
User-provided examples and explicit preferences always take precedence over defaults.
"Build the right structure first, then let the data tell the story."
Start with headers that force strategic thinking about what matters, input clean data, build transparent formulas, and let statistics emerge automatically. A good comp should be immediately readable by someone who didn't build it.
Environment — Office JS vs Python:
Excel.run(async (context) => {...})). Write formulas via range.formulas = [["=E7/C7"]], not range.values. No separate recalc step — Excel handles it natively. Use range.format.* for colors/fonts.cell.value = "=E7/C7" (formula string)..merge() then set .values on the merged range (throws InvalidArgument — range still reports its pre-merge dimensions). Instead write the value to the top-left cell alone, then merge + format the full range: ws.getRange("A1").values = [["TECHNOLOGY — COMPARABLE COMPANY ANALYSIS"]];
const hdr = ws.getRange("A1:H1");
hdr.merge();
hdr.format.fill.color = "#1F4E79";
hdr.format.font.color = "#FFFFFF";
hdr.format.font.bold = true;
Formulas, not hardcodes:
cell.value = "=E7/C7" (formula string), NOT cell.value = 0.687 (computed result)Verify step-by-step with the user:
Row 1: [ANALYSIS TITLE] - COMPARABLE COMPANY ANALYSIS
Row 2: [List of Companies with Tickers] • [Company 1 (TICK1)] • [Company 2 (TICK2)] • [Company 3 (TICK3)]
Row 3: As of [Period] | All figures in [USD Millions/Billions] except per-share amounts and ratios
Why this matters: Establishes context immediately. Anyone opening this file knows what they're looking at, when it was created, and how to interpret the numbers.
IMPORTANT: These are suggested defaults only. Always prioritize:
Suggested Font & Typography:
Default Color & Shading — Professional Blue/Grey Palette (minimal is better):
#1F4E79 or #17365D navy)#D9E1F2 or similar pale blue)#F2F2F2)Suggested Formatting Conventions:
Note: If the user provides a template file or specifies different formatting, use that instead.
// Core ratios - these are always calculated
Gross Margin (F7): =E7/C7
EBITDA Margin (H7): =G7/C7
// Optional ratios - include if relevant
FCF Margin: =[FCF]/[Revenue]
Net Margin: =[Net Income]/[Revenue]
Rule of 40: =[Growth %]+[FCF Margin %]
Golden Rule: Every ratio should be [Something] / [Revenue] or [Something] / [Something from this sheet]. Keep it simple.
CRITICAL: Add statistics formulas for all comparable metrics (ratios, margins, growth rates, multiples).
[Leave one blank row for visual separation]
- Maximum: =MAX(B7:B9)
- 75th Percentile: =QUARTILE(B7:B9,3)
- Median: =MEDIAN(B7:B9)
- 25th Percentile: =QUARTILE(B7:B9,1)
- Minimum: =MIN(B7:B9)
Columns that NEED statistics (comparable metrics):
Columns that DON'T need statistics (size metrics):
Note: Add one blank row between company data and statistics rows for visual separation. Do NOT add a "SECTOR STATISTICS" or "VALUATION STATISTICS" header row.
Why quartiles matter: They show distribution, not just average. A 75th percentile multiple tells you what "premium" companies trade at.
Key Principle: Include 3-5 core multiples that matter for your industry. Don't include every possible metric just because you can.
// Core multiples - always include these
EV/Revenue: =[Enterprise Value]/[LTM Revenue]
EV/EBITDA: =[Enterprise Value]/[LTM EBITDA]
P/E Ratio: =[Market Cap]/[Net Income]
// Optional multiples - include if data available
FCF Yield: =[LTM FCF]/[Market Cap]
PEG Ratio: =[P/E]/[Growth Rate %]
CRITICAL: Valuation multiples MUST reference the operating metrics section. Never input the same raw data twice. If revenue is in C7, then EV/Revenue formula should reference C7.
Same structure as operating section: Max, 75th, Median, 25th, Min for every metric. Add one blank row for visual separation between company data and statistics. Do NOT add a "VALUATION STATISTICS" header row.
Data Sources & Quality:
Key Definitions:
Valuation Methodology:
Analysis Framework:
"Which company is undervalued?"
→ Focus on: EV/Revenue, EV/EBITDA, P/E, Market Cap
→ Skip: Operational details, growth metrics
"Which company is most efficient?"
→ Focus on: Gross Margin, EBITDA Margin, FCF Margin, Asset Turnover
→ Skip: Size metrics, absolute dollar amounts
"Which company is growing fastest?"
→ Focus on: Revenue Growth %, EBITDA CAGR, User/Customer Growth
→ Skip: Margin metrics, leverage ratios
"Which is the best cash generator?"
→ Focus on: FCF, FCF Margin, FCF Conversion, CapEx intensity
→ Skip: EBITDA, P/E ratios
Software/SaaS:
Must have: Revenue Growth, Gross Margin, Rule of 40
Optional: ARR, Net Dollar Retention, CAC Payback
Skip: Asset Turnover, Inventory metrics
Manufacturing/Industrials:
Must have: EBITDA Margin, Asset Turnover, CapEx/Revenue
Optional: ROA, Inventory Turns, Backlog
Skip: Rule of 40, SaaS metrics
Financial Services:
Must have: ROE, ROA, Efficiency Ratio, P/E
Optional: Net Interest Margin, Loan Loss Reserves
Skip: Gross Margin, EBITDA (not meaningful for banks)
Retail/E-commerce:
Must have: Revenue Growth, Gross Margin, Inventory Turnover
Optional: Same-Store Sales, Customer Acquisition Cost
Skip: Heavy R&D or CapEx metrics
5 operating metrics - Revenue, Growth, 2-3 margins/efficiency metrics
5 valuation metrics - Market Cap, EV, 3 multiples
= 10 total columns - Enough to tell the story, not so many you lose the thread
If you have more than 15 metrics, you're probably including noise. Edit ruthlessly.
For sourced data, cite exactly where it came from:
For assumptions, explain the reasoning:
Why this matters: Enables audit trails, data verification, assumption transparency, and future updates
❌ Mixing market cap and enterprise value in formulas
❌ Using different time periods for numerator and denominator (LTM vs quarterly)
❌ Hardcoding numbers into formulas instead of cell references
❌ Hard-coded inputs without cell comments citing the source OR explaining the assumption
❌ Missing hyperlinks to SEC filings or data sources when available
❌ Including too many metrics without clear purpose
❌ Including non-comparable companies (different business models)
❌ Using outdated data without disclosure
❌ Calculating averages of percentages incorrectly (should be median)
For columns showing calculations, use clear unit labels:
Revenue Growth (YoY) % | EBITDA Margin | FCF Margin | Rule of 40
Instead of just mean/median, quartiles show:
This helps answer: "Is our target company trading rich or cheap vs. peers?"
Software/SaaS:
Healthcare:
Industrials:
Consumer:
Simple Version (Start here):
┌─────────────────────────────────────────────────────────────┐
│ TECHNOLOGY - COMPARABLE COMPANY ANALYSIS │
│ Microsoft • Alphabet • Amazon │
│ As of Q4 2024 | All figures in USD Millions │
├─────────────────────────────────────────────────────────────┤
│ OPERATING METRICS │
├──────────┬─────────┬─────────┬──────────┬──────────────────┤
│ Company │ Revenue │ Growth │ Gross │ EBITDA │ EBITDA │
│ │ (LTM) │ (YoY) │ Margin │ (LTM) │ Margin │
├──────────┼─────────┼─────────┼──────────┼─────────┼────────┤
│ MSFT │ 261,400 │ 12.3% │ 68.7% │ 205,100 │ 78.4% │
│ GOOGL │ 349,800 │ 11.8% │ 57.9% │ 239,300 │ 68.4% │
│ AMZN │ 638,100 │ 10.5% │ 47.3% │ 152,600 │ 23.9% │
│ │ │ │ │ │ │ [blank row]
│ Median │ =MEDIAN │ =MEDIAN │ =MEDIAN │ =MEDIAN │=MEDIAN │
│ 75th % │ =QUART │ =QUART │ =QUART │ =QUART │=QUART │
│ 25th % │ =QUART │ =QUART │ =QUART │ =QUART │=QUART │
├─────────────────────────────────────────────────────────────┤
│ VALUATION MULTIPLES │
├──────────┬──────────┬──────────┬──────────┬────────────────┤
│ Company │ Mkt Cap │ EV │ EV/Rev │ EV/EBITDA │ P/E│
├──────────┼──────────┼──────────┼──────────┼───────────┼────┤
│ MSFT │3,550,000 │3,530,000 │ 13.5x │ 17.2x │36.0│
│ GOOGL │2,030,000 │1,960,000 │ 5.6x │ 8.2x │24.5│
│ AMZN │2,226,000 │2,320,000 │ 3.6x │ 15.2x │58.3│
│ │ │ │ │ │ │ [blank row]
│ Median │ =MEDIAN │ =MEDIAN │ =MEDIAN │ =MEDIAN │=MED│
│ 75th % │ =QUART │ =QUART │ =QUART │ =QUART │=QRT│
│ 25th % │ =QUART │ =QUART │ =QUART │ =QUART │=QRT│
└──────────┴──────────┴──────────┴──────────┴───────────┴────┘
Add complexity only when needed:
Only add these if they're critical to your analysis. Most comps work fine with just core metrics.
Software/SaaS:
Add if relevant: ARR, Net Dollar Retention, Rule of 40
Financial Services:
Add if relevant: ROE, Net Interest Margin, Efficiency Ratio
E-commerce:
Add if relevant: GMV, Take Rate, Active Buyers
Healthcare:
Add if relevant: R&D/Revenue, Pipeline Value, Patent Timeline
Manufacturing:
Add if relevant: Asset Turnover, Inventory Turns, Backlog
🚩 Inconsistent time periods (mixing quarterly and annual)
🚩 Missing data without explanation
🚩 Significant differences between data sources (>10% variance)
🚩 Negative EBITDA companies being valued on EBITDA multiples (use revenue multiples instead)
🚩 P/E ratios >100x without hypergrowth story
🚩 Margins that don't make sense for the industry
🚩 Different fiscal year ends (causes timing problems)
🚩ixing pure-play and conglomerates
🚩 Materially different business models labeled as "comps"
When in doubt, exclude the company. Better to have 3 perfect comps than 6 questionable ones.
// Statistical Functions
=AVERAGE(range) // Simple mean
=MEDIAN(range) // Middle value
=QUARTILE(range, 1) // 25th percentile
=QUARTILE(range, 3) // 75th percentile
=MAX(range) // Maximum value
=MIN(range) // Minimum value
=STDEV.P(range) // Standard deviation
// Financial Calculations
=B7/C7 // Simple ratio (Margin)
=SUM(B7:B9)/3 // Average of multiple companies
=IF(B7>0, C7/B7, "N/A") // Conditional calculation
=IFERROR(C7/D7, 0) // Handle divide by zero
// Cross-Sheet References
='Sheet1'!B7 // Reference another sheet
=VLOOKUP(A7, Table1, 2) // Lookup from data table
=INDEX(MATCH()) // Advanced lookup
// Formatting
=TEXT(B7, "0.0%") // Format as percentage
=TEXT(C7, "#,##0") // Thousands separator
Gross Margin = Gross Profit / Revenue
EBITDA Margin = EBITDA / Revenue
FCF Margin = Free Cash Flow / Revenue
FCF Conversion = FCF / Operating Cash Flow
ROE = Net Income / Shareholders' Equity
ROA = Net Income / Total Assets
Asset Turnover = Revenue / Total Assets
Debt/Equity = Total Debt / Shareholders' Equity
Before delivering a comp analysis, verify:
After completing a comp analysis, ask:
The best comp analyses evolve with each iteration. Save templates, learn from feedback, and refine the structure based on what decision-makers actually use.
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like \"the xlsx in my downloads\") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.
Picks random winners from lists, spreadsheets, or Google Sheets for giveaways, raffles, and contests. Ensures fair, unbiased selection with transparency.
Query openFDA API for drugs, devices, adverse events, recalls, regulatory submissions (510k, PMA), substance identification (UNII), for FDA regulatory data analysis and safety research.
MATLAB and GNU Octave numerical computing for matrix operations, data analysis, visualization, and scientific computing. Use when writing MATLAB/Octave scripts for linear algebra, signal processing, image processing, differential equations, optimization, statistics, or creating scientific visualizations. Also use when the user needs help with MATLAB syntax, functions, or wants to convert between MATLAB and Python code. Scripts can be executed with MATLAB or the open-source GNU Octave interpreter.
UMAP dimensionality reduction. Fast nonlinear manifold learning for 2D/3D visualization, clustering preprocessing (HDBSCAN), supervised/parametric UMAP, for high-dimensional data.
Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visualisation that requires fine-grained control over visual elements, transitions, or interactions. Use this for bespoke visualisations beyond standard charting libraries, whether in React, Vue, Svelte, vanilla JavaScript, or any other environment.
Access AlphaFold 200M+ AI-predicted protein structures. Retrieve structures by UniProt ID, download PDB/mmCIF files, analyze confidence metrics (pLDDT, PAE), for drug discovery and structural biology.
Comprehensive Python library for astronomy and astrophysics. This skill should be used when working with astronomical data including celestial coordinates, physical units, FITS files, cosmological calculations, time systems, tables, world coordinate systems (WCS), and astronomical data analysis. Use when tasks involve coordinate transformations, unit conversions, FITS file manipulation, cosmological distance calculations, time scale conversions, or astronomical data processing.
Take anthropics/comps-analysis from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.