mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-22 05:22:09 +00:00
docs: deep audit — fix stale config keys, missing commands, and registry drift (#22784)
* docs: deep audit — fix stale config keys, missing commands, and registry drift Cross-checked ~80 high-impact docs pages (getting-started, reference, top-level user-guide, user-guide/features) against the live registries: hermes_cli/commands.py COMMAND_REGISTRY (slash commands) hermes_cli/auth.py PROVIDER_REGISTRY (providers) hermes_cli/config.py DEFAULT_CONFIG (config keys) toolsets.py TOOLSETS (toolsets) tools/registry.py get_all_tool_names() (tools) python -m hermes_cli.main <subcmd> --help (CLI args) reference/ - cli-commands.md: drop duplicate hermes fallback row + duplicate section, add stepfun/lmstudio to --provider enum, expand auth/mcp/curator subcommand lists to match --help output (status/logout/spotify, login, archive/prune/ list-archived). - slash-commands.md: add missing /sessions and /reload-skills entries + correct the cross-platform Notes line. - tools-reference.md: drop bogus '68 tools' headline, drop fictional 'browser-cdp toolset' (these tools live in 'browser' and are runtime-gated), add missing 'kanban' and 'video' toolset sections, fix MCP example to use the real mcp_<server>_<tool> prefix. - toolsets-reference.md: list browser_cdp/browser_dialog inside the 'browser' row, add missing 'kanban' and 'video' toolset rows, drop the stale '38 tools' count for hermes-cli. - profile-commands.md: add missing install/update/info subcommands, document fish completion. - environment-variables.md: dedupe GMI_API_KEY/GMI_BASE_URL rows (kept the one with the correct gmi-serving.com default). - faq.md: Anthropic/Google/OpenAI examples — direct providers exist (not just via OpenRouter), refresh the OpenAI model list. getting-started/ - installation.md: PortableGit (not MinGit) is what the Windows installer fetches; document the 32-bit MinGit fallback. - installation.md / termux.md: installer prefers .[termux-all] then falls back to .[termux]. - nix-setup.md: Python 3.12 (not 3.11), Node.js 22 (not 20); fix invalid 'nix flake update --flake' invocation. - updating.md: 'hermes backup restore --state pre-update' doesn't exist — point at the snapshot/quick-snapshot flow; correct config key 'updates.pre_update_backup' (was 'update.backup'). user-guide/ - configuration.md: api_max_retries default 3 (not 2); display.runtime_footer is the real key (not display.runtime_metadata_footer); checkpoints defaults enabled=false / max_snapshots=20 (not true / 50). - configuring-models.md: 'hermes model list' / 'hermes model set ...' don't exist — hermes model is interactive only. - tui.md: busy_indicator -> tui_status_indicator with values kaomoji|emoji|unicode|ascii (not kawaii|minimal|dots|wings|none). - security.md: SSH backend keys (TERMINAL_SSH_HOST/USER/KEY) live in .env, not config.yaml. - windows-wsl-quickstart.md: there is no 'hermes api' subcommand — the OpenAI-compatible API server runs inside hermes gateway. user-guide/features/ - computer-use.md: approvals.mode (not security.approval_level); fix broken ./browser-use.md link to ./browser.md. - fallback-providers.md: top-level fallback_providers (not model.fallback_providers); the picker is subcommand-based, not modal. - api-server.md: API_SERVER_* are env vars — write to per-profile .env, not 'hermes config set' which targets YAML. - web-search.md: drop web_crawl as a registered tool (it isn't); deep-crawl modes are exposed through web_extract. - kanban.md: failure_limit default is 2, not '~5'. - plugins.md: drop hard-coded '33 providers' count. - honcho.md: fix unclosed quote in echo HONCHO_API_KEY snippet; document that 'hermes honcho' subcommand is gated on memory.provider=honcho; reconcile subcommand list with actual --help output. - memory-providers.md: legacy 'hermes honcho setup' redirect documented. Verified via 'npm run build' — site builds cleanly; broken-link count went from 149 to 146 (no regressions, fixed a few in passing). * docs: round 2 audit fixes + regenerate skill catalogs Follow-up to the previous commit on this branch: Round 2 manual fixes: - quickstart.md: KIMI_CODING_API_KEY mentioned alongside KIMI_API_KEY; voice-mode and ACP install commands rewritten — bare 'pip install ...' doesn't work for curl-installed setups (no pip on PATH, not in repo dir); replaced with 'cd ~/.hermes/hermes-agent && uv pip install -e ".[voice]"'. ACP already ships in [all] so the curl install includes it. - cli.md / configuration.md: 'auxiliary.compression.model' shown as 'google/gemini-3-flash-preview' (the doc's own claimed default); actual default is empty (= use main model). Reworded as 'leave empty (default) or pin a cheap model'. - built-in-plugins.md: added the bundled 'kanban/dashboard' plugin row that was missing from the table. Regenerated skill catalogs: - ran website/scripts/generate-skill-docs.py to refresh all 163 per-skill pages and both reference catalogs (skills-catalog.md, optional-skills-catalog.md). This adds the entries that were genuinely missing — productivity/teams-meeting-pipeline (bundled), optional/finance/* (entire category — 7 skills: 3-statement-model, comps-analysis, dcf-model, excel-author, lbo-model, merger-model, pptx-author), creative/hyperframes, creative/kanban-video-orchestrator, devops/watchers, productivity/shop-app, research/searxng-search, apple/macos-computer-use — and rewrites every other per-skill page from the current SKILL.md. Most diffs are tiny (one line of refreshed metadata). Validation: - 'npm run build' succeeded. - Broken-link count moved 146 -> 155 — the +9 are zh-Hans translation shells that lag every newly-added skill page (pre-existing pattern). No regressions on any en/ page.
This commit is contained in:
parent
ea2d66ddc0
commit
252d68fd45
181 changed files with 5498 additions and 122 deletions
|
|
@ -0,0 +1,451 @@
|
|||
---
|
||||
title: "3 Statement Model"
|
||||
sidebar_label: "3 Statement Model"
|
||||
description: "Build fully-integrated 3-statement models (IS, BS, CF) in Excel with working capital schedules, D&A roll-forwards, debt schedule, and the plugs that make cas..."
|
||||
---
|
||||
|
||||
{/* This page is auto-generated from the skill's SKILL.md by website/scripts/generate-skill-docs.py. Edit the source SKILL.md, not this page. */}
|
||||
|
||||
# 3 Statement Model
|
||||
|
||||
Build fully-integrated 3-statement models (IS, BS, CF) in Excel with working capital schedules, D&A roll-forwards, debt schedule, and the plugs that make cash and retained earnings tie. Pairs with excel-author.
|
||||
|
||||
## Skill metadata
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| Source | Optional — install with `hermes skills install official/finance/3-statement-model` |
|
||||
| Path | `optional-skills/finance/3-statement-model` |
|
||||
| Version | `1.0.0` |
|
||||
| Author | Anthropic (adapted by Nous Research) |
|
||||
| License | Apache-2.0 |
|
||||
| Platforms | linux, macos, windows |
|
||||
| Tags | `finance`, `three-statement`, `income-statement`, `balance-sheet`, `cash-flow`, `excel`, `openpyxl`, `modeling` |
|
||||
| Related skills | [`excel-author`](/docs/user-guide/skills/optional/finance/finance-excel-author), [`pptx-author`](/docs/user-guide/skills/optional/finance/finance-pptx-author), [`dcf-model`](/docs/user-guide/skills/optional/finance/finance-dcf-model), [`lbo-model`](/docs/user-guide/skills/optional/finance/finance-lbo-model) |
|
||||
|
||||
## Reference: full SKILL.md
|
||||
|
||||
:::info
|
||||
The following is the complete skill definition that Hermes loads when this skill is triggered. This is what the agent sees as instructions when the skill is active.
|
||||
:::
|
||||
|
||||
## Environment
|
||||
|
||||
This skill assumes **headless openpyxl** — you are producing an .xlsx file on disk.
|
||||
Follow the `excel-author` skill's conventions for cell coloring, formulas, named ranges, and sensitivity tables.
|
||||
Recalculate before delivery: `python /path/to/excel-author/scripts/recalc.py ./out/model.xlsx`.
|
||||
|
||||
# 3-Statement Financial Model Template Completion
|
||||
|
||||
Complete and populate integrated financial model templates with proper linkages between Income Statement, Balance Sheet, and Cash Flow Statement.
|
||||
|
||||
## ⚠️ CRITICAL PRINCIPLES — Read Before Populating Any Template
|
||||
|
||||
**Formulas over hardcodes (non-negotiable):**
|
||||
- Every projection cell, roll-forward, linkage, and subtotal MUST be an Excel formula — never a pre-computed value
|
||||
- When using Python/openpyxl: write formula strings (`ws["D15"] = "=D14*(1+Assumptions!$B$5)"`), NOT computed results (`ws["D15"] = 12500`)
|
||||
- The ONLY cells that should contain hardcoded numbers are: (1) historical actuals, (2) assumption drivers in the Assumptions tab
|
||||
- If you find yourself computing a value in Python and writing the result to a cell — STOP. Write the formula instead.
|
||||
- Why: the model must flex when scenarios toggle or assumptions change. Hardcodes break every downstream integrity check silently.
|
||||
|
||||
**Verify step-by-step with the user:**
|
||||
1. **After mapping the template** → show the user which tabs/sections you've identified and confirm before touching any cells
|
||||
2. **After populating historicals** → show the user the historical block and confirm values/periods match source data
|
||||
3. **After building IS projections** → run the subtotal checks, show the user the projected IS, confirm before moving to BS
|
||||
4. **After building BS** → show the user the balance check (Assets = L+E) for every period, confirm before moving to CF
|
||||
5. **After building CF** → show the user the cash tie-out (CF ending cash = BS cash), confirm before finalizing
|
||||
6. **Do NOT populate the entire model end-to-end and present it complete** — break at each statement, show the work, catch errors early
|
||||
|
||||
## Formatting — Professional Blue/Grey Palette (Default unless template/user specifies otherwise)
|
||||
|
||||
**Keep colors minimal.** Use only blues and greys for cell fills. Do NOT introduce greens, yellows, oranges, or multiple accent colors — a clean model uses restraint.
|
||||
|
||||
| Element | Fill | Font |
|
||||
|---|---|---|
|
||||
| Section headers (IS / BS / CF titles) | Dark blue `#1F4E79` | White bold |
|
||||
| Column headers (FY2024A, FY2025E, etc.) | Light blue `#D9E1F2` | Black bold |
|
||||
| Input cells (historicals, assumption drivers) | Light grey `#F2F2F2` or white | Blue `#0000FF` |
|
||||
| Formula cells | White | Black |
|
||||
| Cross-tab links | White | Green `#008000` |
|
||||
| Check rows / key totals | Medium blue `#BDD7EE` | Black bold |
|
||||
|
||||
**That's 3 blues + 1 grey + white.** If the template has its own color scheme, follow the template instead.
|
||||
|
||||
Font color signals *what* a cell is (input/formula/link). Fill color signals *where* you are (header/data/check).
|
||||
|
||||
## Model Structure
|
||||
|
||||
### Identifying Template Tab Organization
|
||||
|
||||
Templates vary in their tab naming conventions and organization. Before populating, review all tabs to understand the template's structure. Below are common tab names and their typical contents:
|
||||
|
||||
| Common Tab Names | Contents to Look For |
|
||||
|------------------|----------------------|
|
||||
| IS, P&L, Income Statement | Income Statement |
|
||||
| BS, Balance Sheet | Balance Sheet |
|
||||
| CF, CFS, Cash Flow | Cash Flow Statement |
|
||||
| WC, Working Capital | Working Capital Schedule |
|
||||
| DA, D&A, Depreciation, PP&E | Depreciation & Amortization Schedule |
|
||||
| Debt, Debt Schedule | Debt Schedule |
|
||||
| NOL, Tax, DTA | Net Operating Loss Schedule |
|
||||
| Assumptions, Inputs, Drivers | Driver assumptions and inputs |
|
||||
| Checks, Audit, Validation | Error-checking dashboard |
|
||||
|
||||
**Template Review Checklist**
|
||||
- Identify which tabs exist in the template (not all templates include every schedule)
|
||||
- Note any template-specific tabs not listed above
|
||||
- Understand tab dependencies (e.g., which schedules feed into the main statements)
|
||||
- Locate input cells vs. formula cells on each tab
|
||||
|
||||
### Understanding Template Structure
|
||||
|
||||
Before populating a template, familiarize yourself with its existing layout to ensure data is entered in the correct locations and formulas remain intact.
|
||||
|
||||
**Identifying Row Structure**
|
||||
- Locate the model title at top of each tab
|
||||
- Identify section headers and their visual separation
|
||||
- Find the units row indicating $ millions, %, x, etc.
|
||||
- Note column headers distinguishing Actuals vs. Estimates periods
|
||||
- Confirm period labels (e.g., FY2024A, FY2025E)
|
||||
- Identify input cells vs. formula cells (typically distinguished by font color)
|
||||
|
||||
**Identifying Column Structure**
|
||||
- Confirm line item labels in leftmost column
|
||||
- Verify historical years precede projection years
|
||||
- Note the visual border separating historical from projected periods
|
||||
- Check for consistent column order across all tabs
|
||||
|
||||
**Working with Named Ranges**
|
||||
Templates often use named ranges for key inputs and outputs. Before entering data:
|
||||
- Review existing named ranges in the template (Formulas → Name Manager in Excel)
|
||||
- Common named ranges include: Revenue growth rates, cost percentages, key outputs (Net Income, EBITDA, Total Debt, Cash), scenario selector cell
|
||||
- Ensure inputs are entered in cells that feed into these named ranges
|
||||
|
||||
### Projection Period
|
||||
- Templates typically project 5 years forward from last historical year
|
||||
- Verify historical (A) vs. projected (E) columns are clearly separated
|
||||
- Confirm columns use fiscal year notation (e.g., FY2024A, FY2025E)
|
||||
|
||||
## Margin Analysis
|
||||
|
||||
**Note: The following margin analysis should only be performed if prompted by the user or if the template explicitly requires it. If no prompt is given, skip this section.**
|
||||
|
||||
Calculate and display profitability margins on the Income Statement (IS) tab to track operational efficiency and enable peer comparison.
|
||||
|
||||
### Core Margins to Include
|
||||
|
||||
| Margin | Formula | What It Measures |
|
||||
|--------|---------|------------------|
|
||||
| Gross Margin | Gross Profit / Revenue | Pricing power, production efficiency |
|
||||
| EBITDA Margin | EBITDA / Revenue | Core operating profitability |
|
||||
| EBIT Margin | EBIT / Revenue | Operating profitability after D&A |
|
||||
| Net Income Margin | Net Income / Revenue | Bottom-line profitability |
|
||||
|
||||
### Income Statement Layout with Margins
|
||||
|
||||
Display margin percentages directly below each profit line item:
|
||||
- Gross Margin % below Gross Profit
|
||||
- EBIT Margin % below EBIT
|
||||
- EBITDA Margin % below EBITDA
|
||||
- Net Income Margin % below Net Income
|
||||
|
||||
## Credit Metrics
|
||||
|
||||
**Note: The following Credit analysis should only be performed if prompted by the user or if the template explicitly requires it. If no prompt is given, skip this section.**
|
||||
|
||||
Calculate and display credit/leverage metrics on the Balance Sheet (BS) tab to assess financial health, debt capacity, and covenant compliance.
|
||||
|
||||
### Core Credit Metrics to Include
|
||||
|
||||
| Metric | Formula | What It Measures |
|
||||
|--------|---------|------------------|
|
||||
| Total Debt / EBITDA | Total Debt / LTM EBITDA | Leverage multiple |
|
||||
| Net Debt / EBITDA | (Total Debt - Cash) / LTM EBITDA | Leverage net of cash |
|
||||
| Interest Coverage | EBITDA / Interest Expense | Ability to service debt |
|
||||
| Debt / Total Cap | Total Debt / (Total Debt + Equity) | Capital structure |
|
||||
| Debt / Equity | Total Debt / Total Equity | Financial leverage |
|
||||
| Current Ratio | Current Assets / Current Liabilities | Short-term liquidity |
|
||||
| Quick Ratio | (Current Assets - Inventory) / Current Liabilities | Immediate liquidity |
|
||||
|
||||
### Credit Metric Hierarchy Checks
|
||||
|
||||
Validate that Upside shows strongest credit profile:
|
||||
- Leverage: Upside < Base < Downside (lower is better)
|
||||
- Coverage: Upside > Base > Downside (higher is better)
|
||||
- Liquidity: Upside > Base > Downside (higher is better)
|
||||
|
||||
### Covenant Compliance Tracking
|
||||
|
||||
If debt covenants are known, add explicit compliance checks comparing actual metrics to covenant thresholds.
|
||||
|
||||
## Scenario Analysis (Base / Upside / Downside)
|
||||
|
||||
Use a scenario toggle (dropdown) in the Assumptions tab with CHOOSE or INDEX/MATCH formulas.
|
||||
|
||||
| Scenario | Description |
|
||||
|----------|-------------|
|
||||
| Base Case | Management guidance or consensus estimates |
|
||||
| Upside Case | Above-guidance growth, margin expansion |
|
||||
| Downside Case | Below-trend growth, margin compression |
|
||||
|
||||
**Key Drivers to Sensitize**: Revenue growth, Gross margin, SG&A %, DSO/DIO/DPO, CapEx %, Interest rate, Tax rate.
|
||||
|
||||
**Scenario Audit Checks**: Toggle switches all statements, BS balances in all scenarios, Cash ties out, Hierarchy holds (Upside > Base > Downside for NI, EBITDA, FCF, margins).
|
||||
|
||||
## SEC Filings Data Extraction
|
||||
|
||||
If the template specifically requires pulling data from SEC filings (10-K, 10-Q), see [references/sec-filings.md](https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/finance/3-statement-model/references/sec-filings.md) for detailed extraction guidance. This reference is only needed when populating templates with public company data from regulatory filings.
|
||||
|
||||
## Completing Model Templates
|
||||
|
||||
This section provides general guidance for completing any 3-statement financial model template while preserving existing formulas and ensuring data integrity.
|
||||
|
||||
### Step 1: Analyze the Template Structure
|
||||
|
||||
Before entering any data, thoroughly review the template to understand its architecture:
|
||||
|
||||
**Identify Input vs. Formula Cells**
|
||||
- Look for visual cues (font color, cell shading) that distinguish input cells from formula cells
|
||||
- Common conventions: Blue font = inputs, Black font = formulas, Green font = links to other sheets
|
||||
- Use Excel's Trace Precedents/Dependents (Formulas → Trace Precedents) to understand cell relationships
|
||||
- Check for named ranges that may control key inputs (Formulas → Name Manager)
|
||||
|
||||
**Map the Template's Flow**
|
||||
- Identify which tabs feed into others (e.g., Assumptions → IS → BS → CF)
|
||||
- Note any supporting schedules and their linkages to main statements
|
||||
- Document the template's specific line items and structure before populating
|
||||
|
||||
### Step 2: Filling in Data Without Breaking Formulas
|
||||
|
||||
**Golden Rules for Data Entry**
|
||||
|
||||
| Rule | Description |
|
||||
|------|-------------|
|
||||
| Only edit input cells | Never overwrite cells containing formulas unless intentionally replacing the formula |
|
||||
| Preserve cell references | When copying data, use Paste Values (Ctrl+Shift+V) to avoid overwriting formulas with source formatting |
|
||||
| Match the template's units | Verify if template uses thousands, millions, or actual values before entering data |
|
||||
| Respect sign conventions | Follow the template's existing sign convention (e.g., expenses as positive or negative) |
|
||||
| Check for circular references | If the template uses iterative calculations, ensure Enable Iterative Calculation is turned on |
|
||||
|
||||
**Safe Data Entry Process**
|
||||
1. Identify the exact cells designated for input (usually highlighted or labeled)
|
||||
2. Enter historical data first, then verify formulas are calculating correctly for those periods
|
||||
3. Enter assumption drivers that feed forecast calculations
|
||||
4. Review calculated outputs to confirm formulas are working as intended
|
||||
5. If a formula cell must be modified, document the original formula before making changes
|
||||
|
||||
**Handling Pre-Built Formulas**
|
||||
- If formulas reference cells you haven't populated yet, expect temporary errors (#REF!, #DIV/0!) until all inputs are complete
|
||||
- When formulas produce unexpected results, trace precedents to identify missing or incorrect inputs
|
||||
- Never delete rows/columns without checking for formula dependencies across all tabs
|
||||
|
||||
### Step 3: Validating Formulas
|
||||
|
||||
**Formula Integrity Checks**
|
||||
|
||||
Before relying on template outputs, validate that formulas are functioning correctly:
|
||||
|
||||
| Check Type | Method |
|
||||
|------------|--------|
|
||||
| Trace precedents | Select a formula cell → Formulas → Trace Precedents to verify it references correct inputs |
|
||||
| Trace dependents | Verify key inputs flow to expected output cells |
|
||||
| Evaluate formula | Use Formulas → Evaluate Formula to step through complex calculations |
|
||||
| Check for hardcodes | Projection formulas should reference assumptions, not contain hardcoded values |
|
||||
| Test with known values | Input simple test values to verify formulas produce expected results |
|
||||
| Cross-tab consistency | Ensure the same formula logic applies across all projection periods |
|
||||
|
||||
**Common Formula Issues to Watch For**
|
||||
- Mixed absolute/relative references causing incorrect results when copied across periods
|
||||
- Broken links to external files or deleted ranges (#REF! errors)
|
||||
- Division by zero in early periods before revenue ramps (#DIV/0! errors)
|
||||
- Circular reference warnings (may be intentional for interest calculations)
|
||||
- Inconsistent formulas across projection columns (use Ctrl+\ to find differences)
|
||||
|
||||
**Validating Cross-Tab Linkages**
|
||||
- Confirm values that appear on multiple tabs are linked (not duplicated)
|
||||
- Verify schedule totals tie to corresponding line items on main statements
|
||||
- Check that period labels align across all tabs
|
||||
|
||||
### Step 4: Quality Checks by Sheet
|
||||
|
||||
Perform these validation checks on each sheet after populating the template:
|
||||
|
||||
**Income Statement (IS) Quality Checks**
|
||||
- Revenue figures match source data for historical periods
|
||||
- All expense line items sum to reported totals
|
||||
- Subtotals (Gross Profit, EBIT, EBT, Net Income) calculate correctly
|
||||
- Tax calculation logic is appropriate (handles losses correctly)
|
||||
- Forecast drivers reference assumptions tab (no hardcodes)
|
||||
- Period-over-period changes are directionally reasonable
|
||||
|
||||
**Balance Sheet (BS) Quality Checks**
|
||||
- Assets = Liabilities + Equity for every period (primary check)
|
||||
- Cash balance matches Cash Flow Statement ending cash
|
||||
- Working capital accounts tie to supporting schedules (if applicable)
|
||||
- Retained Earnings rolls forward correctly: Prior RE + Net Income - Dividends +/- Adjustments = Ending RE
|
||||
- Debt balances tie to debt schedule (if applicable)
|
||||
- All balance sheet items have appropriate signs (assets positive, most liabilities positive)
|
||||
|
||||
**Cash Flow Statement (CF) Quality Checks**
|
||||
- Net Income at top of CFO matches Income Statement Net Income
|
||||
- Non-cash add-backs (D&A, SBC, etc.) tie to their source schedules/statements
|
||||
- Working capital changes have correct signs (increase in asset = use of cash = negative)
|
||||
- CapEx ties to PP&E schedule or fixed asset roll-forward
|
||||
- Financing activities tie to changes in debt and equity accounts on BS
|
||||
- Ending Cash matches Balance Sheet Cash
|
||||
- Beginning Cash equals prior period Ending Cash
|
||||
|
||||
**Supporting Schedule Quality Checks**
|
||||
- Opening balances equal prior period closing balances
|
||||
- Roll-forward logic is complete (Beginning + Additions - Deductions = Ending)
|
||||
- Schedule totals tie to main statement line items
|
||||
- Assumptions used in calculations match Assumptions tab
|
||||
|
||||
### Step 5: Cross-Statement Integrity Checks
|
||||
|
||||
After validating individual sheets, confirm the three statements are properly integrated:
|
||||
|
||||
| Check | Formula | Expected Result |
|
||||
|-------|---------|-----------------|
|
||||
| Balance Sheet Balance | Assets - Liabilities - Equity | = 0 |
|
||||
| Cash Tie-Out | CF Ending Cash - BS Cash | = 0 |
|
||||
| Net Income Link | IS Net Income - CF Starting Net Income | = 0 |
|
||||
| Retained Earnings | Prior RE + NI - Dividends - BS Ending RE | = 0 (adjust for SBC/other items as needed) |
|
||||
|
||||
### Step 6: Final Review
|
||||
|
||||
Before considering the model complete:
|
||||
- Toggle through all scenarios (if applicable) to verify checks pass in each case
|
||||
- Review all #REF!, #DIV/0!, #VALUE!, and #NAME? errors and resolve or document
|
||||
- Confirm all input cells have been populated (search for placeholder values)
|
||||
- Verify units are consistent across all tabs
|
||||
- Save a clean version before making any additional modifications
|
||||
|
||||
## Model Validation and Audit
|
||||
|
||||
This section consolidates all validation checks and audit procedures for completed templates.
|
||||
|
||||
### Core Linkages (Must Always Hold)
|
||||
|
||||
See [references/formulas.md](https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/finance/3-statement-model/references/formulas.md) for all formula details.
|
||||
|
||||
| Check | Formula | Expected Result |
|
||||
|-------|---------|-----------------|
|
||||
| Balance Sheet Balance | Assets - Liabilities - Equity | = 0 |
|
||||
| Cash Tie-Out | CF Ending Cash - BS Cash | = 0 |
|
||||
| Cash Monthly vs Annual | Closing Cash (Monthly) - Closing Cash (Annual) | = 0 |
|
||||
| Net Income Link | IS Net Income - CF Starting Net Income | = 0 |
|
||||
| Retained Earnings | Prior RE + NI + SBC - Dividends - BS Ending RE | = 0 |
|
||||
| Equity Financing | ΔCommon Stock/APIC (BS) - Equity Issuance (CFF) | = 0 |
|
||||
| Year 0 Equity | Equity Raised (Year 0) - Beginning Equity Capital (Year 1) | = 0 |
|
||||
|
||||
### Sign Convention Reference
|
||||
|
||||
| Statement | Item | Sign Convention |
|
||||
|-----------|------|-----------------|
|
||||
| CFO | D&A, SBC | Positive (add-back) |
|
||||
| CFO | ΔAR (increase) | Negative (use of cash) |
|
||||
| CFO | ΔAP (increase) | Positive (source of cash) |
|
||||
| CFI | CapEx | Negative |
|
||||
| CFF | Debt issuance | Positive |
|
||||
| CFF | Debt repayments | Negative |
|
||||
| CFF | Dividends | Negative |
|
||||
|
||||
### Circular Reference Handling
|
||||
|
||||
Interest expense creates circularity: Interest → Net Income → Cash → Debt Balance → Interest
|
||||
|
||||
Enable iterative calculation in Excel: File → Options → Formulas → Enable iterative calculation. Set maximum iterations to 100, maximum change to 0.001. Add a circuit breaker toggle in Assumptions tab.
|
||||
|
||||
### Check Categories
|
||||
|
||||
**Section 1: Currency Consistency**
|
||||
- Currency identified and documented in Assumptions
|
||||
- All tabs use consistent currency symbol and scale
|
||||
- Units row matches model currency
|
||||
|
||||
**Section 2: Balance Sheet Integrity**
|
||||
- Assets = Liabilities + Equity (for each period)
|
||||
- Formula: Assets - Liabilities - Equity (must = 0)
|
||||
|
||||
**Section 3: Cash Flow Integrity**
|
||||
- Cash ties to BS (CF Ending Cash = BS Cash)
|
||||
- Cash Monthly vs Annual: Closing Cash (Monthly) = Closing Cash (Annual)
|
||||
- NI ties to IS (CF Net Income = IS Net Income)
|
||||
- D&A ties to schedule
|
||||
- SBC ties to IS
|
||||
- ΔAR, ΔInventory, ΔAP tie to WC schedule
|
||||
- CapEx ties to DA schedule
|
||||
|
||||
**Section 4: Retained Earnings**
|
||||
- RE roll-forward check: Prior RE + NI + SBC - Dividends = Ending RE
|
||||
- Show component breakdown for debugging
|
||||
|
||||
**Section 5: Working Capital**
|
||||
- AR, Inventory, AP tie to BS
|
||||
- DSO, DIO, DPO reasonability checks (flag if outside normal ranges)
|
||||
|
||||
**Section 6: Debt Schedule**
|
||||
- Total Debt ties to BS (Current + LT Debt)
|
||||
- Interest calculation ties to IS
|
||||
|
||||
**Section 6b: Equity Financing**
|
||||
- Equity issuance proceeds tie to BS Common Stock/APIC increase
|
||||
- Cash increase from equity = Equity account increase (must balance)
|
||||
- Equity Raise Tie-Out: ΔCommon Stock/APIC (BS) = Equity Issuance (CFF) (must = 0)
|
||||
- Year 0 Equity Tie-Out: Equity Raised (Year 0) = Beginning Equity Capital (Year 1)
|
||||
|
||||
**Section 6c: NOL Schedule**
|
||||
- Beginning NOL (Year 1 / Formation) = 0 (new business starts with zero NOL)
|
||||
- NOL increases only when EBT < 0 (losses must be realized to generate NOL)
|
||||
- DTA ties to BS (NOL Schedule DTA = BS Deferred Tax Asset)
|
||||
- NOL utilization ≤ 80% of EBT (post-2017 federal limitation)
|
||||
- NOL balance is non-negative (cannot utilize more than available)
|
||||
- NOL generated only when EBT < 0
|
||||
- Tax expense = 0 when taxable income ≤ 0
|
||||
|
||||
**Section 7: Scenario Hierarchy**
|
||||
- Absolute metrics: Upside > Base > Downside (NI, EBITDA, FCF)
|
||||
- Margins: Upside > Base > Downside (GM%, EBITDA%, NI%)
|
||||
- Credit metrics: Upside < Base < Downside for leverage (inverted)
|
||||
|
||||
**Section 8: Formula Integrity**
|
||||
- COGS, S&M, G&A, R&D, SBC driven by % of Revenue (no hardcodes)
|
||||
- Consistent formulas across projection years
|
||||
- No #REF!, #DIV/0!, #VALUE! errors
|
||||
|
||||
**Section 9: Credit Metric Thresholds**
|
||||
- Flag metrics as Green/Yellow/Red based on covenant thresholds
|
||||
- Summary of any red flags
|
||||
|
||||
### Master Check Formula
|
||||
|
||||
Aggregate all section statuses into a single master check:
|
||||
- If all sections pass → "✓ ALL CHECKS PASS"
|
||||
- If any section fails → "✗ ERRORS DETECTED - REVIEW BELOW"
|
||||
|
||||
### Quick Debug Workflow
|
||||
|
||||
When Master Status shows errors:
|
||||
1. Scroll to find red-highlighted sections
|
||||
2. Identify which check category has failures
|
||||
3. Navigate to source tab to investigate
|
||||
4. Fix the underlying issue
|
||||
5. Return to Checks tab to verify resolution
|
||||
|
||||
|
||||
## Data sources — MCP first, web fallback
|
||||
|
||||
Many passages below say "use the S&P Kensho MCP / Daloopa MCP / FactSet MCP". Those are commercial financial-data MCPs from the original Cowork plugin context. In Hermes:
|
||||
|
||||
- **If you have any structured financial-data MCP configured** (Hermes supports MCP — see `native-mcp` skill), prefer it for point-in-time comps, precedent transactions, and filings.
|
||||
- **Otherwise**, fall back to:
|
||||
- `web_search` / `web_extract` against SEC EDGAR (`https://www.sec.gov/cgi-bin/browse-edgar`) for US filings
|
||||
- Company IR pages for press releases, earnings decks
|
||||
- `browser_navigate` for interactive data portals
|
||||
- User-provided data (explicitly ask when the context doesn't have it)
|
||||
- **Never fabricate**. If a multiple, precedent, or filing number can't be sourced, flag the cell as `[UNSOURCED]` and surface it to the user.
|
||||
|
||||
## Attribution
|
||||
|
||||
This skill is adapted from Anthropic's Claude for Financial Services plugin suite (Apache-2.0). The Office-JS / Cowork live-Excel paths have been removed; this version targets headless openpyxl via the `excel-author` skill's conventions. Original: https://github.com/anthropics/financial-services
|
||||
|
|
@ -0,0 +1,682 @@
|
|||
---
|
||||
title: "Comps Analysis"
|
||||
sidebar_label: "Comps Analysis"
|
||||
description: "Build comparable company analysis in Excel — operating metrics, valuation multiples, statistical benchmarking vs peer sets"
|
||||
---
|
||||
|
||||
{/* This page is auto-generated from the skill's SKILL.md by website/scripts/generate-skill-docs.py. Edit the source SKILL.md, not this page. */}
|
||||
|
||||
# Comps Analysis
|
||||
|
||||
Build comparable company analysis in Excel — operating metrics, valuation multiples, statistical benchmarking vs peer sets. Pairs with excel-author. Use for public-company valuation, IPO pricing, sector benchmarking, or outlier detection.
|
||||
|
||||
## Skill metadata
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| Source | Optional — install with `hermes skills install official/finance/comps-analysis` |
|
||||
| Path | `optional-skills/finance/comps-analysis` |
|
||||
| Version | `1.0.0` |
|
||||
| Author | Anthropic (adapted by Nous Research) |
|
||||
| License | Apache-2.0 |
|
||||
| Platforms | linux, macos, windows |
|
||||
| Tags | `finance`, `valuation`, `comps`, `excel`, `openpyxl`, `modeling`, `investment-banking` |
|
||||
| Related skills | [`excel-author`](/docs/user-guide/skills/optional/finance/finance-excel-author), [`pptx-author`](/docs/user-guide/skills/optional/finance/finance-pptx-author), [`dcf-model`](/docs/user-guide/skills/optional/finance/finance-dcf-model), [`lbo-model`](/docs/user-guide/skills/optional/finance/finance-lbo-model) |
|
||||
|
||||
## Reference: full SKILL.md
|
||||
|
||||
:::info
|
||||
The following is the complete skill definition that Hermes loads when this skill is triggered. This is what the agent sees as instructions when the skill is active.
|
||||
:::
|
||||
|
||||
## Environment
|
||||
|
||||
This skill assumes **headless openpyxl** — you are producing an .xlsx file on disk.
|
||||
Follow the `excel-author` skill's conventions for cell coloring, formulas, named ranges, and sensitivity tables.
|
||||
Recalculate before delivery: `python /path/to/excel-author/scripts/recalc.py ./out/model.xlsx`.
|
||||
|
||||
# Comparable Company Analysis
|
||||
|
||||
## ⚠️ CRITICAL: Data Source Priority (READ FIRST)
|
||||
|
||||
**ALWAYS follow this data source hierarchy:**
|
||||
|
||||
1. **FIRST: Check for MCP data sources** - If S&P Kensho MCP, FactSet MCP, or Daloopa MCP are available, use them exclusively for financial and trading information
|
||||
2. **DO NOT use web search** if the above MCP data sources are available
|
||||
3. **ONLY if MCPs are unavailable:** Then use Bloomberg Terminal, SEC EDGAR filings, or other institutional sources
|
||||
4. **NEVER use web search as a primary data source** - it lacks the accuracy, audit trails, and reliability required for institutional-grade analysis
|
||||
|
||||
**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.
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
This skill teaches the agent 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:**
|
||||
- Understanding structural hierarchy (how sections flow)
|
||||
- Grasping the level of rigor expected (statistical depth, documentation standards)
|
||||
- Learning principles (clear headers, transparent formulas, audit trails)
|
||||
|
||||
**DO NOT use examples for:**
|
||||
- Exact reproduction of format or metrics
|
||||
- Copying layout without considering context
|
||||
- Applying the same visual style regardless of audience
|
||||
|
||||
**ALWAYS ask yourself first:**
|
||||
1. **"Do you have a preferred format or should I adapt the template style?"**
|
||||
2. **"Who is the audience?"** (Investment committee, board presentation, quick reference, detailed memo)
|
||||
3. **"What's the key question?"** (Valuation, growth analysis, competitive positioning, efficiency)
|
||||
4. **"What's the context?"** (M&A evaluation, investment decision, sector benchmarking, performance review)
|
||||
|
||||
**Adapt based on specifics:**
|
||||
- **Industry context**: Big tech mega-caps need different metrics than emerging SaaS startups
|
||||
- **Sector-specific needs**: Add relevant metrics early (e.g., cloud ARR, enterprise customers, developer ecosystem for tech)
|
||||
- **Company familiarity**: Well-known companies may need less background, more focus on delta analysis
|
||||
- **Decision type**: M&A requires different emphasis than ongoing portfolio monitoring
|
||||
|
||||
**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.
|
||||
|
||||
## Core Philosophy
|
||||
**"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.
|
||||
|
||||
---
|
||||
|
||||
## ⚠️ CRITICAL: Formulas Over Hardcodes + Step-by-Step Verification
|
||||
|
||||
**Formulas, not hardcodes:**
|
||||
- Every derived value (margin, multiple, statistic) MUST be an Excel formula referencing input cells — never a pre-computed number pasted in
|
||||
- When using Python/openpyxl to build the sheet: write `cell.value = "=E7/C7"` (formula string), NOT `cell.value = 0.687` (computed result)
|
||||
- The only hardcoded values should be raw input data (revenue, EBITDA, share price, etc.) — and every one of those gets a cell comment with its source
|
||||
- Why: the model must update automatically when an input changes. A hardcoded margin is a silent bug waiting to happen.
|
||||
|
||||
**Verify step-by-step with the user:**
|
||||
- After setting up the structure → show the user the header layout before filling data
|
||||
- After entering raw inputs → show the user the input block and confirm sources/periods before building formulas
|
||||
- After building operating metrics formulas → show the calculated margins and sanity-check with the user before moving to valuation
|
||||
- After building valuation multiples → show the multiples and confirm they look reasonable before adding statistics
|
||||
- Do NOT build the entire sheet end-to-end and then present it — catch errors early by confirming each section
|
||||
|
||||
---
|
||||
|
||||
## Section 1: Document Structure & Setup
|
||||
|
||||
### Header Block (Rows 1-3)
|
||||
```
|
||||
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.
|
||||
|
||||
### Visual Convention Standards (OPTIONAL - User preferences and uploaded templates always override)
|
||||
|
||||
**IMPORTANT: These are suggested defaults only. Always prioritize:**
|
||||
1. User's explicit formatting preferences
|
||||
2. Formatting from any uploaded template files
|
||||
3. Company/team style guides
|
||||
4. These defaults (only if no other guidance provided)
|
||||
|
||||
**Suggested Font & Typography:**
|
||||
- **Font family**: Times New Roman (professional, readable, industry standard)
|
||||
- **Font size**: 11pt for data cells, 12pt for headers
|
||||
- **Bold text**: Section headers, company names, statistic labels
|
||||
|
||||
**Default Color & Shading — Professional Blue/Grey Palette (minimal is better):**
|
||||
- **Keep it restrained** — only blues and greys. Do NOT introduce greens, oranges, reds, or multiple accent colors. A clean comps sheet uses 3-4 colors total.
|
||||
- **Section headers** (e.g., "OPERATING STATISTICS & FINANCIAL METRICS"):
|
||||
- Dark blue background (`#1F4E79` or `#17365D` navy)
|
||||
- White bold text
|
||||
- Full row shading across all columns
|
||||
- **Column headers** (e.g., "Company", "Revenue", "Margin"):
|
||||
- Light blue background (`#D9E1F2` or similar pale blue)
|
||||
- Black bold text
|
||||
- Centered alignment
|
||||
- **Data rows**:
|
||||
- White background for company data
|
||||
- Black text for formulas; blue text for hardcoded inputs
|
||||
- **Statistics rows** (Maximum, 75th Percentile, etc.):
|
||||
- Light grey background (`#F2F2F2`)
|
||||
- Black text, left-aligned labels
|
||||
- **That's the whole palette**: dark blue + light blue + light grey + white. Nothing else unless the user's template says otherwise.
|
||||
|
||||
**Suggested Formatting Conventions:**
|
||||
- **Decimal precision**:
|
||||
- Percentages: 1 decimal (12.3%)
|
||||
- Multiples: 1 decimal (13.5x)
|
||||
- Dollar amounts: No decimals, thousands separator (69,632)
|
||||
- Margins shown as percentages: 1 decimal (68.7%)
|
||||
- **Borders**: No borders (clean, minimal appearance)
|
||||
- **Alignment**: All metrics center-aligned for clean, uniform appearance
|
||||
- **Cell dimensions**: All column widths should be uniform/even, all row heights should be consistent (creates clean, professional grid)
|
||||
|
||||
**Note:** If the user provides a template file or specifies different formatting, use that instead.
|
||||
|
||||
---
|
||||
|
||||
## Section 2: Operating Statistics & Financial Metrics
|
||||
|
||||
### Core Columns (Start with these)
|
||||
1. **Company** - Names with consistent formatting
|
||||
2. **Revenue** - Size metric (can be LTM, quarterly, or annual depending on context)
|
||||
3. **Revenue Growth** - Year-over-year percentage change
|
||||
4. **Gross Profit** - Revenue minus cost of goods sold
|
||||
5. **Gross Margin** - GP/Revenue (fundamental profitability)
|
||||
6. **EBITDA** - Earnings before interest, tax, depreciation, amortization
|
||||
7. **EBITDA Margin** - EBITDA/Revenue (operating efficiency)
|
||||
|
||||
### Optional Additions (Choose based on industry/purpose)
|
||||
- **Quarterly vs LTM** - Include both if seasonality matters
|
||||
- **Free Cash Flow** - For capital-intensive or SaaS businesses
|
||||
- **FCF Margin** - FCF/Revenue (cash generation efficiency)
|
||||
- **Net Income** - For mature, profitable companies
|
||||
- **Operating Income** - For businesses with varying D&A
|
||||
- **CapEx metrics** - For asset-heavy industries
|
||||
- **Rule of 40** - Specifically for SaaS (Growth % + Margin %)
|
||||
- **FCF Conversion** - For quality of earnings analysis (advanced)
|
||||
|
||||
### Formula Examples (Using Row 7 as example)
|
||||
```excel
|
||||
// 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.
|
||||
|
||||
### Statistics Block (After company data)
|
||||
|
||||
**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):**
|
||||
- Revenue Growth %, Gross Margin %, EBITDA Margin %, EPS
|
||||
- EV/Revenue, EV/EBITDA, P/E, Dividend Yield %, Beta
|
||||
|
||||
**Columns that DON'T need statistics (size metrics):**
|
||||
- Revenue, EBITDA, Net Income (absolute size varies by company scale)
|
||||
- Market Cap, Enterprise Value (not comparable across different-sized companies)
|
||||
|
||||
**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.
|
||||
|
||||
---
|
||||
|
||||
## Section 3: Valuation Multiples & Investment Metrics
|
||||
|
||||
### Core Valuation Columns (Start with these)
|
||||
1. **Company** - Same order as operating section
|
||||
2. **Market Cap** - Current market valuation
|
||||
3. **Enterprise Value** - Market Cap ± Net Debt/Cash
|
||||
4. **EV/Revenue** - How much market pays per dollar of sales
|
||||
5. **EV/EBITDA** - How much market pays per dollar of earnings
|
||||
6. **P/E Ratio** - Price relative to net earnings
|
||||
|
||||
### Optional Valuation Metrics (Choose based on context)
|
||||
- **FCF Yield** - FCF/Market Cap (for cash-focused analysis)
|
||||
- **PEG Ratio** - P/E/Growth Rate (for growth companies)
|
||||
- **Price/Book** - Market value vs. book value (for asset-heavy businesses)
|
||||
- **ROE/ROA** - Return metrics (for profitability comparison)
|
||||
- **Revenue/EBITDA CAGR** - Historical growth rates (for trend analysis)
|
||||
- **Asset Turnover** - Revenue/Assets (for operational efficiency)
|
||||
- **Debt/Equity** - Leverage (for capital structure analysis)
|
||||
|
||||
**Key Principle:** Include 3-5 core multiples that matter for your industry. Don't include every possible metric just because you can.
|
||||
|
||||
### Formula Examples
|
||||
```excel
|
||||
// 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 %]
|
||||
```
|
||||
|
||||
### Cross-Reference Rule
|
||||
**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.
|
||||
|
||||
### Statistics Block
|
||||
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.
|
||||
|
||||
---
|
||||
|
||||
## Section 4: Notes & Methodology Documentation
|
||||
|
||||
### Required Components
|
||||
|
||||
**Data Sources & Quality:**
|
||||
- Where did the data come from? (S&P Kensho MCP, FactSet MCP, Daloopa MCP, Bloomberg, SEC filings)
|
||||
- What period does it cover? (Q4 2024, audited figures)
|
||||
- How was it verified? (Cross-checked against 10-K/10-Q)
|
||||
- Note: Prioritize MCP data sources (S&P Kensho, FactSet, Daloopa) if available for better accuracy and traceability
|
||||
|
||||
**Key Definitions:**
|
||||
- EBITDA calculation method (Gross Profit + D&A, or Operating Income + D&A)
|
||||
- Free Cash Flow formula (Operating CF - CapEx)
|
||||
- Special metrics explained (Rule of 40, FCF Conversion)
|
||||
- Time period definitions (LTM, CAGR calculation periods)
|
||||
|
||||
**Valuation Methodology:**
|
||||
- How was Enterprise Value calculated? (Market Cap + Net Debt)
|
||||
- What growth rates were used? (Historical CAGR, forward estimates)
|
||||
- Any adjustments made? (One-time items excluded, normalized margins)
|
||||
|
||||
**Analysis Framework:**
|
||||
- What's the investment thesis? (Cloud/SaaS efficiency)
|
||||
- What metrics matter most? (Cash generation, capital efficiency)
|
||||
- How should readers interpret the statistics? (Quartiles provide context)
|
||||
|
||||
---
|
||||
|
||||
## Section 5: Choosing the Right Metrics (Decision Framework)
|
||||
|
||||
### Start with "What question am I answering?"
|
||||
|
||||
**"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
|
||||
|
||||
### Industry-Specific Metric Selection
|
||||
|
||||
**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
|
||||
|
||||
### The "5-10 Rule"
|
||||
|
||||
**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.
|
||||
|
||||
---
|
||||
|
||||
## Section 6: Best Practices & Quality Checks
|
||||
|
||||
### Before You Start
|
||||
1. **Define the peer group** - Companies must be truly comparable (similar business model, scale, geography)
|
||||
2. **Choose the right period** - LTM smooths seasonality; quarterly shows trends
|
||||
3. **Standardize units upfront** - Millions vs. billions decision affects everything
|
||||
4. **Map data sources** - Know where each number comes from
|
||||
|
||||
### As You Build
|
||||
1. **Input all raw data first** - Complete the blue text before writing formulas
|
||||
2. **Add cell comments to ALL hard-coded inputs** - Right-click cell → Insert Comment → Document source OR assumption
|
||||
|
||||
**For sourced data, cite exactly where it came from:**
|
||||
- Example: "Bloomberg Terminal - MSFT Equity DES, accessed 2024-10-02"
|
||||
- Example: "Q4 2024 10-K filing, page 42, line item 'Total Revenue'"
|
||||
- Example: "FactSet consensus estimate as of 2024-10-02"
|
||||
- **Include hyperlinks when possible**: Right-click cell → Link → paste URL to SEC filing, data source, or report
|
||||
|
||||
**For assumptions, explain the reasoning:**
|
||||
- Example: "Assumed 15% EBITDA margin based on peer median, company does not disclose"
|
||||
- Example: "Estimated Enterprise Value as Market Cap + $50M net debt (from Q3 balance sheet, Q4 not yet available)"
|
||||
- Example: "Forward P/E based on street consensus EPS of $3.45 (average of 12 analyst estimates)"
|
||||
|
||||
**Why this matters**: Enables audit trails, data verification, assumption transparency, and future updates
|
||||
3. **Build formulas row by row** - Test each calculation before moving on
|
||||
4. **Use absolute references for headers** - $C$6 locks the header row
|
||||
5. **Format consistently** - Percentages as percentages, not decimals
|
||||
6. **Add conditional formatting** - Highlight outliers automatically
|
||||
|
||||
### Sanity Checks
|
||||
- **Margin test**: Gross margin > EBITDA margin > Net margin (always true by definition)
|
||||
- **Multiple reasonableness**:
|
||||
- EV/Revenue: typically 0.5-20x (varies widely by industry)
|
||||
- EV/EBITDA: typically 8-25x (fairly consistent across industries)
|
||||
- P/E: typically 10-50x (depends on growth rate)
|
||||
- **Growth-multiple correlation**: Higher growth usually means higher multiples
|
||||
- **Size-efficiency trade-off**: Larger companies often have better margins (scale benefits)
|
||||
|
||||
### Common Mistakes to Avoid
|
||||
❌ 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)
|
||||
|
||||
---
|
||||
|
||||
## Section 6: Advanced Features
|
||||
|
||||
### Dynamic Headers
|
||||
For columns showing calculations, use clear unit labels:
|
||||
```
|
||||
Revenue Growth (YoY) % | EBITDA Margin | FCF Margin | Rule of 40
|
||||
```
|
||||
|
||||
### Quartile Analysis Benefits
|
||||
Instead of just mean/median, quartiles show:
|
||||
- **75th percentile** = "Premium" companies trade here
|
||||
- **Median** = Typical market valuation
|
||||
- **25th percentile** = "Discount" territory
|
||||
|
||||
This helps answer: "Is our target company trading rich or cheap vs. peers?"
|
||||
|
||||
### Industry-Specific Modifications
|
||||
|
||||
**Software/SaaS:**
|
||||
- Add: ARR, Net Dollar Retention, CAC Payback Period
|
||||
- Emphasize: Rule of 40, FCF margins, gross margins >70%
|
||||
|
||||
**Healthcare:**
|
||||
- Add: R&D/Revenue, Pipeline value, Regulatory status
|
||||
- Emphasize: EBITDA margins, growth rates, reimbursement risk
|
||||
|
||||
**Industrials:**
|
||||
- Add: Backlog, Order book trends, Geographic mix
|
||||
- Emphasize: ROIC, asset turnover, cyclical adjustments
|
||||
|
||||
**Consumer:**
|
||||
- Add: Same-store sales, Customer acquisition cost, Brand value
|
||||
- Emphasize: Revenue growth, gross margins, inventory turns
|
||||
|
||||
---
|
||||
|
||||
## Section 7: Workflow & Practical Tips
|
||||
|
||||
### Step-by-Step Process
|
||||
1. **Set up structure** (30 minutes)
|
||||
- Create all headers
|
||||
- Format cells (blue for inputs, black for formulas)
|
||||
- Lock in units and date references
|
||||
|
||||
2. **Gather data** (60-90 minutes)
|
||||
- Pull from primary sources (S&P Kensho MCP, FactSet MCP, Daloopa MCP if available; otherwise Bloomberg, SEC)
|
||||
- Input all raw numbers in blue
|
||||
- Document sources in notes section
|
||||
|
||||
3. **Build formulas** (30 minutes)
|
||||
- Start with simple ratios (margins)
|
||||
- Progress to multiples (EV/Revenue)
|
||||
- Add cross-checks (do margins make sense?)
|
||||
|
||||
4. **Add statistics** (15 minutes)
|
||||
- Copy formula structure for all columns
|
||||
- Verify ranges are correct (B7:B9, not B7:B10)
|
||||
- Check quartile logic
|
||||
|
||||
5. **Quality control** (30 minutes)
|
||||
- Run sanity checks
|
||||
- Verify formula references
|
||||
- Check for #DIV/0! or #REF! errors
|
||||
- Compare against known benchmarks
|
||||
|
||||
6. **Documentation** (15 minutes)
|
||||
- Complete notes section
|
||||
- Add data sources
|
||||
- Define methodologies
|
||||
- Date-stamp the analysis
|
||||
|
||||
### Pro Tips
|
||||
- **Save templates**: Build once, reuse forever
|
||||
- **Color-code outliers**: Conditional formatting for values >2 standard deviations
|
||||
- **Link to source files**: Hyperlink to Bloomberg screenshots or SEC filings
|
||||
- **Version control**: Save as "Comps_v1_2024-12-15" with clear dating
|
||||
- **Collaborative reviews**: Have someone else check your formulas
|
||||
|
||||
### Excel Formatting Checklist (Optional - adapt to user preferences)
|
||||
- [ ] Font set to user's preferred style (default: Times New Roman, 11pt data, 12pt headers)
|
||||
- [ ] Section headers formatted per user's template (default: dark blue #17365D with white bold text)
|
||||
- [ ] Column headers formatted per user's template (default: light blue/gray #D9E2F3 with black bold text)
|
||||
- [ ] Statistics rows formatted per user's template (default: light gray #F2F2F2)
|
||||
- [ ] No borders applied (clean, minimal appearance)
|
||||
- [ ] **Column widths set to uniform/even width** (creates clean, professional appearance)
|
||||
- [ ] **Row heights set to consistent height** (typically 20-25pt for data rows)
|
||||
- [ ] Numbers formatted with proper decimal precision and thousands separators
|
||||
- [ ] **All metrics center-aligned** for clean, uniform appearance
|
||||
- [ ] **One blank row for separation between company data and statistics rows**
|
||||
- [ ] **No separate "SECTOR STATISTICS" or "VALUATION STATISTICS" header rows**
|
||||
- [ ] **Every hard-coded input cell has a comment with either: (1) exact data source, OR (2) assumption explanation**
|
||||
- [ ] **Hyperlinks added to cells where applicable** (SEC filings, data provider pages, reports)
|
||||
|
||||
---
|
||||
|
||||
## Section 8: Example Template Layout
|
||||
|
||||
**Simple Version (Start here):**
|
||||
<!-- ascii-guard-ignore -->
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────┐
|
||||
│ 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│
|
||||
└──────────┴──────────┴──────────┴──────────┴───────────┴────┘
|
||||
```
|
||||
<!-- ascii-guard-ignore-end -->
|
||||
|
||||
**Add complexity only when needed:**
|
||||
- Include quarterly AND LTM if seasonality matters
|
||||
- Add FCF metrics if cash generation is key story
|
||||
- Include industry-specific metrics (Rule of 40 for SaaS, etc.)
|
||||
- Add more statistics rows if you have >5 companies
|
||||
|
||||
---
|
||||
|
||||
## Section 9: Industry-Specific Additions (Optional)
|
||||
|
||||
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
|
||||
|
||||
---
|
||||
|
||||
## Section 10: Red Flags & Warning Signs
|
||||
|
||||
### Data Quality Issues
|
||||
🚩 Inconsistent time periods (mixing quarterly and annual)
|
||||
🚩 Missing data without explanation
|
||||
🚩 Significant differences between data sources (>10% variance)
|
||||
|
||||
### Valuation Red Flags
|
||||
🚩 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
|
||||
|
||||
### Comparability Issues
|
||||
🚩 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.
|
||||
|
||||
---
|
||||
|
||||
## Section 11: Formulas Reference Guide
|
||||
|
||||
### Essential Excel Formulas
|
||||
```excel
|
||||
// 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
|
||||
```
|
||||
|
||||
### Common Ratio Formulas
|
||||
```excel
|
||||
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
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Key Principles Summary
|
||||
|
||||
1. **Structure drives insight** - Right headers force right thinking
|
||||
2. **Less is more** - 5-10 metrics that matter beat 20 that don't
|
||||
3. **Choose metrics for your question** - Valuation analysis ≠ efficiency analysis
|
||||
4. **Statistics show patterns** - Median/quartiles reveal more than average
|
||||
5. **Transparency beats complexity** - Simple formulas everyone understands
|
||||
6. **Comparability is king** - Better to exclude than force a bad comp
|
||||
7. **Document your choices** - Explain which metrics and why in notes section
|
||||
|
||||
---
|
||||
|
||||
## Output Checklist
|
||||
|
||||
Before delivering a comp analysis, verify:
|
||||
- [ ] All companies are truly comparable
|
||||
- [ ] Data is from consistent time periods
|
||||
- [ ] Units are clearly labeled (millions/billions)
|
||||
- [ ] Formulas reference cells, not hardcoded values
|
||||
- [ ] **All hard-coded input cells have comments with either: (1) exact data source with citation, OR (2) clear assumption with explanation**
|
||||
- [ ] **Hyperlinks added where relevant** (SEC EDGAR filings, Bloomberg pages, research reports)
|
||||
- [ ] Statistics include at least 5 metrics (Max, 75th, Med, 25th, Min)
|
||||
- [ ] Notes section documents sources and methodology
|
||||
- [ ] Visual formatting follows conventions (blue = input, black = formula)
|
||||
- [ ] Sanity checks pass (margins logical, multiples reasonable)
|
||||
- [ ] Date stamp is current ("As of [Date]")
|
||||
- [ ] Formula auditing shows no errors (#DIV/0!, #REF!, #N/A)
|
||||
|
||||
---
|
||||
|
||||
## Continuous Improvement
|
||||
|
||||
After completing a comp analysis, ask:
|
||||
1. Did the statistics reveal unexpected insights?
|
||||
2. Were there any data gaps that limited analysis?
|
||||
3. Did stakeholders ask for metrics you didn't include?
|
||||
4. How long did it take vs. how long should it take?
|
||||
5. What would make this more useful next time?
|
||||
|
||||
The best comp analyses evolve with each iteration. Save templates, learn from feedback, and refine the structure based on what decision-makers actually use.
|
||||
|
||||
|
||||
## Data sources — MCP first, web fallback
|
||||
|
||||
Many passages below say "use the S&P Kensho MCP / Daloopa MCP / FactSet MCP". Those are commercial financial-data MCPs from the original Cowork plugin context. In Hermes:
|
||||
|
||||
- **If you have any structured financial-data MCP configured** (Hermes supports MCP — see `native-mcp` skill), prefer it for point-in-time comps, precedent transactions, and filings.
|
||||
- **Otherwise**, fall back to:
|
||||
- `web_search` / `web_extract` against SEC EDGAR (`https://www.sec.gov/cgi-bin/browse-edgar`) for US filings
|
||||
- Company IR pages for press releases, earnings decks
|
||||
- `browser_navigate` for interactive data portals
|
||||
- User-provided data (explicitly ask when the context doesn't have it)
|
||||
- **Never fabricate**. If a multiple, precedent, or filing number can't be sourced, flag the cell as `[UNSOURCED]` and surface it to the user.
|
||||
|
||||
## Attribution
|
||||
|
||||
This skill is adapted from Anthropic's Claude for Financial Services plugin suite (Apache-2.0). The Office-JS / Cowork live-Excel paths have been removed; this version targets headless openpyxl via the `excel-author` skill's conventions. Original: https://github.com/anthropics/financial-services
|
||||
1288
website/docs/user-guide/skills/optional/finance/finance-dcf-model.md
Normal file
1288
website/docs/user-guide/skills/optional/finance/finance-dcf-model.md
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,262 @@
|
|||
---
|
||||
title: "Excel Author"
|
||||
sidebar_label: "Excel Author"
|
||||
description: "Build auditable Excel workbooks headless with openpyxl — blue/black/green cell conventions, formulas over hardcodes, named ranges, balance checks, sensitivit..."
|
||||
---
|
||||
|
||||
{/* This page is auto-generated from the skill's SKILL.md by website/scripts/generate-skill-docs.py. Edit the source SKILL.md, not this page. */}
|
||||
|
||||
# Excel Author
|
||||
|
||||
Build auditable Excel workbooks headless with openpyxl — blue/black/green cell conventions, formulas over hardcodes, named ranges, balance checks, sensitivity tables. Use for financial models, audit outputs, reconciliations.
|
||||
|
||||
## Skill metadata
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| Source | Optional — install with `hermes skills install official/finance/excel-author` |
|
||||
| Path | `optional-skills/finance/excel-author` |
|
||||
| Version | `1.0.0` |
|
||||
| Author | Anthropic (adapted by Nous Research) |
|
||||
| License | Apache-2.0 |
|
||||
| Platforms | linux, macos, windows |
|
||||
| Tags | `excel`, `openpyxl`, `finance`, `spreadsheet`, `modeling` |
|
||||
| Related skills | [`pptx-author`](/docs/user-guide/skills/optional/finance/finance-pptx-author), [`dcf-model`](/docs/user-guide/skills/optional/finance/finance-dcf-model), [`comps-analysis`](/docs/user-guide/skills/optional/finance/finance-comps-analysis), [`lbo-model`](/docs/user-guide/skills/optional/finance/finance-lbo-model), [`3-statement-model`](/docs/user-guide/skills/optional/finance/finance-3-statement-model) |
|
||||
|
||||
## Reference: full SKILL.md
|
||||
|
||||
:::info
|
||||
The following is the complete skill definition that Hermes loads when this skill is triggered. This is what the agent sees as instructions when the skill is active.
|
||||
:::
|
||||
|
||||
# excel-author
|
||||
|
||||
Produce an .xlsx file on disk using `openpyxl`. Follow the banker-grade conventions below so the model is auditable, flexible, and reviewable by someone other than the person who built it.
|
||||
|
||||
Adapted from Anthropic's `xlsx-author` and `audit-xls` skills in the [anthropics/financial-services](https://github.com/anthropics/financial-services) repo. The MCP / Office-JS / Cowork-specific branches of the originals are dropped — this skill assumes headless Python.
|
||||
|
||||
## Output contract
|
||||
|
||||
- Write to `./out/<name>.xlsx`. Create `./out/` if it does not exist.
|
||||
- Return the relative path in your final message so downstream tools can pick it up.
|
||||
- One logical model per file. Do not append to an existing workbook unless explicitly asked.
|
||||
|
||||
## Setup
|
||||
|
||||
```bash
|
||||
pip install "openpyxl>=3.0"
|
||||
```
|
||||
|
||||
## Core conventions (non-negotiable)
|
||||
|
||||
### Blue / black / green cell color
|
||||
- **Blue** (`Font(color="0000FF")`) — hardcoded input a human entered. Revenue drivers, WACC inputs, terminal growth, market data.
|
||||
- **Black** (default) — formula. Every derived cell is a live Excel formula.
|
||||
- **Green** (`Font(color="006100")`) — link to another sheet or external file.
|
||||
|
||||
A reviewer can then scan the sheet and immediately see what's an assumption vs. what's computed.
|
||||
|
||||
### Formulas over hardcodes
|
||||
Every calculation cell MUST be a formula string, never a number computed in Python and pasted as a value.
|
||||
|
||||
```python
|
||||
# WRONG — silent bug waiting to happen
|
||||
ws["D20"] = revenue_prior_year * (1 + growth)
|
||||
|
||||
# CORRECT — flexes when the user changes the assumption
|
||||
ws["D20"] = "=D19*(1+$B$8)"
|
||||
```
|
||||
|
||||
The only hardcoded numbers permitted:
|
||||
1. Raw historical inputs (actual revenues, reported EBITDA, etc.)
|
||||
2. Assumption drivers the user is meant to flex (growth rates, WACC inputs, terminal g)
|
||||
3. Current market data (share price, debt balance) — with a cell comment documenting source + date
|
||||
|
||||
If you catch yourself computing a value in Python and writing the result, stop.
|
||||
|
||||
### Named ranges for cross-sheet references
|
||||
Use named ranges for any figure referenced from another sheet, a deck, or a memo.
|
||||
|
||||
```python
|
||||
from openpyxl.workbook.defined_name import DefinedName
|
||||
wb.defined_names["WACC"] = DefinedName("WACC", attr_text="Inputs!$C$8")
|
||||
# then elsewhere:
|
||||
calc["D30"] = "=D29/WACC"
|
||||
```
|
||||
|
||||
### Balance checks tab
|
||||
Include a `Checks` tab that ties everything and surfaces TRUE/FALSE:
|
||||
- Balance sheet balances (assets = liabilities + equity)
|
||||
- Cash flow ties to period-over-period cash change on the BS
|
||||
- Sum-of-parts ties to consolidated totals
|
||||
- No rogue hardcodes inside calc ranges
|
||||
|
||||
Example:
|
||||
```python
|
||||
checks = wb.create_sheet("Checks")
|
||||
checks["A2"] = "BS balances"
|
||||
checks["B2"] = "=IS!D20-IS!D21-IS!D22"
|
||||
checks["C2"] = "=ABS(B2)<0.01" # TRUE/FALSE
|
||||
```
|
||||
|
||||
### Cell comments on every hardcoded input
|
||||
Add the comment AS you create the cell, not later.
|
||||
|
||||
```python
|
||||
from openpyxl.comments import Comment
|
||||
ws["C2"] = 1_250_000_000
|
||||
ws["C2"].font = Font(color="0000FF")
|
||||
ws["C2"].comment = Comment("Source: 10-K FY2024, p.47, revenue line", "analyst")
|
||||
```
|
||||
|
||||
Format: `Source: [System/Document], [Date], [Reference], [URL if applicable]`.
|
||||
|
||||
Never defer sourcing. Never write `TODO: add source`.
|
||||
|
||||
## Skeleton: typical financial model
|
||||
|
||||
```python
|
||||
from openpyxl import Workbook
|
||||
from openpyxl.styles import Font, PatternFill, Alignment, Border, Side
|
||||
from openpyxl.comments import Comment
|
||||
from openpyxl.utils import get_column_letter
|
||||
from pathlib import Path
|
||||
|
||||
BLUE = Font(color="0000FF")
|
||||
BLACK = Font(color="000000")
|
||||
GREEN = Font(color="006100")
|
||||
BOLD = Font(bold=True)
|
||||
HEADER_FILL = PatternFill("solid", fgColor="1F4E79")
|
||||
HEADER_FONT = Font(color="FFFFFF", bold=True)
|
||||
|
||||
wb = Workbook()
|
||||
|
||||
# --- Inputs tab ---
|
||||
inp = wb.active
|
||||
inp.title = "Inputs"
|
||||
inp["A1"] = "MARKET DATA & KEY INPUTS"
|
||||
inp["A1"].font = HEADER_FONT
|
||||
inp["A1"].fill = HEADER_FILL
|
||||
inp.merge_cells("A1:C1")
|
||||
|
||||
inp["B3"] = "Revenue FY2024"
|
||||
inp["C3"] = 1_250_000_000
|
||||
inp["C3"].font = BLUE
|
||||
inp["C3"].comment = Comment("Source: 10-K FY2024 p.47", "model")
|
||||
|
||||
inp["B4"] = "Growth Rate"
|
||||
inp["C4"] = 0.12
|
||||
inp["C4"].font = BLUE
|
||||
|
||||
# --- Calc tab ---
|
||||
calc = wb.create_sheet("DCF")
|
||||
calc["B2"] = "Projected Revenue"
|
||||
calc["C2"] = "=Inputs!C3*(1+Inputs!C4)" # formula, black
|
||||
|
||||
# --- Checks tab ---
|
||||
chk = wb.create_sheet("Checks")
|
||||
chk["A2"] = "BS balances"
|
||||
chk["B2"] = "=ABS(BS!D20-BS!D21-BS!D22)<0.01"
|
||||
|
||||
Path("./out").mkdir(exist_ok=True)
|
||||
wb.save("./out/model.xlsx")
|
||||
```
|
||||
|
||||
## Section headers with merged cells
|
||||
|
||||
openpyxl quirk: when you merge, set the value on the top-left cell and style the full range separately.
|
||||
|
||||
```python
|
||||
ws["A7"] = "CASH FLOW PROJECTION"
|
||||
ws["A7"].font = HEADER_FONT
|
||||
ws.merge_cells("A7:H7")
|
||||
for col in range(1, 9): # A..H
|
||||
ws.cell(row=7, column=col).fill = HEADER_FILL
|
||||
```
|
||||
|
||||
## Sensitivity tables
|
||||
|
||||
Build with loops, not hardcoded formulas per cell. Rules:
|
||||
|
||||
- **Odd number of rows/cols** (5×5 or 7×7) — guarantees a true center cell.
|
||||
- **Center cell = base case.** The middle row/col header must equal the model's actual WACC and terminal g so the center output equals the base-case implied share price. That's the sanity check.
|
||||
- **Highlight the center cell** with medium-blue fill (`"BDD7EE"`) and bold.
|
||||
- Populate every cell with a full recalculation formula — never an approximation.
|
||||
|
||||
```python
|
||||
# 5x5 WACC (rows) x terminal growth (cols) sensitivity
|
||||
wacc_axis = [0.08, 0.085, 0.09, 0.095, 0.10] # center row = base 9.0%
|
||||
term_axis = [0.02, 0.025, 0.03, 0.035, 0.04] # center col = base 3.0%
|
||||
|
||||
start_row = 40
|
||||
ws.cell(row=start_row, column=1).value = "Implied Share Price ($)"
|
||||
ws.cell(row=start_row, column=1).font = BOLD
|
||||
|
||||
for j, g in enumerate(term_axis):
|
||||
ws.cell(row=start_row+1, column=2+j).value = g
|
||||
ws.cell(row=start_row+1, column=2+j).font = BLUE
|
||||
|
||||
for i, w in enumerate(wacc_axis):
|
||||
r = start_row + 2 + i
|
||||
ws.cell(row=r, column=1).value = w
|
||||
ws.cell(row=r, column=1).font = BLUE
|
||||
for j, g in enumerate(term_axis):
|
||||
c = 2 + j
|
||||
# Full DCF recalc formula (simplified for illustration).
|
||||
# In a real model this references the full projection block.
|
||||
ws.cell(row=r, column=c).value = (
|
||||
f"=SUMPRODUCT(FCF_range,1/(1+{w})^year_offset) + "
|
||||
f"FCF_terminal*(1+{g})/({w}-{g})/(1+{w})^terminal_year"
|
||||
)
|
||||
|
||||
# Highlight center cell (base case)
|
||||
center = ws.cell(row=start_row+2+len(wacc_axis)//2,
|
||||
column=2+len(term_axis)//2)
|
||||
center.fill = PatternFill("solid", fgColor="BDD7EE")
|
||||
center.font = BOLD
|
||||
```
|
||||
|
||||
## Recalculating before delivery
|
||||
|
||||
openpyxl writes formula strings but does not compute them. Excel recalculates on open, but downstream consumers (auto-check scripts, CI) need computed values.
|
||||
|
||||
Run LibreOffice or a dedicated recalc step before delivery:
|
||||
|
||||
```bash
|
||||
# LibreOffice headless recalc
|
||||
libreoffice --headless --calc --convert-to xlsx ./out/model.xlsx --outdir ./out/
|
||||
```
|
||||
|
||||
Or use a Python recalc helper (see `scripts/recalc.py` in this skill).
|
||||
|
||||
## Model layout planning
|
||||
|
||||
Before writing any formula:
|
||||
1. Define ALL section row positions
|
||||
2. Write ALL headers and labels
|
||||
3. Write ALL section dividers and blank rows
|
||||
4. THEN write formulas using the locked row positions
|
||||
|
||||
This prevents the cascading-formula-breakage pattern where inserting a header row after formulas are written shifts every downstream reference.
|
||||
|
||||
## Verify step-by-step with the user
|
||||
|
||||
For large models (DCFs, 3-statement, LBO), stop and show the user intermediate artifacts before continuing. Catching a wrong margin assumption before you've built downstream sensitivity tables saves an hour.
|
||||
|
||||
Checkpoint pattern:
|
||||
- After Inputs block → show raw inputs, confirm before projecting
|
||||
- After Revenue projections → confirm top line + growth
|
||||
- After FCF build → confirm the full schedule
|
||||
- After WACC → confirm inputs
|
||||
- After valuation → confirm the equity bridge
|
||||
- THEN build sensitivity tables
|
||||
|
||||
## When NOT to use this skill
|
||||
|
||||
- Users in a live Excel session with an Office MCP available — drive their live workbook instead.
|
||||
- Pure tabular data export with no formulas — `csv` or `pandas.to_excel` is simpler.
|
||||
- Dashboards / charts with heavy interactivity — use a real BI tool.
|
||||
|
||||
## Attribution
|
||||
|
||||
Conventions (blue/black/green, formulas-over-hardcodes, named ranges, sensitivity rules) adapted from Anthropic's Claude for Financial Services plugin suite, Apache-2.0 licensed. Original: https://github.com/anthropics/financial-services/tree/main/plugins/vertical-plugins/financial-analysis/skills/xlsx-author
|
||||
|
|
@ -0,0 +1,309 @@
|
|||
---
|
||||
title: "Lbo Model"
|
||||
sidebar_label: "Lbo Model"
|
||||
description: "Build leveraged buyout models in Excel — sources & uses, debt schedule, cash sweep, exit multiple, IRR/MOIC sensitivity"
|
||||
---
|
||||
|
||||
{/* This page is auto-generated from the skill's SKILL.md by website/scripts/generate-skill-docs.py. Edit the source SKILL.md, not this page. */}
|
||||
|
||||
# Lbo Model
|
||||
|
||||
Build leveraged buyout models in Excel — sources & uses, debt schedule, cash sweep, exit multiple, IRR/MOIC sensitivity. Pairs with excel-author. Use for PE screening, sponsor-case valuation, or illustrative LBO in a pitch.
|
||||
|
||||
## Skill metadata
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| Source | Optional — install with `hermes skills install official/finance/lbo-model` |
|
||||
| Path | `optional-skills/finance/lbo-model` |
|
||||
| Version | `1.0.0` |
|
||||
| Author | Anthropic (adapted by Nous Research) |
|
||||
| License | Apache-2.0 |
|
||||
| Platforms | linux, macos, windows |
|
||||
| Tags | `finance`, `valuation`, `lbo`, `private-equity`, `excel`, `openpyxl`, `modeling` |
|
||||
| Related skills | [`excel-author`](/docs/user-guide/skills/optional/finance/finance-excel-author), [`pptx-author`](/docs/user-guide/skills/optional/finance/finance-pptx-author), [`dcf-model`](/docs/user-guide/skills/optional/finance/finance-dcf-model), [`3-statement-model`](/docs/user-guide/skills/optional/finance/finance-3-statement-model) |
|
||||
|
||||
## Reference: full SKILL.md
|
||||
|
||||
:::info
|
||||
The following is the complete skill definition that Hermes loads when this skill is triggered. This is what the agent sees as instructions when the skill is active.
|
||||
:::
|
||||
|
||||
## Environment
|
||||
|
||||
This skill assumes **headless openpyxl** — you are producing an .xlsx file on disk.
|
||||
Follow the `excel-author` skill's conventions for cell coloring, formulas, named ranges, and sensitivity tables.
|
||||
Recalculate before delivery: `python /path/to/excel-author/scripts/recalc.py ./out/model.xlsx`.
|
||||
|
||||
---
|
||||
|
||||
## TEMPLATE REQUIREMENT
|
||||
|
||||
**This skill uses templates for LBO models. Always check for an attached template file first.**
|
||||
|
||||
Before starting any LBO model:
|
||||
1. **If a template file is attached/provided**: Use that template's structure exactly - copy it and populate with the user's data
|
||||
2. **If no template is attached**: Ask the user: *"Do you have a specific LBO template you'd like me to use? If not, I can use the standard template which includes Sources & Uses, Operating Model, Debt Schedule, and Returns Analysis."*
|
||||
3. **If using the standard template**: Copy `examples/LBO_Model.xlsx` as your starting point and populate it with the user's assumptions
|
||||
|
||||
**IMPORTANT**: When a file like `LBO_Model.xlsx` is attached, you MUST use it as your template - do not build from scratch. Even if the template seems complex or has more features than needed, copy it and adapt it to the user's requirements. Never decide to "build from scratch" when a template is provided.
|
||||
|
||||
---
|
||||
|
||||
## CRITICAL INSTRUCTIONS — READ FIRST
|
||||
|
||||
Use Python/openpyxl. Write formula strings (`ws["D20"] = "=B5*B6"`), then run the `excel-author` skill's `recalc.py` helper before delivery.
|
||||
|
||||
### Core Principles
|
||||
* **Every calculation must be an Excel formula** - NEVER compute values in Python and hardcode results into cells. When using openpyxl, write `cell.value = "=B5*B6"` (formula string), NOT `cell.value = 1250` (computed result). The model must be dynamic and update when inputs change.
|
||||
* **Use the template structure** - Follow the organization in `examples/LBO_Model.xlsx` or the user's provided template. Do not invent your own layout.
|
||||
* **Use proper cell references** - All formulas should reference the appropriate cells. Never type numbers that should come from other cells.
|
||||
* **Maintain sign convention consistency** - Follow whatever sign convention the template uses (some use negative for outflows, some use positive). Be consistent throughout.
|
||||
* **Work section by section, verify with user at each step** - Complete one section fully, show the user what was built, run the section's verification checks, and get confirmation BEFORE moving to the next section. Do NOT build the entire model end-to-end and then present it — later sections depend on earlier ones, so catching a mistake in Sources & Uses after the returns are already built means rework everywhere.
|
||||
|
||||
### Formula Color Conventions
|
||||
* **Blue (0000FF)**: Hardcoded inputs - typed numbers that don't reference other cells
|
||||
* **Black (000000)**: Formulas with calculations - any formula using operators or functions (`=B4*B5`, `=SUM()`, `=-MAX(0,B4)`)
|
||||
* **Purple (800080)**: Links to cells on the **same tab** - direct references with no calculation (`=B9`, `=B45`)
|
||||
* **Green (008000)**: Links to cells on **different tabs** - cross-sheet references (`=Assumptions!B5`, `='Operating Model'!C10`)
|
||||
|
||||
### Fill Color Palette — Professional Blues & Greys (Default unless user/template specifies otherwise)
|
||||
* **Keep it minimal** — only use blues and greys for cell fills. Do NOT introduce greens, yellows, reds, or multiple accents. A professional LBO model uses restraint.
|
||||
* **Default fill palette:**
|
||||
* **Section headers** (Sources & Uses, Operating Model, etc.): Dark blue `#1F4E79` with white bold text
|
||||
* **Column headers** (Year 1, Year 2, etc.): Light blue `#D9E1F2` with black bold text
|
||||
* **Input cells**: Light grey `#F2F2F2` (or just white) — the blue *font* is the signal, fill is secondary
|
||||
* **Formula/calculated cells**: White, no fill
|
||||
* **Key outputs** (IRR, MOIC, Exit Equity): Medium blue `#BDD7EE` with black bold text
|
||||
* **That's the whole palette.** 3 blues + 1 grey + white. If the template uses its own colors, follow the template instead.
|
||||
* Note: The blue/black/purple/green **font** colors above are for distinguishing inputs vs formulas vs links. Those are separate from the **fill** palette here — both work together.
|
||||
|
||||
### Number Formatting Standards
|
||||
* **Currency**: `$#,##0;($#,##0);"-"` or `$#,##0.0` depending on template
|
||||
* **Percentages**: `0.0%` (one decimal)
|
||||
* **Multiples**: `0.0"x"` (one decimal)
|
||||
* **MOIC/Detailed Ratios**: `0.00"x"` (two decimals for precision)
|
||||
* **All numeric cells**: Right-aligned
|
||||
|
||||
---
|
||||
|
||||
### Clarify Requirements First
|
||||
|
||||
Before filling any formulas:
|
||||
|
||||
* **Examine the template structure** - Identify all sections, understand the timeline (which columns are which periods), note any existing formulas
|
||||
* **Ask the user if anything is unclear** - If the template structure, calculation methods, or requirements are ambiguous, ask before proceeding
|
||||
* **Confirm key assumptions** - Any key inputs, calculation preferences, or specific requirements
|
||||
* **ONLY AFTER understanding the template**, proceed to fill in formulas
|
||||
|
||||
---
|
||||
|
||||
## TEMPLATE ANALYSIS PHASE - DO THIS FIRST
|
||||
|
||||
Before filling any formulas, examine the template thoroughly:
|
||||
|
||||
1. **Map the structure** - Identify where each section lives and how they relate to each other. Note which sections feed into others.
|
||||
|
||||
2. **Understand the timeline** - Which columns represent which periods? Is there a "Closing" or "Pro Forma" column? Where does the projection period start?
|
||||
|
||||
3. **Identify input vs formula cells** - Templates often use color coding, borders, or shading to indicate which cells need inputs vs formulas. Respect these conventions.
|
||||
|
||||
4. **Read existing labels carefully** - The row labels tell you exactly what calculation is expected. Don't assume - read what the template is asking for.
|
||||
|
||||
5. **Check for existing formulas** - Some templates come partially filled. Don't overwrite working formulas unless specifically asked.
|
||||
|
||||
6. **Note template-specific conventions** - Sign conventions, subtotal structures, how sections are organized, whether there are separate tabs for different components, etc.
|
||||
|
||||
---
|
||||
|
||||
## FILLING FORMULAS - GENERAL APPROACH
|
||||
|
||||
For each cell that needs a formula, follow this hierarchy:
|
||||
|
||||
### Step 1: Check the Template
|
||||
* Does the cell already have a formula? If yes, verify it's correct and move on.
|
||||
* Is there a comment or note indicating the expected calculation?
|
||||
* Does the row/column label make the calculation obvious?
|
||||
* Do neighboring cells show a pattern you should follow?
|
||||
|
||||
### Step 2: Check the User's Instructions
|
||||
* Did the user specify a particular calculation method?
|
||||
* Are there stated assumptions that affect this formula?
|
||||
* Any special requirements mentioned?
|
||||
|
||||
### Step 3: Apply Standard Practice
|
||||
* If neither template nor user specifies, use standard LBO modeling conventions
|
||||
* Document any assumptions you make
|
||||
* If genuinely uncertain, ask the user
|
||||
|
||||
---
|
||||
|
||||
## COMMON PROBLEM AREAS
|
||||
|
||||
The following calculation patterns frequently cause issues across LBO models. Pay special attention when you encounter these:
|
||||
|
||||
### Balancing Sections
|
||||
* When two sections must equal (e.g., Sources = Uses), one item is typically the "plug" (balancing figure)
|
||||
* Identify which item is the plug and calculate it as the difference
|
||||
|
||||
### Tax Calculations
|
||||
* Tax formulas should only reference the relevant income line and tax rate
|
||||
* Should NOT reference unrelated sections (e.g., debt schedules)
|
||||
* Consider whether losses create tax shields or are simply ignored
|
||||
|
||||
### Interest and Circular References
|
||||
* Interest calculations can create circularity if they reference balances affected by cash flows
|
||||
* Use **Beginning Balance** (not average or ending) to break circular references
|
||||
* Pattern: Interest → Cash Flow → Paydown → Ending Balance (if interest uses ending balance, this circles back)
|
||||
|
||||
### Debt Paydown / Cash Sweeps
|
||||
* When multiple debt tranches exist, there's usually a priority order
|
||||
* Cash sweep should respect the priority waterfall
|
||||
* Balances cannot go negative - use MAX or MIN functions appropriately
|
||||
|
||||
### Returns Calculations (IRR/MOIC)
|
||||
* Cash flows must have correct signs: Investment = negative, Proceeds = positive
|
||||
* If using XIRR, need corresponding dates
|
||||
* If using IRR, cash flows should be in consecutive periods
|
||||
* MOIC = Total Proceeds / Total Investment
|
||||
|
||||
### Sensitivity Tables
|
||||
* **Use ODD dimensions** (5×5 or 7×7) — never 4×4 or 6×6. Odd dimensions guarantee a true center cell.
|
||||
* **Center cell = base case.** Build the row and column axis values symmetrically around the model's actual assumptions (e.g., if base entry multiple = 10.0x, axis = `[8.0x, 9.0x, 10.0x, 11.0x, 12.0x]`). The center cell's IRR/MOIC MUST then equal the model's actual IRR/MOIC output — this is the proof the table is wired correctly.
|
||||
* **Highlight the center cell** — medium-blue fill (`#BDD7EE`) + bold font so the base case is visually anchored.
|
||||
* Excel's DATA TABLE function may not work with openpyxl — instead write explicit formulas that reference row/column headers
|
||||
* Each cell should show a DIFFERENT value — if all same, formulas aren't varying correctly
|
||||
* Use mixed references (e.g., `$A5` for row input, `B$4` for column input)
|
||||
|
||||
---
|
||||
|
||||
## VERIFICATION CHECKLIST - RUN AFTER COMPLETION
|
||||
|
||||
### Run Formula Validation
|
||||
```bash
|
||||
python /path/to/excel-author/scripts/recalc.py model.xlsx
|
||||
```
|
||||
Must return success with zero errors.
|
||||
|
||||
### Section Balancing
|
||||
- [ ] Any sections that must balance (Sources/Uses, Assets/Liabilities) balance exactly
|
||||
- [ ] Plug items are calculated correctly as the balancing figure
|
||||
- [ ] Amounts that should match across sections are consistent
|
||||
|
||||
### Income/Operating Projections
|
||||
- [ ] Revenue/top-line builds correctly from drivers or growth rates
|
||||
- [ ] All cost and expense items calculated appropriately
|
||||
- [ ] Subtotals and totals sum correctly
|
||||
- [ ] Margins and ratios are reasonable
|
||||
- [ ] Links to assumptions are correct
|
||||
|
||||
### Balance Sheet (if applicable)
|
||||
- [ ] Assets = Liabilities + Equity (must balance)
|
||||
- [ ] All items link to appropriate schedules or roll-forwards
|
||||
- [ ] Beginning balances = prior period ending balances
|
||||
- [ ] Check row included and shows zero
|
||||
|
||||
### Cash Flow (if applicable)
|
||||
- [ ] Starts with correct income figure
|
||||
- [ ] Non-cash items added/subtracted appropriately
|
||||
- [ ] Working capital changes have correct signs
|
||||
- [ ] Ending Cash = Beginning Cash + Net Cash Flow
|
||||
- [ ] Cash balances are consistent across statements
|
||||
|
||||
### Supporting Schedules
|
||||
- [ ] Roll-forward schedules balance (Beginning + Changes = Ending)
|
||||
- [ ] Schedules link correctly to main statements
|
||||
- [ ] Calculated items use appropriate drivers
|
||||
- [ ] All periods are calculated consistently
|
||||
|
||||
### Debt/Financing Schedules (if applicable)
|
||||
- [ ] Beginning balances tie to sources or prior period
|
||||
- [ ] Interest calculated on appropriate balance (typically beginning)
|
||||
- [ ] Paydowns respect cash availability and priority
|
||||
- [ ] Ending balances cannot be negative
|
||||
- [ ] Totals sum tranches correctly
|
||||
|
||||
### Returns/Output Analysis
|
||||
- [ ] Exit/terminal values calculated correctly
|
||||
- [ ] All relevant adjustments included
|
||||
- [ ] Cash flow signs are correct (negative for investment, positive for proceeds)
|
||||
- [ ] IRR/MOIC formulas reference complete ranges
|
||||
- [ ] Results are reasonable for the scenario
|
||||
|
||||
### Sensitivity Tables (if applicable)
|
||||
- [ ] Grid dimensions are ODD (5×5 or 7×7) — there is a true center cell
|
||||
- [ ] Row and column axis values are symmetric around the base case (`[base-2Δ, base-Δ, base, base+Δ, base+2Δ]`)
|
||||
- [ ] Center cell output equals the model's actual IRR/MOIC — confirms the table is wired correctly
|
||||
- [ ] Center cell is highlighted (medium-blue fill `#BDD7EE`, bold font)
|
||||
- [ ] Row and column headers contain appropriate input values
|
||||
- [ ] Each data cell contains a formula (not hardcoded)
|
||||
- [ ] Each data cell shows a DIFFERENT value
|
||||
- [ ] Values move in expected directions (higher exit multiple → higher IRR, etc.)
|
||||
|
||||
### Formatting
|
||||
- [ ] Hardcoded inputs are blue (0000FF)
|
||||
- [ ] Calculated formulas are black (000000)
|
||||
- [ ] Same-tab links are purple (800080)
|
||||
- [ ] Cross-tab links are green (008000)
|
||||
- [ ] All numbers are right-aligned
|
||||
- [ ] Appropriate number formats applied throughout
|
||||
- [ ] No cells show error values (#REF!, #DIV/0!, #VALUE!, #NAME?)
|
||||
|
||||
### Logical Sanity Checks
|
||||
- [ ] Numbers are reasonable order of magnitude
|
||||
- [ ] Trends make sense (growth, decline, stabilization as expected)
|
||||
- [ ] No obviously wrong values (negative where should be positive, impossible percentages, etc.)
|
||||
- [ ] Key outputs are within reasonable ranges for the type of analysis
|
||||
|
||||
---
|
||||
|
||||
## COMMON ERRORS TO AVOID
|
||||
|
||||
| Error | What Goes Wrong | How to Fix |
|
||||
|-------|-----------------|------------|
|
||||
| Hardcoding calculated values | Model doesn't update when inputs change | Always use formulas that reference source cells |
|
||||
| Wrong cell references after copying | Formulas point to wrong cells | Verify all links, use appropriate $ anchoring |
|
||||
| Circular reference errors | Model can't calculate | Use beginning balances for interest-type calcs, break the circle |
|
||||
| Sections don't balance | Totals that should match don't | Ensure one item is the plug (calculated as difference) |
|
||||
| Negative balances where impossible | Paying/using more than available | Use MAX(0, ...) or MIN functions appropriately |
|
||||
| IRR/return errors | Wrong signs or incomplete ranges | Check cash flow signs and ensure formula covers all periods |
|
||||
| Sensitivity table shows same value | Formula not varying with inputs | Check cell references - need mixed references ($A5, B$4) |
|
||||
| Roll-forwards don't tie | Beginning ≠ prior ending | Verify links between periods |
|
||||
| Inconsistent sign conventions | Additions become subtractions or vice versa | Follow template's convention consistently throughout |
|
||||
|
||||
---
|
||||
|
||||
## WORKING WITH THE USER — SECTION-BY-SECTION CHECKPOINTS
|
||||
|
||||
* **If the template structure is unclear**, ask before proceeding
|
||||
* **If the user's requirements conflict with the template**, confirm their preference
|
||||
* **After completing each major section**, STOP and verify with the user before continuing:
|
||||
- **After Sources & Uses** → show the balanced table, confirm the plug is correct, get sign-off before building the operating model
|
||||
- **After Operating Model / Projections** → show the projected P&L, confirm growth rates and margins look right, get sign-off before the debt schedule
|
||||
- **After Debt Schedule** → show beginning/ending balances and interest, confirm the waterfall logic, get sign-off before returns
|
||||
- **After Returns (IRR/MOIC)** → show the cash flow series and outputs, confirm signs and ranges, get sign-off before sensitivity tables
|
||||
- **After Sensitivity Tables** → show that each cell varies, confirm the base case lands where expected
|
||||
* **If errors are found during verification**, fix them before moving to the next section
|
||||
* **Show your work** - explain key formulas or assumptions when helpful
|
||||
* **Never present a completed model without having checked in at each section** — it's faster to catch a wrong cell reference at the source than to trace it backwards from a broken IRR
|
||||
|
||||
---
|
||||
|
||||
**This skill produces investment banking-quality LBO models by filling templates with correct formulas, proper formatting, and validated calculations. The skill adapts to any template structure while ensuring financial accuracy and professional presentation standards.**
|
||||
|
||||
|
||||
## Data sources — MCP first, web fallback
|
||||
|
||||
Many passages below say "use the S&P Kensho MCP / Daloopa MCP / FactSet MCP". Those are commercial financial-data MCPs from the original Cowork plugin context. In Hermes:
|
||||
|
||||
- **If you have any structured financial-data MCP configured** (Hermes supports MCP — see `native-mcp` skill), prefer it for point-in-time comps, precedent transactions, and filings.
|
||||
- **Otherwise**, fall back to:
|
||||
- `web_search` / `web_extract` against SEC EDGAR (`https://www.sec.gov/cgi-bin/browse-edgar`) for US filings
|
||||
- Company IR pages for press releases, earnings decks
|
||||
- `browser_navigate` for interactive data portals
|
||||
- User-provided data (explicitly ask when the context doesn't have it)
|
||||
- **Never fabricate**. If a multiple, precedent, or filing number can't be sourced, flag the cell as `[UNSOURCED]` and surface it to the user.
|
||||
|
||||
## Attribution
|
||||
|
||||
This skill is adapted from Anthropic's Claude for Financial Services plugin suite (Apache-2.0). The Office-JS / Cowork live-Excel paths have been removed; this version targets headless openpyxl via the `excel-author` skill's conventions. Original: https://github.com/anthropics/financial-services
|
||||
|
|
@ -0,0 +1,162 @@
|
|||
---
|
||||
title: "Merger Model — Build accretion/dilution (merger) models in Excel — pro-forma P&L, synergies, financing mix, EPS impact"
|
||||
sidebar_label: "Merger Model"
|
||||
description: "Build accretion/dilution (merger) models in Excel — pro-forma P&L, synergies, financing mix, EPS impact"
|
||||
---
|
||||
|
||||
{/* This page is auto-generated from the skill's SKILL.md by website/scripts/generate-skill-docs.py. Edit the source SKILL.md, not this page. */}
|
||||
|
||||
# Merger Model
|
||||
|
||||
Build accretion/dilution (merger) models in Excel — pro-forma P&L, synergies, financing mix, EPS impact. Pairs with excel-author. Use for M&A pitches, board materials, or deal evaluation.
|
||||
|
||||
## Skill metadata
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| Source | Optional — install with `hermes skills install official/finance/merger-model` |
|
||||
| Path | `optional-skills/finance/merger-model` |
|
||||
| Version | `1.0.0` |
|
||||
| Author | Anthropic (adapted by Nous Research) |
|
||||
| License | Apache-2.0 |
|
||||
| Platforms | linux, macos, windows |
|
||||
| Tags | `finance`, `m-and-a`, `merger`, `accretion-dilution`, `excel`, `openpyxl`, `modeling`, `investment-banking` |
|
||||
| Related skills | [`excel-author`](/docs/user-guide/skills/optional/finance/finance-excel-author), [`pptx-author`](/docs/user-guide/skills/optional/finance/finance-pptx-author), [`dcf-model`](/docs/user-guide/skills/optional/finance/finance-dcf-model), [`3-statement-model`](/docs/user-guide/skills/optional/finance/finance-3-statement-model) |
|
||||
|
||||
## Reference: full SKILL.md
|
||||
|
||||
:::info
|
||||
The following is the complete skill definition that Hermes loads when this skill is triggered. This is what the agent sees as instructions when the skill is active.
|
||||
:::
|
||||
|
||||
## Environment
|
||||
|
||||
This skill assumes **headless openpyxl** — you are producing an .xlsx file on disk.
|
||||
Follow the `excel-author` skill's conventions for cell coloring, formulas, named ranges, and sensitivity tables.
|
||||
Recalculate before delivery: `python /path/to/excel-author/scripts/recalc.py ./out/model.xlsx`.
|
||||
|
||||
# Merger Model
|
||||
|
||||
Build accretion/dilution analysis for M&A transactions. Models pro forma EPS impact, synergy sensitivities, and purchase price allocation. Use when evaluating a potential acquisition, preparing merger consequences analysis for a pitch, or advising on deal terms.
|
||||
|
||||
## Workflow
|
||||
|
||||
### Step 1: Gather Inputs
|
||||
|
||||
**Acquirer:**
|
||||
- Company name, current share price, shares outstanding
|
||||
- LTM and NTM EPS (GAAP and adjusted)
|
||||
- P/E multiple
|
||||
- Pre-tax cost of debt, tax rate
|
||||
- Cash on balance sheet, existing debt
|
||||
|
||||
**Target:**
|
||||
- Company name, current share price, shares outstanding (if public)
|
||||
- LTM and NTM EPS or net income
|
||||
- Enterprise value or equity value
|
||||
|
||||
**Deal Terms:**
|
||||
- Offer price per share (or premium to current)
|
||||
- Consideration mix: % cash vs. % stock
|
||||
- New debt raised to fund cash portion
|
||||
- Expected synergies (revenue and cost) and phase-in timeline
|
||||
- Transaction fees and financing costs
|
||||
- Expected close date
|
||||
|
||||
### Step 2: Purchase Price Analysis
|
||||
|
||||
| Item | Value |
|
||||
|------|-------|
|
||||
| Offer price per share | |
|
||||
| Premium to current | |
|
||||
| Equity value | |
|
||||
| Plus: net debt assumed | |
|
||||
| Enterprise value | |
|
||||
| EV / EBITDA implied | |
|
||||
| P/E implied | |
|
||||
|
||||
### Step 3: Sources & Uses
|
||||
|
||||
| Sources | $ | Uses | $ |
|
||||
|---------|---|------|---|
|
||||
| New debt | | Equity purchase price | |
|
||||
| Cash on hand | | Refinance target debt | |
|
||||
| New equity issued | | Transaction fees | |
|
||||
| | | Financing fees | |
|
||||
| **Total** | | **Total** | |
|
||||
|
||||
### Step 4: Pro Forma EPS (Accretion / Dilution)
|
||||
|
||||
Calculate year-by-year (Year 1-3):
|
||||
|
||||
| | Standalone | Pro Forma | Accretion/(Dilution) |
|
||||
|---|-----------|-----------|---------------------|
|
||||
| Acquirer net income | | | |
|
||||
| Target net income | | | |
|
||||
| Synergies (after tax) | | | |
|
||||
| Foregone interest on cash (after tax) | | | |
|
||||
| New debt interest (after tax) | | | |
|
||||
| Intangible amortization (after tax) | | | |
|
||||
| Pro forma net income | | | |
|
||||
| Pro forma shares | | | |
|
||||
| **Pro forma EPS** | | | |
|
||||
| **Accretion / (Dilution) %** | | | |
|
||||
|
||||
### Step 5: Sensitivity Analysis
|
||||
|
||||
**Accretion/Dilution vs. Synergies and Offer Premium:**
|
||||
|
||||
| | $0M syn | $25M syn | $50M syn | $75M syn | $100M syn |
|
||||
|---|---------|----------|----------|----------|-----------|
|
||||
| 15% premium | | | | | |
|
||||
| 20% premium | | | | | |
|
||||
| 25% premium | | | | | |
|
||||
| 30% premium | | | | | |
|
||||
|
||||
**Accretion/Dilution vs. Cash/Stock Mix:**
|
||||
|
||||
| | 100% cash | 75/25 | 50/50 | 25/75 | 100% stock |
|
||||
|---|-----------|-------|-------|-------|------------|
|
||||
| Year 1 | | | | | |
|
||||
| Year 2 | | | | | |
|
||||
|
||||
### Step 6: Breakeven Synergies
|
||||
|
||||
Calculate the minimum synergies needed for the deal to be EPS-neutral in Year 1.
|
||||
|
||||
### Step 7: Output
|
||||
|
||||
- Excel workbook with:
|
||||
- Assumptions tab
|
||||
- Sources & uses
|
||||
- Pro forma income statement
|
||||
- Accretion/dilution summary
|
||||
- Sensitivity tables
|
||||
- Breakeven analysis
|
||||
- One-page merger consequences summary for pitch book
|
||||
|
||||
## Important Notes
|
||||
|
||||
- Always show both GAAP and adjusted (cash) EPS where relevant
|
||||
- Stock deals: use acquirer's current price for exchange ratio, note dilution from new shares
|
||||
- Include purchase price allocation — goodwill and intangible amortization matter for GAAP EPS
|
||||
- Synergy phase-in is critical — Year 1 is often only 25-50% of run-rate synergies
|
||||
- Don't forget foregone interest income on cash used and new interest expense on debt raised
|
||||
- Tax rate on synergies and interest adjustments should match the acquirer's marginal rate
|
||||
|
||||
|
||||
## Data sources — MCP first, web fallback
|
||||
|
||||
Many passages below say "use the S&P Kensho MCP / Daloopa MCP / FactSet MCP". Those are commercial financial-data MCPs from the original Cowork plugin context. In Hermes:
|
||||
|
||||
- **If you have any structured financial-data MCP configured** (Hermes supports MCP — see `native-mcp` skill), prefer it for point-in-time comps, precedent transactions, and filings.
|
||||
- **Otherwise**, fall back to:
|
||||
- `web_search` / `web_extract` against SEC EDGAR (`https://www.sec.gov/cgi-bin/browse-edgar`) for US filings
|
||||
- Company IR pages for press releases, earnings decks
|
||||
- `browser_navigate` for interactive data portals
|
||||
- User-provided data (explicitly ask when the context doesn't have it)
|
||||
- **Never fabricate**. If a multiple, precedent, or filing number can't be sourced, flag the cell as `[UNSOURCED]` and surface it to the user.
|
||||
|
||||
## Attribution
|
||||
|
||||
This skill is adapted from Anthropic's Claude for Financial Services plugin suite (Apache-2.0). The Office-JS / Cowork live-Excel paths have been removed; this version targets headless openpyxl via the `excel-author` skill's conventions. Original: https://github.com/anthropics/financial-services
|
||||
|
|
@ -0,0 +1,191 @@
|
|||
---
|
||||
title: "Pptx Author — Build PowerPoint decks headless with python-pptx"
|
||||
sidebar_label: "Pptx Author"
|
||||
description: "Build PowerPoint decks headless with python-pptx"
|
||||
---
|
||||
|
||||
{/* This page is auto-generated from the skill's SKILL.md by website/scripts/generate-skill-docs.py. Edit the source SKILL.md, not this page. */}
|
||||
|
||||
# Pptx Author
|
||||
|
||||
Build PowerPoint decks headless with python-pptx. Pairs with excel-author for model-backed decks where every number traces to a workbook cell. Use for pitch decks, IC memos, earnings notes.
|
||||
|
||||
## Skill metadata
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| Source | Optional — install with `hermes skills install official/finance/pptx-author` |
|
||||
| Path | `optional-skills/finance/pptx-author` |
|
||||
| Version | `1.0.0` |
|
||||
| Author | Anthropic (adapted by Nous Research) |
|
||||
| License | Apache-2.0 |
|
||||
| Platforms | linux, macos, windows |
|
||||
| Tags | `powerpoint`, `pptx`, `python-pptx`, `presentation`, `finance` |
|
||||
| Related skills | [`excel-author`](/docs/user-guide/skills/optional/finance/finance-excel-author), [`powerpoint`](/docs/user-guide/skills/bundled/productivity/productivity-powerpoint) |
|
||||
|
||||
## Reference: full SKILL.md
|
||||
|
||||
:::info
|
||||
The following is the complete skill definition that Hermes loads when this skill is triggered. This is what the agent sees as instructions when the skill is active.
|
||||
:::
|
||||
|
||||
# pptx-author
|
||||
|
||||
Produce a .pptx file on disk using `python-pptx`. Use when you need to deliver a deck as a file artifact, not drive a live PowerPoint session.
|
||||
|
||||
Adapted from Anthropic's `pptx-author` and `pitch-deck` skills in [anthropics/financial-services](https://github.com/anthropics/financial-services). The MCP / Office-JS branches of the originals are dropped — this assumes headless Python.
|
||||
|
||||
For the broader, already-shipped PowerPoint authoring skill (slides, speaker notes, embeds, media), see the built-in `powerpoint` skill. This skill is a lighter-weight pattern tuned for model-backed decks (pitch decks, IC memos, earnings notes) where every number must trace to a source workbook.
|
||||
|
||||
## Output contract
|
||||
|
||||
- Write to `./out/<name>.pptx`. Create `./out/` if it does not exist.
|
||||
- Return the relative path in your final message.
|
||||
|
||||
## Setup
|
||||
|
||||
```bash
|
||||
pip install "python-pptx>=0.6"
|
||||
```
|
||||
|
||||
## Core conventions
|
||||
|
||||
### One idea per slide
|
||||
Title states the takeaway; body supports it. A slide titled "Q3 Revenue" is weak; "Revenue growth accelerated to 14% Y/Y in Q3" is strong.
|
||||
|
||||
### Every number traces to the model
|
||||
If a figure on a slide came from `./out/model.xlsx`, footnote the sheet and cell.
|
||||
|
||||
```
|
||||
Revenue: $1,250M (Source: model.xlsx, Inputs!C3)
|
||||
```
|
||||
|
||||
Never transcribe numbers from memory or from a summary — open the workbook, read the named range, and bind the deck value to it programmatically when you can.
|
||||
|
||||
### Use the firm template when one is mounted
|
||||
If `./templates/firm-template.pptx` exists, load it so the deck inherits branded colors, fonts, and master layouts.
|
||||
|
||||
```python
|
||||
from pptx import Presentation
|
||||
from pathlib import Path
|
||||
|
||||
template = Path("./templates/firm-template.pptx")
|
||||
prs = Presentation(str(template)) if template.exists() else Presentation()
|
||||
```
|
||||
|
||||
### Charts: PNG-from-model beats native pptx charts
|
||||
When fidelity matters (the model's chart styling must match the deck exactly), render the chart to PNG from the source workbook and embed the image. Native `pptx.chart` charts are fragile and often don't match firm conventions.
|
||||
|
||||
```python
|
||||
from pptx.util import Inches
|
||||
slide.shapes.add_picture("./out/charts/football_field.png",
|
||||
Inches(1), Inches(2),
|
||||
width=Inches(8))
|
||||
```
|
||||
|
||||
### No external sends
|
||||
This skill writes a file. It never emails, uploads, or posts. Orchestration layers handle delivery.
|
||||
|
||||
## Skeleton
|
||||
|
||||
```python
|
||||
from pptx import Presentation
|
||||
from pptx.util import Inches, Pt
|
||||
from pptx.dml.color import RGBColor
|
||||
from pathlib import Path
|
||||
|
||||
template = Path("./templates/firm-template.pptx")
|
||||
prs = Presentation(str(template)) if template.exists() else Presentation()
|
||||
|
||||
# Title slide
|
||||
slide = prs.slides.add_slide(prs.slide_layouts[0])
|
||||
slide.shapes.title.text = "Project Aurora — Strategic Alternatives"
|
||||
slide.placeholders[1].text = "Preliminary Discussion Materials"
|
||||
|
||||
# Valuation summary slide (title-only layout)
|
||||
slide = prs.slides.add_slide(prs.slide_layouts[5])
|
||||
slide.shapes.title.text = "Valuation implies $38–$52 per share across methodologies"
|
||||
|
||||
# Add a table bound to model outputs
|
||||
rows, cols = 5, 4
|
||||
tbl_shape = slide.shapes.add_table(rows, cols,
|
||||
Inches(0.5), Inches(1.5),
|
||||
Inches(9), Inches(3))
|
||||
tbl = tbl_shape.table
|
||||
headers = ["Methodology", "Low ($)", "Mid ($)", "High ($)"]
|
||||
for c, h in enumerate(headers):
|
||||
tbl.cell(0, c).text = h
|
||||
|
||||
# In a real deck, read these from the model workbook with openpyxl
|
||||
data = [
|
||||
("Trading comps", "35", "41", "48"),
|
||||
("Precedent M&A", "39", "45", "52"),
|
||||
("DCF (base)", "36", "43", "51"),
|
||||
("LBO (10% IRR)", "33", "38", "44"),
|
||||
]
|
||||
for r, row in enumerate(data, start=1):
|
||||
for c, val in enumerate(row):
|
||||
tbl.cell(r, c).text = val
|
||||
|
||||
# Embed a chart rendered from the model
|
||||
slide = prs.slides.add_slide(prs.slide_layouts[5])
|
||||
slide.shapes.title.text = "Football field — current price $42"
|
||||
slide.shapes.add_picture("./out/charts/football_field.png",
|
||||
Inches(1), Inches(1.8), width=Inches(8))
|
||||
|
||||
Path("./out").mkdir(exist_ok=True)
|
||||
prs.save("./out/pitch-aurora.pptx")
|
||||
```
|
||||
|
||||
## Binding deck numbers to the source workbook
|
||||
|
||||
Read named ranges or specific cells from your Excel model so deck numbers never drift.
|
||||
|
||||
```python
|
||||
from openpyxl import load_workbook
|
||||
|
||||
wb = load_workbook("./out/model.xlsx", data_only=True)
|
||||
def nr(name):
|
||||
"""Resolve a named range to its current computed value."""
|
||||
rng = wb.defined_names[name]
|
||||
sheet, coord = next(rng.destinations)
|
||||
return wb[sheet][coord].value
|
||||
|
||||
revenue_fy24 = nr("RevenueFY24")
|
||||
implied_mid = nr("ImpliedSharePriceBase")
|
||||
```
|
||||
|
||||
Then build deck content using those values:
|
||||
```python
|
||||
slide.shapes.title.text = f"Implied share price of ${implied_mid:.2f} (base case)"
|
||||
```
|
||||
|
||||
Remember to recalculate the workbook before reading it — openpyxl only sees computed values if something has already calculated the sheet. Run the recalc helper in the `excel-author` skill first, or open/save through a real Excel session.
|
||||
|
||||
## Slide-type checklist for pitch decks
|
||||
|
||||
A typical banking pitch deck follows this structure. Not prescriptive, but useful as a starting skeleton:
|
||||
|
||||
1. Cover / title
|
||||
2. Disclaimer
|
||||
3. Table of contents
|
||||
4. Situation overview
|
||||
5. Company snapshot (the target)
|
||||
6. Market / sector context
|
||||
7. Valuation summary (football field) — the money slide
|
||||
8. Trading comps detail
|
||||
9. Precedent transactions detail
|
||||
10. DCF summary
|
||||
11. Illustrative LBO / sponsor case
|
||||
12. Process considerations
|
||||
13. Appendix
|
||||
|
||||
## When NOT to use this skill
|
||||
|
||||
- Users in a live PowerPoint session with an Office MCP available — drive their live doc instead.
|
||||
- Non-financial slideware (quarterly all-hands, marketing decks) — use the broader `powerpoint` skill.
|
||||
- Decks with heavy animation, transitions, or speaker notes — use the broader `powerpoint` skill.
|
||||
|
||||
## Attribution
|
||||
|
||||
Conventions adapted from Anthropic's Claude for Financial Services plugin suite, Apache-2.0 licensed. Original: https://github.com/anthropics/financial-services/tree/main/plugins/agent-plugins/pitch-agent/skills/pptx-author
|
||||
Loading…
Add table
Add a link
Reference in a new issue