Skip to content
Skillpedia
Analysis & spreadsheets41k Β· #6582

dcf-model

What it does

This skill guides the AI agent to estimate what a company is worth using discounted cash flow. It is for analysts and investors who want a valuation backed by a full spreadsheet.

When to use it

  • βœ“When you want to value a company using discounted cash flow.
  • βœ“When you need to know how sensitive a valuation is to growth or discount rate changes.
  • βœ“When you want an intrinsic value estimate with an executive summary.

Skill link

https://github.com/anthropics/financial-services/blob/main/plugins/agent-plugins/model-builder/skills/dcf-model/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/anthropics/financial-services/blob/main/plugins/agent-plugins/model-builder/skills/dcf-model/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œBuild a DCF model for this company with five-year projections, a WACC, and sensitivity tables.”

5 new skills a week. 1 minute to read.

How it works

The agent gathers financial data, projects cash flows, and calculates a discount rate. It then discounts everything to a present value and shows sensitivity tables, all in a spreadsheet.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

DCF Model Builder

Overview

This 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).

Tools

  • Default to using all of the information provided by the user and MCP servers available for data sourcing.

Critical Constraints - Read These First

These constraints apply throughout all DCF model building. Review before starting:

Environment: Office JS vs Python/openpyxl:

  • If running inside Excel (Office Add-in / Office JS environment): Use Office JS directly β€” do NOT use Python/openpyxl. Write formulas via range.formulas = [["=D19*(1+$B$8)"]]. No separate recalc step needed; Excel calculates natively. Use range.format.* for styling. The same formulas-over-hardcodes rule applies: set .formulas, never .values for derived cells.
  • If generating a standalone .xlsx file (no live Excel session): Use Python/openpyxl as described below, then run recalc.py before delivery.
  • The rest of this skill uses openpyxl examples β€” translate to Office JS API calls when in that environment, but all principles (formula strings, cell comments, section checkpoints, sensitivity table loops) apply identically.

⚠️ Office JS merged cell pitfall: When building section headers with merged cells, do NOT call .merge() then set .values on the merged range β€” Office JS still reports the range's original dimensions and will throw InvalidArgument: The number of rows or columns in the input array doesn't match the size or dimensions of the range. Instead, write the value to the top-left cell alone, then merge and format the full range:

// WRONG β€” throws InvalidArgument:
const hdr = ws.getRange("A7:H7");
hdr.merge();
hdr.values = [["MARKET DATA & KEY INPUTS"]];  // 1Γ—1 array vs 1Γ—8 range β†’ fails

// CORRECT β€” value first on single cell, then merge + format the range:
ws.getRange("A7").values = [["MARKET DATA & KEY INPUTS"]];
const hdr = ws.getRange("A7:H7");
hdr.merge();
hdr.format.fill.color = "#1F4E79";
hdr.format.font.bold = true;
hdr.format.font.color = "#FFFFFF";

This applies to every merged section header in the DCF (market data, scenario blocks, cash flow projection, terminal value, valuation summary, sensitivity tables).

Formulas Over Hardcodes (NON-NEGOTIABLE):

  • 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 number
  • When using openpyxl: ws["D20"] = "=D19*(1+$B$8)" is correct; ws["D20"] = calculated_revenue is WRONG
  • 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)
  • If you catch yourself computing something in Python and writing the result β€” STOP. The model must flex when the user changes an assumption.

Verify Step-by-Step With the User (DO NOT build end-to-end):

  • After data retrieval β†’ show the user the raw inputs block (revenue, margins, shares, net debt) and confirm before projecting
  • After revenue projections β†’ show the projected top line and growth rates, confirm before building margin build
  • After FCF build β†’ show the full FCF schedule, confirm logic before computing WACC
  • After WACC β†’ show the calculation and inputs, confirm before discounting
  • After terminal value + PV β†’ show the equity bridge (EV β†’ equity value β†’ per share), confirm before sensitivity tables
  • Catch errors at each stage β€” a wrong margin assumption discovered after sensitivity tables are built means rebuilding everything downstream

Sensitivity Tables:

  • Use an ODD number of rows and columns (standard: 5Γ—5, sometimes 7Γ—7) β€” this guarantees a true center cell
  • 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.
  • Highlight the center cell with the medium-blue fill (#BDD7EE) + bold font so it's immediately visible which cell is the base case.
  • Populate ALL cells (typically 3 tables Γ— 25 cells = 75) with full DCF recalculation formulas
  • Use open
FAQ

Where does the financial data come from?

The skill uses the data you provide and connected sources, with SEC filings among the sources it can use.

Does it include sensitivity tables?

Yes. The sensitivity tables appear at the bottom of the DCF sheet.

Can it work inside Excel?

Yes. It can work in an open Excel add-in or produce a standalone spreadsheet file.

Details

Original description by the author

Real DCF (Discounted Cash Flow) model creation for equity valuation. Retrieves financial data from SEC filings and analyst reports, builds comprehensive cash flow projections with proper WACC calculations, performs sensitivity analysis, and outputs professional Excel models with executive summaries. Use when users need to value a company using DCF methodology, request intrinsic value analysis, or ask for detailed financial modeling with growth projections and terminal value calculations.

repo: anthropics/financial-services

Popularity

GitHub stars
41k
Ranking position
#6582
License
Apache-2.0
Updated
10/28/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills