SKILL.md
SKILL.mdBrowse 4 files
12,790 tokens
49,130 bytes
Token encoding: o200k_base
Snapshot 24fd22b
1---2name: dcf-model3description: Build discounted cash flow valuation workbooks in Excel.4version: 1.0.05author: Anthropic (adapted by Nous Research)6license: Apache-2.07platforms: [linux, macos, windows]8metadata:9 hermes:10 tags: [finance, valuation, dcf, excel, openpyxl, modeling, investment-banking]11 related_skills: [excel-author, pptx-author, comps-analysis, lbo-model, 3-statement-model]12---13 14## Environment15 16This skill assumes **headless openpyxl** — you are producing an .xlsx file on disk.17Follow the `excel-author` skill's conventions for cell coloring, formulas, named ranges, and sensitivity tables.18Recalculate before delivery: `python /path/to/excel-author/scripts/recalc.py ./out/model.xlsx`.19 20# DCF Model Builder21 22## Overview23 24This skill creates institutional-quality DCF models for equity valuation following investment banking standards. Each analysis produces a detailed Excel model (with sensitivity analysis included at the bottom of the DCF sheet).25 26## Tools27 28- Default to using all of the information provided by the user and MCP servers available for data sourcing.29 30## Critical Constraints - Read These First31 32These constraints apply throughout all DCF model building. Review before starting:33 34**Formulas Over Hardcodes (NON-NEGOTIABLE):**35- Every projection, margin, discount factor, PV, and sensitivity cell MUST be a live Excel formula — never a value computed in Python and written as a number36- When using openpyxl: `ws["D20"] = "=D19*(1+$B$8)"` is correct; `ws["D20"] = calculated_revenue` is WRONG37- The only hardcoded numbers permitted are: (1) raw historical inputs, (2) assumption drivers (growth rates, WACC inputs, terminal g), (3) current market data (share price, debt balance)38- If you catch yourself computing something in Python and writing the result — STOP. The model must flex when the user changes an assumption.39 40**Verify Step-by-Step With the User (DO NOT build end-to-end):**41- After data retrieval → show the user the raw inputs block (revenue, margins, shares, net debt) and confirm before projecting42- After revenue projections → show the projected top line and growth rates, confirm before building margin build43- After FCF build → show the full FCF schedule, confirm logic before computing WACC44- After WACC → show the calculation and inputs, confirm before discounting45- After terminal value + PV → show the equity bridge (EV → equity value → per share), confirm before sensitivity tables46- Catch errors at each stage — a wrong margin assumption discovered after sensitivity tables are built means rebuilding everything downstream47 48**Sensitivity Tables:**49- **Use an ODD number of rows and columns** (standard: 5×5, sometimes 7×7) — this guarantees a true center cell50- **Center cell = base case.** Build the axis values so the middle row header and middle column header exactly equal the model's actual assumptions (e.g., if base WACC = 9.0%, the middle row is 9.0%; if terminal g = 3.0%, the middle column is 3.0%). The center cell's output must therefore equal the model's actual implied share price — this is the sanity check that the table is built correctly.51- **Highlight the center cell** with the medium-blue fill (`#BDD7EE`) + bold font so it's immediately visible which cell is the base case.52- Populate ALL cells (typically 3 tables × 25 cells = 75) with full DCF recalculation formulas53- Use openpyxl loops to write formulas programmatically54- NO placeholder text, NO linear approximations, NO manual steps required55- Each cell must recalculate full DCF for that assumption combination56 57**Cell Comments:**58- Add cell comments AS each hardcoded value is created59- Format: "Source: [System/Document], [Date], [Reference], [URL if applicable]"60- Every blue input must have a comment before moving to next section61- Do not defer to end or write "TODO: add source"62 63**Model Layout Planning:**64- Define ALL section row positions BEFORE writing any formulas65- Write ALL headers and labels first66- Write ALL section dividers and blank rows second67- THEN write formulas using the locked row positions68- Test formulas immediately after creation69 70**Formula Recalculation:**71- Run `python recalc.py model.xlsx 30` before delivery72- Fix ALL errors until status is "success"73- Zero formula errors required (#REF!, #DIV/0!, #VALUE!, etc.)74 75**Scenario Blocks:**76- Create separate blocks for Bear/Base/Bull cases77- Show assumptions horizontally across projection years within each block78- Use IF formulas: `=IF($B$6=1,[Bear cell],IF($B$6=2,[Base cell],[Bull cell]))`79- Verify formulas reference correct scenario block cells80 81## DCF Process Workflow82 83### Step 1: Data Retrieval and Validation84 85Fetch data from MCP servers, user provided data, and the web.86 87**Data Sources Priority:**881. **MCP Servers** (if configured) - Structured financial data from providers like Daloopa892. **User-Provided Data** - Historical financials from their research903. **Web Search/Fetch** - Current prices, beta, debt and cash when needed91 92**Validation Checklist:**93- Verify net debt vs net cash (critical for valuation)94- Confirm diluted shares outstanding (check for recent buybacks/issuances)95- Validate historical margins are consistent with business model96- Cross-check revenue growth rates with industry benchmarks97- Verify tax rate is reasonable (typically 21-28%)98 99### Step 2: Historical Analysis (3-5 years)100 101Analyze and document:102- **Revenue growth trends**: Calculate CAGR, identify drivers103- **Margin progression**: Track gross margin, EBIT margin, FCF margin104- **Capital intensity**: D&A and CapEx as % of revenue105- **Working capital efficiency**: NWC changes as % of revenue growth106- **Return metrics**: ROIC, ROE trends107 108Create summary tables showing:109```110Historical Metrics (LTM):111Revenue: $X million112Revenue growth: X% CAGR113Gross margin: X%114EBIT margin: X%115D&A % of revenue: X%116CapEx % of revenue: X%117FCF margin: X%118```119 120### Step 3: Build Revenue Projections121 122**Methodology:**1231. Start with latest actual revenue (LTM or most recent fiscal year)1242. Apply growth rates for each projection year1253. Show both dollar amounts AND calculated growth %126 127**Growth Rate Framework:**128- Year 1-2: Higher growth reflecting near-term visibility129- Year 3-4: Gradual moderation toward industry average130- Year 5+: Approaching terminal growth rate131 132**Formula structure:**133- Revenue(Year N) = Revenue(Year N-1) × (1 + Growth Rate)134- Growth %(Year N) = Revenue(Year N) / Revenue(Year N-1) - 1135 136**Three-scenario approach:**137```138Bear Case: Conservative growth (e.g., 8-12%)139Base Case: Most likely scenario (e.g., 12-16%)140Bull Case: Optimistic growth (e.g., 16-20%)141```142 143### Step 4: Operating Expense Modeling144 145**Fixed/Variable Cost Analysis:**146 147Operating expenses should model realistic operating leverage:148- **Sales & Marketing**: Typically 15-40% of revenue depending on business model149- **Research & Development**: Typically 10-30% for technology companies150- **General & Administrative**: Typically 8-15% of revenue, shows leverage as company scales151 152**Key principles:**153- ALL percentages based on REVENUE, not gross profit154- Model operating leverage: % should decline as revenue scales155- Maintain separate line items for S&M, R&D, G&A156- Calculate EBIT = Gross Profit - Total OpEx157 158**Margin expansion framework:**159```160Current State → Target State (Year 5)161Gross Margin: X% → Y% (justify based on scale, efficiency)162EBIT Margin: X% → Y% (result of revenue growth + opex leverage)163```164 165### Step 5: Free Cash Flow Calculation166 167**Build FCF in proper sequence:**168 169```170EBIT171(-) Taxes (EBIT × Tax Rate)172= NOPAT (Net Operating Profit After Tax)173(+) D&A (non-cash expense, % of revenue)174(-) CapEx (% of revenue, typically 4-8%)175(-) Δ NWC (change in working capital)176= Unlevered Free Cash Flow177```178 179**Working Capital Modeling:**180- Calculate as % of revenue change (delta revenue)181- Typical range: -2% to +2% of revenue change182- Negative number = source of cash (working capital release)183- Positive number = use of cash (working capital build)184 185**Maintenance vs Growth CapEx:**186- Maintenance CapEx: Sustains current operations (~2-3% revenue)187- Growth CapEx: Supports expansion (additional 2-5% revenue)188- Total CapEx should align with company's growth strategy189 190### Step 6: Cost of Capital (WACC) Research191 192**CAPM Methodology for Cost of Equity:**193 194```195Cost of Equity = Risk-Free Rate + Beta × Equity Risk Premium196 197Where:198- Risk-Free Rate = Current 10-Year Treasury Yield199- Beta = 5-year monthly stock beta vs market index200- Equity Risk Premium = 5.0-6.0% (market standard)201```202 203**Cost of Debt Calculation:**204 205```206After-Tax Cost of Debt = Pre-Tax Cost of Debt × (1 - Tax Rate)207 208Determine Pre-Tax Cost of Debt from:209- Credit rating (if available)210- Current yield on company bonds211- Interest expense / Total Debt from financials212```213 214**Capital Structure Weights:**215 216```217Market Value Equity = Current Stock Price × Shares Outstanding218Net Debt = Total Debt - Cash & Equivalents219Enterprise Value = Market Cap + Net Debt220 221Equity Weight = Market Cap / Enterprise Value222Debt Weight = Net Debt / Enterprise Value223 224WACC = (Cost of Equity × Equity Weight) + (After-Tax Cost of Debt × Debt Weight)225```226 227**Special Cases:**228- **Net Cash Position**: If Cash > Debt, Net Debt is NEGATIVE229 - Debt Weight may be negative230 - WACC calculation adjusts accordingly231- **No Debt**: WACC = Cost of Equity232 233**Typical WACC Ranges:**234- Large Cap, Stable: 7-9%235- Growth Companies: 9-12%236- High Growth/Risk: 12-15%237 238### Step 7: Discount Rate Application (5-10 Year Forecast)239 240**Mid-Year Convention:**241- Cash flows assumed to occur mid-year242- Discount Period: 0.5, 1.5, 2.5, 3.5, 4.5, etc.243- Discount Factor = 1 / (1 + WACC)^Period244 245**Present Value Calculation:**246```247For each projection year:248PV of FCF = Unlevered FCF × Discount Factor249 250Example (Year 1):251FCF = $1,000252WACC = 10%253Period = 0.5254Discount Factor = 1 / (1.10)^0.5 = 0.9535255PV = $1,000 × 0.9535 = $954256```257 258**Projection Period Selection:**259- **5 years**: Standard for most analyses260- **7-10 years**: High growth companies with longer runway261- **3 years**: Mature, stable businesses262 263### Step 8: Terminal Value Calculation264 265**Perpetuity Growth Method (Preferred):**266 267```268Terminal FCF = Final Year FCF × (1 + Terminal Growth Rate)269Terminal Value = Terminal FCF / (WACC - Terminal Growth Rate)270 271Critical Constraint: Terminal Growth < WACC (otherwise infinite value)272```273 274**Terminal Growth Rate Selection:**275- Conservative: 2.0-2.5% (GDP growth rate)276- Moderate: 2.5-3.5%277- Aggressive: 3.5-5.0% (only for market leaders)278 279**Do not exceed**: Risk-free rate or long-term GDP growth280 281**Exit Multiple Method (Alternative):**282```283Terminal Value = Final Year EBITDA × Exit Multiple284 285Where Exit Multiple comes from:286- Industry comparable trading multiples287- Precedent transaction multiples288- Typical range: 8-15x EBITDA289```290 291**Present Value of Terminal Value:**292```293PV of Terminal Value = Terminal Value / (1 + WACC)^Final Period294 295Where Final Period accounts for timing:2965-year model with mid-year convention: Period = 4.5297```298 299**Terminal Value Sanity Check:**300- Should represent 50-70% of Enterprise Value301- If >75%, model may be over-reliant on terminal assumptions302- If <40%, check if terminal assumptions are too conservative303 304### Step 9: Enterprise to Equity Value Bridge305 306**Valuation Summary Structure:**307 308```309(+) Sum of PV of Projected FCFs = $X million310(+) PV of Terminal Value = $Y million311= Enterprise Value = $Z million312 313(-) Net Debt [or + Net Cash if negative] = $A million314= Equity Value = $B million315 316÷ Diluted Shares Outstanding = C million shares317= Implied Price per Share = $XX.XX318 319Current Stock Price = $YY.YY320Implied Return = (Implied Price / Current Price) - 1 = XX%321```322 323**Critical Adjustments:**324- **Net Debt = Total Debt - Cash & Equivalents**325 - If positive: Subtract from EV (reduces equity value)326 - If negative (Net Cash): Add to EV (increases equity value)327- **Use Diluted Shares**: Includes options, RSUs, convertible securities328- **Other adjustments** (if applicable):329 - Minority interests330 - Pension liabilities331 - Operating lease obligations332 333**Valuation Output Format:**334```csv335Valuation Component,Amount ($M)336PV Explicit FCFs,X.X337PV Terminal Value,Y.Y338Enterprise Value,Z.Z339(-) Net Debt,A.A340Equity Value,B.B341,,342Shares Outstanding (M),C.C343Implied Price per Share,$XX.XX344Current Share Price,$YY.YY345Implied Upside/(Downside),+XX%346```347 348### Step 10: Sensitivity Analysis349 350Build **three sensitivity tables** at the bottom of the DCF sheet showing how valuation changes with different assumptions:351 3521. **WACC vs Terminal Growth** - Shows enterprise value sensitivity to discount rate and perpetuity growth3532. **Revenue Growth vs EBIT Margin** - Shows impact of top-line growth and operating leverage3543. **Beta vs Risk-Free Rate** - Shows sensitivity to cost of equity components355 356**Implementation**: These are simple 2D grids (NOT Excel's "Data Table" feature) with formulas in each cell. Each cell must contain a full DCF recalculation for that specific assumption combination. See Critical Constraints section for detailed requirements on populating all 75 cells programmatically using openpyxl.357 358<correct_patterns>359 360This section contains all the CORRECT patterns to follow when building DCF models.361 362### Scenario Block Selection Pattern - Follow This Approach363 364**Assumptions are organized in separate blocks for each scenario:**365 366**CRITICAL STRUCTURE - Three rows per section header:**367 368```csv369BEAR CASE ASSUMPTIONS (section header, merge cells across)370Assumption,FY1,FY2,FY3,FY4,FY5371Revenue Growth (%),12%,10%,9%,8%,7%372EBIT Margin (%),45%,44%,43%,42%,41%373 374BASE CASE ASSUMPTIONS (section header, merge cells across)375Assumption,FY1,FY2,FY3,FY4,FY5376Revenue Growth (%),16%,14%,12%,10%,9%377EBIT Margin (%),48%,49%,50%,51%,52%378 379BULL CASE ASSUMPTIONS (section header, merge cells across)380Assumption,FY1,FY2,FY3,FY4,FY5381Revenue Growth (%),20%,18%,15%,13%,11%382EBIT Margin (%),50%,51%,52%,53%,54%383```384 385**Each scenario block MUST have a column header row** showing the projection years (FY2025E, FY2026E, etc.) immediately below the section title. Without this, users cannot tell which assumption value corresponds to which year.386 387**How to reference assumptions - Create a consolidation column:**3881. Case selector cell (e.g., B6) contains 1=Bear, 2=Base, or 3=Bull3892. Create a consolidation column with INDEX or OFFSET formulas to pull from the correct scenario block3903. Projection formulas reference the consolidation column (clean cell references)3914. Each scenario block contains full set of DCF assumptions across projection years392 393**Recommended consolidation column pattern (using INDEX):**394`=INDEX(B10:D10, 1, $B$6)`395 396**NOT this - scattered IF statements throughout:**397`=IF($B$6=1,[Bear block cell],IF($B$6=2,[Base block cell],[Bull block cell]))`398 399The consolidation column approach centralizes logic and makes the model easier to audit.400 401### Correct Revenue Projection Pattern402 403**Create a consolidation column with INDEX formulas, then reference it in projections:**404 405**Step 1 - Consolidation column for FY1 growth:**406`=INDEX([Bear FY1 growth]:[Bull FY1 growth], 1, $B$6)`407 408**Step 2 - Revenue projection references the consolidation column:**409`Revenue Year 1: =D29*(1+$E$10)`410 411Where:412- D29 = Prior year revenue413- $E$10 = Consolidation column cell for FY1 growth (contains INDEX formula)414- $B$6 = Case selector (1=Bear, 2=Base, 3=Bull)415 416**This approach is cleaner than embedding IF statements in every projection formula** and makes it much easier to audit which scenario assumptions are being used.417 418### Correct FCF Formula Pattern419 420**Use consolidation columns with INDEX formulas, then reference them in FCF calculations:**421 422**Consolidation column approach:**423```csv424Item,Formula,Reference425D&A,=E29*$E$21,$E$21 = consolidation column for D&A %426CapEx,=E29*$E$22,$E$22 = consolidation column for CapEx %427Δ NWC,=(E29-D29)*$E$23,$E$23 = consolidation column for NWC %428Unlevered FCF,=E57+E58-E60-E62,E57=NOPAT E58=D&A E60=CapEx E62=Δ NWC429```430 431**Each consolidation column cell contains an INDEX formula** that pulls from the appropriate scenario block based on case selector. This keeps projection formulas clean and auditable.432 433Before writing formulas, confirm scenario block row locations and set up consolidation columns.434 435### Correct Cell Comment Format436 437**Every hardcoded value needs this format:**438 439"Source: [System/Document], [Date], [Reference], [URL if applicable]"440 441**Examples:**442```csv443Item,Source Comment444Stock price,Source: Market data script 2025-10-12 Close price445Shares outstanding,Source: 10-K FY2024 Page 45 Note 12446Historical revenue,Source: 10-K FY2024 Page 32 Consolidated Statements447Beta,Source: Market data script 2025-10-12 5-year monthly beta448Consensus estimates,Source: Management guidance Q3 2024 earnings call449```450 451### Correct Assumption Table Structure452 453**CRITICAL: Each scenario block requires THREE structural elements:**454 4551. **Section header row** (merged cells): e.g., "BEAR CASE ASSUMPTIONS"4562. **Column header row** showing years - THIS IS REQUIRED, DO NOT SKIP4573. **Data rows** with assumption values458 459**Structure:**460```csv461BEAR CASE ASSUMPTIONS (section header - merge across columns A:G)462Assumption,FY1,FY2,FY3,FY4,FY5463Revenue Growth (%),X%,X%,X%,X%,X%464EBIT Margin (%),X%,X%,X%,X%,X%465Terminal Growth,X%,,,,466WACC,X%,,,,467 468BASE CASE ASSUMPTIONS (section header - merge across columns A:G)469Assumption,FY1,FY2,FY3,FY4,FY5470Revenue Growth (%),X%,X%,X%,X%,X%471EBIT Margin (%),X%,X%,X%,X%,X%472Terminal Growth,X%,,,,473WACC,X%,,,,474 475BULL CASE ASSUMPTIONS (section header - merge across columns A:G)476Assumption,FY1,FY2,FY3,FY4,FY5477Revenue Growth (%),X%,X%,X%,X%,X%478EBIT Margin (%),X%,X%,X%,X%,X%479Terminal Growth,X%,,,,480WACC,X%,,,,481```482 483**WITHOUT the column header row showing projection years (FY2025E, FY2026E, etc.), users cannot tell which assumption value corresponds to which year. This row is MANDATORY.**484 485**Then create a consolidation column** (typically the next column to the right) that uses INDEX formulas to pull from the selected scenario block based on the case selector. This consolidation column is what your projection formulas reference.486 487### Correct Row Planning Process488 489**1. Write ALL headers and labels FIRST:**490```csv491Row,Content4921,[Company Name] DCF Model4932,Ticker | Date | Year End4944,Case Selector4957,KEY ASSUMPTIONS49626,Assumption headers49727-31,Growth assumptions498...,...499```500 501**2. Write ALL section dividers and blank rows**502 503**3. THEN write formulas using the locked row positions**504 505**4. Test formulas immediately after creation**506 507**Think of it like construction:**508- Good: Pour foundation, then build walls (stable structure)509- Bad: Build walls, then pour foundation (walls collapse)510 511**Excel version:**512- Good: Add headers, then write formulas (formulas stable)513- Bad: Write formulas, then add headers (formulas break)514 515### Correct Sensitivity Table Implementation516 517**IMPORTANT**: These are NOT Excel's "Data Table" feature. These are simple grids where you write regular formulas using openpyxl. Yes, this means ~75 formulas total (3 tables × 25 cells each), but this is straightforward and required.518 519**Programmatic Population with Formulas:**520 521Each sensitivity table must be fully populated with formulas that recalculate the implied share price for each combination of assumptions. **Do not use Excel's Data Table feature** (it requires manual intervention and cannot be automated via openpyxl).522 523**Implementation approach - CONCRETE EXAMPLE:**524 525**Table Structure — 5×5 grid (ODD dimensions, base case centered):**526 527If the model's base WACC = 9.0% and base terminal growth = 3.0%, build the axes symmetrically around those values:528 529```csv530WACC vs Terminal Growth, 2.0%, 2.5%, 3.0%, 3.5%, 4.0%531 8.0%, [fml], [fml], [fml], [fml], [fml]532 8.5%, [fml], [fml], [fml], [fml], [fml]533 9.0%, [fml], [fml], [★ ], [fml], [fml] ← middle row = base WACC534 9.5%, [fml], [fml], [fml], [fml], [fml]535 10.0%, [fml], [fml], [fml], [fml], [fml]536 ↑537 middle col = base terminal g538```539 540**★ = the center cell.** Its formula output MUST equal the model's actual implied share price (from the valuation summary). Apply the medium-blue fill (`#BDD7EE`) and bold font to this cell so the base case is visually anchored.541 542**Rule for axis values:** `axis_values = [base - 2*step, base - step, base, base + step, base + 2*step]` — symmetric around the base, odd count guarantees a center.543 544**Formula Pattern - Cell B88 (WACC=8.0%, Terminal Growth=2.0%):**545 546The formula in B88 should recalculate the implied price using:547- WACC from row header: `$A88` (8.0%)548- Terminal Growth from column header: `B$87` (2.0%)549 550**Recommended approach:** Reference the main DCF calculation but substitute these values.551 552**Example formula structure:**553`=([SUM of PV FCFs using $A88 as discount rate] + [Terminal Value using B$87 as growth rate and $A88 as WACC] - [Net Debt]) / [Shares]`554 555**CRITICAL - Write a formula for EVERY cell in the 5x5 grid (25 cells per table, 75 cells total).** Use openpyxl to write these formulas programmatically in a loop. Do NOT skip this step or leave placeholder text.556 557**Python implementation pattern:**558```python559# Pseudocode for populating sensitivity table560for row_idx, wacc_value in enumerate(wacc_range):561 for col_idx, term_growth_value in enumerate(term_growth_range):562 # Build formula that uses wacc_value and term_growth_value563 formula = f"=<DCF recalc using {wacc_value} and {term_growth_value}>"564 ws.cell(row=start_row+row_idx, column=start_col+col_idx).value = formula565```566 567**The sensitivity tables must work immediately when the model is opened, with no manual steps required from the user.**568 569</correct_patterns>570 571<common_mistakes>572 573This section contains all the WRONG patterns to avoid when building DCF models.574 575### WRONG: Simplified Sensitivity Table Approximations or Placeholder Text576 577**Don't use linear approximations:**578 579```580// WRONG - Linear approximation581B97: =B88*(1+(0.096-0.116)) // Assumes linear relationship582 583// WRONG - Division shortcut584B105: =B88/(1+(E48-0.07)) // Doesn't recalculate full DCF585```586 587**Don't leave placeholder text:**588```589// WRONG - Placeholder note590"Note: Use Excel Data Table feature (Data → What-If Analysis → Data Table) to populate sensitivity tables."591 592// WRONG - Empty cells593[leaving cells blank because "this is complex"]594```595 596**Don't confuse terminology:**597- ❌ "Sensitivity tables need Excel's Data Table feature" (NO - that's a specific Excel tool we can't use)598- ✅ "Sensitivity tables are simple grids with formulas in each cell" (YES - this is what we build)599 600**Why these shortcuts are wrong:**601- Linear approximation formulas don't actually recalculate the DCF - they just apply simple math adjustments602- The relationships are not linear, so the results will be inaccurate603- Placeholder text requires manual user intervention604- Model is not immediately usable when delivered605- Not professional or client-ready606- Empty cells = incomplete deliverable607 608**Common rationalization to REJECT:**609"Writing 75+ formulas feels complex, so I'll leave a note for the user to complete it manually."610 611**Reality:** Writing 75 formulas is straightforward when you use a loop in Python with openpyxl. Each formula follows the same pattern - just substitute the row/column values. This is a required part of the deliverable.612 613**Instead:** Populate every sensitivity cell with formulas that recalculate the full DCF for that specific combination of assumptions614 615### WRONG: Missing Cell Comments616 617**Don't do this:**618- Create all hardcoded inputs without comments619- Think "I'll add them later"620- Write "TODO: add source"621- Leave blue inputs without documentation622 623**Why it's wrong:**624- Can't verify where data came from625- Fails xlsx skill requirements626- Not audit-ready627- Wastes time fixing later628 629**Instead:** Add cell comment AS EACH hardcoded value is created630 631### WRONG: Formula Row References Off632 633**Symptom:**634The FCF section references wrong assumption rows:635`D&A: =E29*$E$34 // Should be $E$21, but referencing wrong row`636`CapEx: =E29*$E$41 // Should be $E$22, but row shifted`637 638**Why this happens:**6391. Formulas written first6402. Then headers inserted6413. All row references shifted6424. Now formulas point to wrong cells → #REF! errors643 644**Instead:** Lock row layout FIRST, then write formulas645 646### WRONG: Single Row for Each Assumption Across Scenarios647 648**Don't structure assumptions like this:**649```csv650Assumption,Bear,Base,Bull651Revenue Growth FY1,10%,13%,16%652Revenue Growth FY2,9%,12%,15%653```654This vertical layout makes it hard to see the progression across years within each scenario.655 656**Why it's wrong:**657- Makes it difficult to see assumptions evolving across years within each scenario658- Harder to compare scenario assumptions across full projection period659- Less intuitive for reviewing scenario logic660 661**Instead:**662- Create separate blocks for each scenario (Bear, Base, Bull)663- Within each block, show assumptions horizontally across projection years664- This makes each scenario's assumptions easier to review as a cohesive set665 666### WRONG: No Borders667 668**Don't deliver a model without borders:**669- No section delineation670- All cells blend together671- Hard to read and unprofessional672 673**Why it's wrong:**674- Not client-ready675- Difficult to navigate676- Looks amateur677 678**Instead:** Add borders around all major sections679 680### WRONG: Wrong Font Colors or No Font Color Distinction681 682**Don't do this:**683- All text is black684- Only use fill colors (no font color changes)685- Mix up which cells are blue vs black686 687**Why it's wrong:**688- Can't distinguish inputs from formulas689- Auditing becomes impossible690- Violates xlsx skill requirements691 692**Instead:** Blue text for ALL hardcoded inputs, black text for ALL formulas, green for sheet links693 694### WRONG: Operating Expenses Based on Gross Profit695 696**Don't do this:**697`S&M: =E33*0.15 // E33 = Gross Profit (WRONG)`698 699**Why it's wrong:**700- Operating expenses scale with revenue, not gross profit701- Produces unrealistic margin progression702- Not how businesses actually operate703 704**Instead:**705`S&M: =E29*0.15 // E29 = Revenue (CORRECT)`706 707### TOP 5 ERRORS SUMMARY708 7091. **Formula row references off** → Define ALL row positions BEFORE writing formulas7102. **Missing cell comments** → Add comments AS cells are created, not at end7113. **Simplified sensitivity tables** → Populate all cells with full DCF recalc formulas, not approximations7124. **Scenario block references wrong** → Ensure IF formulas pull from correct Bear/Base/Bull blocks7135. **No borders** → Add professional section borders for client-ready appearance714 715In addition, be aware of these errors:716 717### WACC Calculation Errors718- Mixing book and market values in capital structure719- Using equity beta instead of asset/unlevered beta incorrectly720- Wrong tax rate application to cost of debt721- Incorrect risk-free rate (must use current 10Y Treasury)722- Failure to adjust for net debt vs net cash position723 724### Growth Assumption Flaws725- Terminal growth > WACC (creates infinite value)726- Projection growth rates inconsistent with historical performance727- Ignoring industry growth constraints728- Revenue growth not aligned with unit economics729- Margin expansion without operational justification730 731### Terminal Value Mistakes732- Using wrong growth method (perpetuity vs exit multiple)733- Terminal value >80% of enterprise value (suggests over-reliance)734- Inconsistent terminal margins with steady state assumptions735- Wrong discount period for terminal value736 737### Cash Flow Projection Errors738- Operating expenses based on gross profit instead of revenue739- D&A/CapEx percentages misaligned with business model740- Working capital changes not properly calculated741- Tax rate inconsistency between years742- NOPAT calculation errors743 744**These errors are the most common. Re-read this section before starting any DCF build.**745 746</common_mistakes>747 748## Excel File Creation749 750**This skill uses the `xlsx` skill for all spreadsheet operations.** The xlsx skill provides:751- Standardized formula construction rules752- Number formatting conventions753- Automated formula recalculation via `recalc.py` script754- Comprehensive error checking and validation755 756All Excel files created by this skill must follow xlsx skill requirements, including zero formula errors and proper recalculation.757 758## Quality Rubric759 760Every DCF model must maximize for:7611. **Realistic revenue and margin assumptions** based on historical performance7622. **Appropriate cost of capital calculation** with proper CAPM methodology7633. **Comprehensive sensitivity analysis** showing valuation ranges7644. **Clear terminal value calculation** with supporting rationale7655. **Professional model structure** enabling scenario analysis7666. **Transparent documentation** of all key assumptions767 768## Input Requirements769 770### Minimum Required Inputs7711. **Company identifier**: Ticker symbol or company name7722. **Growth assumptions**: Revenue growth rates for projection period (or "use consensus")7733. **Optional parameters**:774 - Projection period (default: 5 years)775 - Scenario cases (Bear/Base/Bull growth and margin assumptions)776 - Terminal growth rate (default: 2.5-3.0%)777 - Specific WACC inputs if not using CAPM778 779## Excel Model Structure780 781### Sheet Architecture782 783Create **two sheets**:784 7851. **DCF** - Main valuation model with sensitivity analysis at bottom7862. **WACC** - Cost of capital calculation787 788**CRITICAL**: Sensitivity tables go at the BOTTOM of the DCF sheet (not on a separate sheet). This keeps all valuation outputs together.789 790### Formula Recalculation (MANDATORY)791 792After creating or modifying the Excel model, **recalculate all formulas** using the `recalc.py` script from the `excel-author` skill:793 794```bash795python recalc.py [path_to_excel_file] [timeout_seconds]796```797 798Example:799```bash800python recalc.py AAPL_DCF_Model_2025-10-12.xlsx 30801```802 803The script will:804- Recalculate all formulas in all sheets using LibreOffice805- Scan ALL cells for Excel errors (#REF!, #DIV/0!, #VALUE!, #NAME?, #NULL!, #NUM!, #N/A)806- Return detailed JSON with error locations and counts807 808**Expected output format:**809```json810{811 "status": "success", // or "errors_found"812 "total_errors": 0, // Total error count813 "total_formulas": 42, // Number of formulas in file814 "error_summary": {} // Only present if errors found815}816```817 818**If errors are found**, the output will include details:819```json820{821 "status": "errors_found",822 "total_errors": 2,823 "total_formulas": 42,824 "error_summary": {825 "#REF!": {826 "count": 2,827 "locations": ["DCF!B25", "DCF!C25"]828 }829 }830}831```832 833**Fix all errors** and re-run recalc.py until status is "success" before delivering the model.834 835### Formatting Standards836 837**IMPORTANT**: Follow the xlsx skill for formula construction rules and number formatting conventions. The DCF skill adds specific visual presentation standards.838 839**Color Scheme - Two Layers**:840 841**Layer 1: Font Colors (MANDATORY from xlsx skill)**842- **Blue text (RGB: 0,0,255)**: ALL hardcoded inputs (stock price, shares, historical data, assumptions)843- **Black text (RGB: 0,0,0)**: ALL formulas and calculations844- **Green text (RGB: 0,128,0)**: Links to other sheets (WACC sheet references)845 846**Layer 2: Fill Colors — Professional Blue/Grey Palette (Default unless user specifies otherwise)**847- **Keep it minimal** — use only blues and greys for fills. Do NOT introduce greens, yellows, oranges, or multiple accent colors. A model with too many colors looks amateurish.848- **Default fill palette:**849 - **Section headers**: Dark blue (RGB: 31,78,121 / `#1F4E79`) background with white bold text850 - **Sub-headers/column headers**: Light blue (RGB: 217,225,242 / `#D9E1F2`) background with black bold text851 - **Input cells**: Light grey (RGB: 242,242,242 / `#F2F2F2`) background with blue font — or just white with blue font if you want maximum minimalism852 - **Calculated cells**: White background with black font853 - **Output/summary rows** (per-share value, EV, etc.): Medium blue (RGB: 189,215,238 / `#BDD7EE`) background with black bold font854- **That's it — 3 blues + 1 grey + white.** Resist the urge to add more.855- User-provided templates or explicit color preferences ALWAYS override these defaults.856 857**How the layers work together:**858- Input cell: Blue font + light grey fill = "Hardcoded input"859- Formula cell: Black font + white background = "Calculated value"860- Sheet link: Green font + white background = "Reference from another sheet"861- Key output: Black bold font + medium blue fill = "This is the answer"862 863**Font color tells you WHAT it is (input/formula/link). Fill color tells you WHERE you are (header/data/output).**864 865### Border Standards (REQUIRED for Professional Appearance)866 867**Thick borders** (1.5pt) around major sections:868- KEY INPUTS section869- PROJECTION ASSUMPTIONS section870- 5-YEAR CASH FLOW PROJECTION section871- TERMINAL VALUE section872- VALUATION SUMMARY section873- Each SENSITIVITY ANALYSIS table874 875**Medium borders** (1pt) between sub-sections:876- Company Details vs Historical Performance877- Growth Assumptions vs EBIT Margin vs FCF Parameters878 879**Thin borders** (0.5pt) around data tables:880- Scenario assumption tables (Bear | Base | Bull | Selected)881- Historical vs projected financials matrix882 883**No borders:** Individual cells within tables (keep clean, scannable)884 885**Borders are mandatory** - models without professional borders are not client-ready.886 887**Number Formats** (follows xlsx skill standards):888- **Years**: Format as text strings (e.g., "2024" not "2,024")889- **Percentages**: `0.0%` (one decimal place)890- **Currency**: `$#,##0` for millions; `$#,##0.00` for per-share - ALWAYS specify units in headers ("Revenue ($mm)")891- **Zeros**: Use number formatting to make all zeros "-" (e.g., `$#,##0;($#,##0);-`)892- **Large numbers**: `#,##0` with thousands separator893- **Negative numbers**: `(#,##0)` in parentheses (NOT minus sign)894 895**Cell Comments (MANDATORY for all hardcoded inputs)**:896 897Per the xlsx skill, ALL hardcoded values must have cell comments documenting the source. Format: "Source: [System/Document], [Date], [Reference], [URL if applicable]"898 899**CRITICAL**: Add comments AS CELLS ARE CREATED. Do not defer to the end.900 901### DCF Sheet Detailed Structure902 903**Section 1: Header**904```csv905Row,Content9061,[Company Name] DCF Model9072,Ticker: [XXX] | Date: [Date] | Year End: [FYE]9083,Blank9094,Case Selector Cell (1=Bear 2=Base 3=Bull)9105,Case Name Display (formula: =IF([Selector]=1"Bear"IF([Selector]=2"Base""Bull")))911```912 913**Section 2: Market Data (NOT case dependent)**914```csv915Item,Value916Current Stock Price,$XX.XX917Shares Outstanding (M),XX.X918Market Cap ($M),[Formula]919Net Debt ($M),XXX [or Net Cash if negative]920```921 922**Section 3: DCF Scenario Assumptions**923 924Create separate assumption blocks for each scenario (Bear, Base, Bull) with DCF-specific assumptions (Revenue Growth %, EBIT Margin %, Tax Rate %, D&A % of Revenue, CapEx % of Revenue, NWC Change % of ΔRev, Terminal Growth Rate, WACC) laid out horizontally across projection years. Each block must include section header, column header row showing the projection years (FY1, FY2, etc.), and data rows. See `<correct_patterns>` section "Correct Assumption Table Structure" for the exact layout.925 926**Section 4: Historical & Projected Financials**927 928**Reference a consolidation column (e.g., "Selected Case") that pulls from scenario blocks**, not scattered IF formulas in every projection row.929 930```csv931Income Statement ($M),2020A,2021A,2022A,2023A,2024E,2025E,2026E932Revenue,XXX,XXX,XXX,XXX,[=E29*(1+$E$10)],[=F29*(1+$E$11)],[=G29*(1+$E$12)]933 % growth,XX%,XX%,XX%,XX%,[=E29/D29-1],[=F29/E29-1],[=G29/F29-1]934,,,,,,935Gross Profit,XXX,XXX,XXX,XXX,[=E29*E33],[=F29*F33],[=G29*G33]936 % margin,XX%,XX%,XX%,XX%,[=E33/E29],[=F33/F29],[=G33/G29]937,,,,,,938Operating Expenses:,,,,,,,939 S&M,XXX,XXX,XXX,XXX,[=E29*0.15],[=F29*0.14],[=G29*0.13]940 R&D,XXX,XXX,XXX,XXX,[=E29*0.12],[=F29*0.11],[=G29*0.10]941 G&A,XXX,XXX,XXX,XXX,[=E29*0.08],[=F29*0.07],[=G29*0.07]942 Total OpEx,XXX,XXX,XXX,XXX,[=E36+E37+E38],[=F36+F37+F38],[=G36+G37+G38]943,,,,,,944EBIT,XXX,XXX,XXX,XXX,[=E33-E39],[=F33-F39],[=G33-G39]945 % margin,XX%,XX%,XX%,XX%,[=E41/E29],[=F41/F29],[=G41/G29]946,,,,,,947Taxes,(XX),(XX),(XX),(XX),[=E41*$E$24],[=F41*$E$24],[=G41*$E$24]948 Tax rate,XX%,XX%,XX%,XX%,[=E43/E41],[=F43/F41],[=G43/G41]949,,,,,,950NOPAT,XXX,XXX,XXX,XXX,[=E41-E43],[=F41-F43],[=G41-G43]951```952 953**Key Formula Pattern**:954- Revenue growth: `=E29*(1+$E$10)` where $E$10 is consolidation column for Year 1 growth955- NOT: `=E29*(1+IF($B$6=1,$B$10,IF($B$6=2,$C$10,$D$10)))`956 957This approach is cleaner, easier to audit, and prevents formula errors by centralizing the scenario logic.958 959**Section 5: Free Cash Flow Build**960 961**CRITICAL**: Verify row references point to the CORRECT assumption rows. Test formulas immediately after creation.962 963```csv964Cash Flow ($M),2020A,2021A,2022A,2023A,2024E,2025E,2026E965NOPAT,XXX,XXX,XXX,XXX,[=E45],[=F45],[=G45]966(+) D&A,XXX,XXX,XXX,XXX,[=E29*$E$21],[=F29*$E$21],[=G29*$E$21]967 % of Rev,XX%,XX%,XX%,XX%,[=E58/E29],[=F58/F29],[=G58/G29]968(-) CapEx,(XX),(XX),(XX),(XX),[=E29*$E$22],[=F29*$E$22],[=G29*$E$22]969 % of Rev,XX%,XX%,XX%,XX%,[=E60/E29],[=F60/F29],[=G60/G29]970(-) Δ NWC,(XX),(XX),(XX),(XX),[=(E29-D29)*$E$23],[=(F29-E29)*$E$23],[=(G29-F29)*$E$23]971 % of Δ Rev,XX%,XX%,XX%,XX%,[=E62/(E29-D29)],[=F62/(F29-E29)],[=G62/(G29-F29)]972,,,,,,973Unlevered FCF,XXX,XXX,XXX,XXX,[=E57+E58-E60-E62],[=F57+F58-F60-F62],[=G57+G58-G60-G62]974```975 976**Row reference examples** (based on layout planning):977- $E$21 = D&A % assumption (consolidation column, row 21)978- $E$22 = CapEx % assumption (consolidation column, row 22)979- $E$23 = NWC % assumption (consolidation column, row 23)980- E29 = Revenue for year (row 29)981- E45 = NOPAT for year (row 45)982 983**Before writing formulas**: Confirm these row numbers match the actual layout. Test one column, then copy across.984 985**Section 6: Discounting & Valuation**986```csv987DCF Valuation,2024E,2025E,2026E,2027E,2028E,Terminal988Unlevered FCF ($M),XXX,XXX,XXX,XXX,XXX,989Period,0.5,1.5,2.5,3.5,4.5,990Discount Factor,0.XX,0.XX,0.XX,0.XX,0.XX,991PV of FCF ($M),XXX,XXX,XXX,XXX,XXX,992,,,,,,993Terminal FCF ($M),,,,,,,XXX994Terminal Value ($M),,,,,,,XXX995PV Terminal Value ($M),,,,,,,XXX996,,,,,,997Valuation Summary ($M),,,,,,998Sum of PV FCFs,XXX,,,,,999PV Terminal Value,XXX,,,,,1000Enterprise Value,XXX,,,,,1001(-) Net Debt,(XX),,,,,1002Equity Value,XXX,,,,,1003,,,,,,1004Shares Outstanding (M),XX.X,,,,,1005IMPLIED PRICE PER SHARE,$XX.XX,,,,,1006Current Stock Price,$XX.XX,,,,,1007Implied Upside/(Downside),XX%,,,,,1008```1009 1010### WACC Sheet Structure1011 1012```csv1013COST OF EQUITY CALCULATION,,1014Risk-Free Rate (10Y Treasury),X.XX%,[Yellow input]1015Beta (5Y monthly),X.XX,[Yellow input]1016Equity Risk Premium,X.XX%,[Yellow input]1017Cost of Equity,X.XX%,[Calculated blue]1018,,1019COST OF DEBT CALCULATION,,1020Credit Rating,AA-,[Yellow input]1021Pre-Tax Cost of Debt,X.XX%,[Yellow input]1022Tax Rate,XX.X%,[Link to DCF sheet]1023After-Tax Cost of Debt,X.XX%,[Calculated blue]1024,,1025CAPITAL STRUCTURE,,1026Current Stock Price,$XX.XX,[Link to DCF]1027Shares Outstanding (M),XX.X,[Link to DCF]1028Market Capitalization ($M),"X,XXX",[Calculated]1029,,1030Total Debt ($M),XXX,[Yellow input]1031Cash & Equivalents ($M),XXX,[Yellow input]1032Net Debt ($M),XXX,[Calculated]1033,,1034Enterprise Value ($M),"X,XXX",[Calculated]1035,,1036WACC CALCULATION,Weight,Cost,Contribution1037Equity,XX.X%,X.X%,X.XX%1038Debt,XX.X%,X.X%,X.XX%1039,,1040WEIGHTED AVERAGE COST OF CAPITAL,X.XX%,[Green output]1041```1042 1043**Key WACC Formulas:**1044```1045Market Cap = Price × Shares1046Net Debt = Total Debt - Cash1047Enterprise Value = Market Cap + Net Debt1048Equity Weight = Market Cap / EV1049Debt Weight = Net Debt / EV1050WACC = (Cost of Equity × Equity Weight) + (After-tax Cost of Debt × Debt Weight)1051```1052 1053### Sensitivity Analysis (Bottom of DCF Sheet)1054 1055**TERMINOLOGY REMINDER**: "Sensitivity tables" = simple 2D grids with row headers, column headers, and formulas in each data cell. NOT Excel's "Data Table" feature (Data → What-If Analysis → Data Table). You will use openpyxl to write regular Excel formulas into each cell.1056 1057**Location**: Rows 87+ on DCF sheet (NOT a separate sheet)1058 1059**Three sensitivity tables, vertically stacked:**1060 10611. **WACC vs Terminal Growth** (rows 87-100) - 5x5 grid = 25 cells with formulas10622. **Revenue Growth vs EBIT Margin** (rows 102-115) - 5x5 grid = 25 cells with formulas10633. **Beta vs Risk-Free Rate** (rows 117-130) - 5x5 grid = 25 cells with formulas1064 1065**Total formulas to write: 75** (this is required, not optional)1066 1067**CRITICAL**: All sensitivity table cells must be populated programmatically with formulas using openpyxl. DO NOT use linear approximation shortcuts. DO NOT leave placeholder text or notes about manual steps. DO NOT rationalize leaving cells empty because "it's complex" - use a Python loop to generate the formulas.1068 1069**Table Setup:**10701. Create table structure with row/column headers (the assumption values to test)10712. Populate EVERY data cell with a formula that:1072 - Uses the row header value (e.g., WACC = 9.0%)1073 - Uses the column header value (e.g., Terminal Growth = 3.0%)1074 - Recalculates the full DCF with those specific assumptions1075 - Returns the implied share price for that scenario10763. All cells must contain working formulas when delivered10774. Format cells with conditional formatting: Green scale for higher values, red scale for lower values10785. Bold the base case cell10796. Leave 1-2 blank rows between tables1080 1081**No manual intervention required** - the sensitivity tables must be fully functional when the user opens the file.1082 1083## Case Selector Implementation1084 1085**Three-Case Framework:**1086 1087### Bear Case1088- Conservative revenue growth (low end of historical range)1089- Margin compression or no expansion1090- Higher WACC (risk premium increase)1091- Lower terminal growth rate1092- Higher CapEx assumptions1093 1094### Base Case1095- Consensus or management guidance revenue growth1096- Moderate margin expansion based on operating leverage1097- Current market-implied WACC1098- GDP-aligned terminal growth (2.5-3.0%)1099- Standard CapEx assumptions1100 1101### Bull Case1102- Optimistic revenue growth (high end of projections)1103- Significant margin expansion1104- Lower WACC (reduced risk premium)1105- Higher terminal growth (3.5-5.0%)1106- Reduced CapEx intensity1107 1108**Formula Implementation:**1109 1110**DO NOT use nested IF formulas scattered throughout.** Instead, create a consolidation column that uses INDEX or OFFSET formulas to pull from the appropriate scenario block.1111 1112**Recommended pattern (using INDEX):**1113`=INDEX(B10:D10, 1, $B$6)` where `B10:D10` = Bear/Base/Bull values, `1` = row offset, `$B$6` = case selector cell (1, 2, or 3)1114 1115**Then reference the consolidation column** in all projections:1116`Revenue Year 1: =D29*(1+$E$10)` where $E$10 is the consolidation column value for Year 1 growth.1117 1118This approach centralizes scenario logic, making the model easier to audit and maintain.1119 1120## Deliverables Structure1121 1122**File naming**: `[Ticker]_DCF_Model_[Date].xlsx`1123 1124**Two sheets**:11251. **DCF** - Complete model with Bear/Base/Bull cases + three sensitivity tables at bottom (WACC vs Terminal Growth, Revenue Growth vs EBIT Margin, Beta vs Risk-Free Rate)11262. **WACC** - Cost of capital calculation1127 1128**Key features**: Case selector (1/2/3), consolidation column with INDEX/OFFSET formulas, color-coded cells, cell comments on all inputs, professional borders1129 1130## Best Practices1131 1132### Model Construction11331. **Build incrementally**: Complete each section before moving to next11342. **Test as building**: Enter sample numbers to verify formulas11353. **Use consistent structure**: Similar calculations follow similar patterns11364. **Comment complex formulas**: Add notes for unusual calculations11375. **Build in checks**: Sum checks and balance checks where applicable1138 1139### Documentation11401. **Document all assumptions**: Explain reasoning behind key inputs11412. **Cite data sources**: Note where each data point came from11423. **Explain methodology**: Describe any non-standard approaches11434. **Flag uncertainties**: Highlight areas with limited visibility1144 1145### Quality Control11461. **Cross-check calculations**: Verify math in multiple ways11472. **Stress test assumptions**: Run sensitivity to ensure model is robust11483. **Peer review**: Have someone else check formulas11494. **Version control**: Save versions as work progresses1150 1151## Common Variations1152 1153### High-Growth Technology Companies1154- Longer projection period (7-10 years)1155- Higher initial growth rates (20-30%)1156- Significant margin expansion over time1157- Higher WACC (12-15%)1158- Model unit economics (users, ARPU, etc.)1159 1160### Mature/Stable Companies1161- Shorter projection period (3-5 years)1162- Modest growth rates (GDP +1-3%)1163- Stable margins1164- Lower WACC (7-9%)1165- Focus on cash generation and capital allocation1166 1167### Cyclical Companies1168- Model through economic cycle1169- Normalize margins at mid-cycle1170- Consider trough and peak scenarios1171- Adjust beta for cyclicality1172 1173### Multi-Segment Companies1174- Separate DCFs for each business unit1175- Different growth rates and margins by segment1176- Sum-of-parts valuation1177- Consider synergies1178 1179## Troubleshooting1180 1181**If you encounter errors or unreasonable results, read [TROUBLESHOOTING.md](./TROUBLESHOOTING.md) for detailed debugging guidance.**1182 1183## Workflow Integration1184 1185### At Start of DCF Build1186 11871. **Gather market data**:1188 - Check for available MCP servers for current market data1189 - Use web search/fetch for stock prices, beta, and other market metrics1190 - Request from user if specific data is needed1191 11922. **Gather historical financials**:1193 - Check for available MCP servers (Daloopa, etc.)1194 - Request from user if not available via MCP1195 - Manual extraction from 10-Ks if necessary1196 11973. **Begin model construction** using the DCF methodology detailed in this skill1198 1199### During Model Construction1200 12011. **Build Excel model** using openpyxl with formulas (not hardcoded values)12022. **Follow xlsx skill conventions** for formula construction and formatting12033. **Apply fill colors only if requested** by user or if specific brand guidelines are provided1204 1205### Before Delivering Model (MANDATORY)1206 12071. **Verify structure**:1208 - Scenario blocks for Bear/Base/Bull with assumptions across projection years1209 - Case selector functional with formulas referencing correct scenario blocks1210 - Sensitivity tables at bottom of DCF sheet (not separate sheet)1211 - Font colors: Blue inputs, black formulas, green sheet links1212 - Cell comments on ALL hardcoded inputs1213 - Professional borders around major sections1214 12152. **Recalculate formulas**: Run `python recalc.py model.xlsx 30`1216 12173. **Check output**:1218 - If `status` is `"success"` → Continue to step 41219 - If `status` is `"errors_found"` → Check `error_summary` and read [TROUBLESHOOTING.md](./TROUBLESHOOTING.md) for debugging guidance1220 12214. **Fix errors and re-run recalc.py** until status is "success"1222 12235. **Spot-check formulas**:1224 - Test one FCF formula - does it reference the correct assumption rows?1225 - Change case selector - does the consolidation column update properly?1226 - Verify revenue formulas reference consolidation column (not nested IF formulas)1227 12286. **Deliver model**1229 1230### Available Data Sources1231 1232- **MCP servers**: If configured (Daloopa for historical financials)1233- **Web search/fetch**: For current stock prices, beta, and market data1234- **User-provided data**: Historical financials, consensus estimates1235- **Manual extraction**: SEC EDGAR filings as fallback1236 1237## Final Output Checklist1238 1239Before delivering DCF model:1240 1241**Required:**1242- Run `python recalc.py model.xlsx 30` until status is "success" (zero formula errors)1243- Two sheets: DCF (with sensitivity at bottom), WACC1244- Font colors: Blue=inputs, Black=formulas, Green=sheet links1245- Cell comments on ALL hardcoded inputs1246- Sensitivity tables fully populated with formulas1247- Professional borders around major sections1248 1249**Validation:**1250- OpEx based on revenue (not gross profit)1251- Terminal value 50-70% of EV1252- Terminal growth < WACC1253- Tax rate 21-28%1254- File naming: `[Ticker]_DCF_Model_[Date].xlsx`1255 1256## Data sources — MCP first, web fallback1257 1258Many 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:1259 1260- **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.1261- **Otherwise**, fall back to:1262 - `web_search` / `web_extract` against SEC EDGAR (`https://www.sec.gov/cgi-bin/browse-edgar`) for US filings1263 - Company IR pages for press releases, earnings decks1264 - `browser_navigate` for interactive data portals1265 - User-provided data (explicitly ask when the context doesn't have it)1266- **Never fabricate**. If a multiple, precedent, or filing number can't be sourced, flag the cell as `[UNSOURCED]` and surface it to the user.1267 1268## Attribution1269 1270This 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-services1271 Discovery context
Discovered by repository scan. No exact path reference found in the snapshot’s root AGENTS.md.