dcf-valuation-engine

基于价值驱动因素进行内在(折现现金流)估值:逐年预测現金流,考虑增长、利润率与再投资率的逐步衰减,以终值收尾,并根据失败风险进行调整;由经营性资产价值推导至每股股权价值,并运行敏感性分析网格。亦可反向推导市场价格所隐含的增长率或利润率。适用于构建 DCF/FCFF/FCFE 模型、计算终值或每股价值以及估值敏感性分析。

仓库最近推送
GitHub Stars
206
Forks
28
Issues / PRs
3

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "dcf-valuation-engine":https://skillpi.com/zh/skills/deepskill-e6735464ea7dad1f9a2fcbf1ec225d52b9e75546cbcb955e2d2f6804b681d0f8。安装前核对上游来源和版本:https://github.com/lyndonkl/claude。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

基于价值驱动因素进行内在(折现现金流)估值:逐年预测現金流,考虑增长、利润率与再投资率的逐步衰减,以终值收尾,并根据失败风险进行调整;由经营性资产价值推导至每股股权价值,并运行敏感性分析网格。亦可反向推导市场价格所隐含的增长率或利润率。适用于构建 DCF/FCFF/FCFE 模型、计算终值或每股价值以及估值敏感性分析。

0 下载

介绍来源: third_party · lyndonkl · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
输入和输出
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: dcf-valuation-engine
description: Runs an intrinsic (discounted cash flow) valuation from value drivers — builds the year-by-year forecast with fading growth, margins and reinvestment, closes it with a terminal value, adjusts for failure risk, walks the bridge from operating assets to equity value per share, and runs sensitivity grids. Also reverse-engineers the market price into the growth or margin it already assumes. Use when valuing a company intrinsically, building a DCF or FCFF/FCFE model, computing terminal value or value per share, running valuation sensitivity, or asking what the market is pricing in.

DCF valuation engine

A discounted cash flow valuation is four judgments and a lot of arithmetic. The judgments are how fast revenue grows, what margin it eventually earns, how much capital that growth costs, and how risky the whole thing is. The arithmetic is here, so you can spend your effort on the four numbers that actually decide the answer.

The engine never invents a driver. Every growth rate, margin and reinvestment assumption arrives as an input you chose and can defend.

The script

resources/dcf.py — pure standard library, no installation needed. JSON on stdin (or --in FILE), JSON out.

python3 resources/dcf.py value --example        # show the input shape
python3 resources/dcf.py value --in drivers.json
python3 resources/dcf.py selftest               # verify the engine
Subcommand Purpose
value drivers → forecast, terminal value, equity bridge, value per share
sensitivity re-run across a grid of one or two drivers
implied solve for the driver that makes the DCF equal the market price

The input

Three ways to state a driver, so a fading assumption stays one line:

  • a number — constant every year: "tax_rate": 0.25
  • a list — one entry per year: "revenue_growth": [0.4, 0.3, 0.2, 0.1, 0.05]
  • a glide — {"start": 0.40, "end": 0.03, "converge_by": 8} moves linearly from start to end by year 8, then holds

A glide is usually what you want for growth, margin and cost of capital. Real companies converge toward their industry; a company growing 40% in year 1 and 40% in year 10 is almost always a modelling error rather than a forecast.

{
  "base_revenue": 10000, "base_ebit": 800, "base_invested_capital": 6000,
  "forecast_years": 10,
  "revenue_growth": {"start": 0.25, "end": 0.03, "converge_by": 10},
  "operating_margin": {"start": 0.08, "end": 0.15, "converge_by": 7},
  "sales_to_capital": 2.0,
  "tax_rate": {"start": 0.15, "end": 0.25, "converge_by": 10},
  "cost_of_capital": {"start": 0.09, "end": 0.075, "converge_by": 10},
  "terminal": {"growth_rate": 0.025, "cost_of_capital": 0.075, "return_on_capital": 0.10},
  "bridge": {"debt": 3000, "cash": 1200, "minority_interests": 0,
             "non_operating_assets": 0, "employee_options_value": 0,
             "shares_outstanding": 500, "current_price": 42.00},
  "currency": "USD"
}

Set currency to the same currency as the cost of capital. The consistency validator checks this and it is the single most common silent error in DCF work.

How the engine computes each year

Revenue grows at the stated rate. Operating income is revenue times the margin. Tax applies to operating income, with any loss carryforward absorbing income first. Then the part people skip:

reinvestment = (this year's revenue − last year's revenue) / sales-to-capital
FCFF = after-tax operating income − reinvestment

Growth is not free. The sales-to-capital ratio says how many dollars of revenue each dollar of capital buys, so it converts a growth assumption into the investment that growth requires. A model that grows revenue without reinvesting is manufacturing value out of nothing, and it is the most common way a DCF ends up too high.

Set net_operating_loss_carryforward when the company has accumulated losses. The engine shelters income until the carryforward is used up.

Terminal value

Beyond the forecast horizon the company becomes a perpetuity:

terminal value = terminal FCFF / (terminal cost of capital − terminal growth)

Three rules the engine enforces by refusing to run:

  1. Terminal growth cannot exceed the riskfree rate. A company growing faster than the economy forever eventually becomes the economy. The riskfree rate is the practical ceiling because it already contains expected inflation plus real growth.
  2. Terminal cost of capital must exceed terminal growth, or the formula does not produce a finite number.
  3. Terminal growth must be paid for: reinvestment rate = growth / return on capital. The engine computes this rather than accepting it, and refuses a combination that would require reinvesting more than 100% of income.

Set terminal.return_on_capital deliberately. Setting it equal to the cost of capital says competition eventually arrives — the honest default. Setting it higher says this company holds a barrier to entry forever, which needs naming.

Failure risk

A going-concern DCF prices only the branch where the company survives. For a young company or a distressed one, that overstates value:

"failure": {"probability": 0.20, "proceeds_basis": "book_value",
            "book_value_of_capital": 4000, "proceeds_percent": 0.5}
value = going-concern value × (1 − p) + distress proceeds × p

Use book_value as the basis when a failed firm would be liquidated piecemeal, and going_concern when it would be sold intact at a discount.

The bridge

Operating assets are not equity. The walk:

equity value = operating assets − debt − minority interests + cash + non-operating assets
equity in common = equity value − value of employee options
value per share = equity in common / shares outstanding

Value employee options properly with option-valuation-toolkit and pass the result in. Inflating the share count instead understates the cost of options; ignoring them overstates value per share.

Do not add a control premium here and do not divide by diluted shares if you already subtracted option value — that double-counts.

Sensitivity and reverse engineering

A point estimate implies a false precision. Show a range.

python3 resources/dcf.py sensitivity --in grid.json

Point axes at any leaf with a dotted path — terminal.growth_rate, operating_margin.end, cost_of_capital — and give the values to sweep. Sweep the drivers that actually move the answer, which for most companies are the target margin and the terminal assumptions rather than near-term growth.

The implied subcommand runs the valuation backwards: given the market price, what must be true for that price to be right?

echo '{"base_case": {...}, "path": "operating_margin.end",
       "target_value_per_share": 42.00, "low": 0.01, "high": 0.40}' \
  | python3 resources/dcf.py implied

This is often the most useful output in the whole analysis. "The stock is worth $31 and trades at $42" invites an argument about your assumptions. "At $42 the market assumes this company reaches a 22% operating margin, which no firm in the industry has ever sustained" is a claim about the world, and it is checkable.

Choosing the model

This engine values the firm from operating cash flows (FCFF), discounted at the cost of capital. That is the right default for most non-financial companies, and the only sensible choice when leverage is changing.

Use something else when:

Situation Use instead
Financial service firm Dividends or excess return, valuing equity directly — debt is raw material for a bank, so there is no meaningful cost of capital. Use special-situation-models
Stable leverage, equity question FCFE discounted at the cost of equity
Mature dividend payer that pays out what it can Dividend discount model
Negative earnings, no path to profit modelled Revenue-driven build with failure probability. Use special-situation-models
Deeply distressed, equity is an option Equity as a call. Use option-valuation-toolkit

Before accepting the answer

Run the validator in valuation-consistency-checks. Then read the output for these tells:

  • Terminal value above 90% of total value. The forecast horizon is too short, or the company is genuinely all-option and a DCF is the wrong tool.
  • ROIC climbing every year with no explanation. Check that reinvestment is keeping up.
  • Value per share wildly different from price. Usually the model, not the market. Run implied and see whether the market's assumption is defensible before concluding the market is wrong.
  • Margins that never converge. Very few businesses out-earn their industry forever.

Common failures

Symptom Cause
Value far too high Growth without matching reinvestment; sales-to-capital set too high
Terminal value is most of the answer Forecast horizon too short for a company still growing fast
Value changes when currency changes Cash flows and discount rate in different currencies
Engine refuses to run Terminal growth above the discount rate, or reinvestment above 100% — both are real errors, not obstacles
Value per share negative Debt exceeds operating asset value; the company may be a distress case needing the option approach
Young company looks worth billions No failure probability applied

版本历史

  1. 0.1 GitHub ↗
    原版更新说明

    ## What's Changed * Improve writer skill navigation and structure by @lyndonkl in https://github.com/lyndonkl/claude/pull/1 * Consolidate stickiness content and reduce revision to 3 passes by @lyndonkl in https://github.com/lyndonkl/claude/pull/2 * Update README.md to reflect current writer skill structure by @lyndonkl in https://github.com/lyndonkl/claude/pull/3 * Add explicit instructions for AI agents to follow resource file workf… by @lyndonkl in https://github.com/lyndonkl/claude/pull/4 * Change analysis files from /tmp/ to project directory by @lyndonkl in https://github.com/lyndonkl/claude/pull/5 * Add five refined skills to production by @lyndonkl in https://github.com/lyndonkl/claude/pull/6 * Add causal-inference-root-cause skill and fix missing methodology files by @lyndonkl in https://github.com/lyndonkl/claude/pull/7 * Add workflow pattern to 6 completed skills by @lyndonkl in https://github.com/lyndonkl/claude/pull/8 * Add chain-estimation and roleplay-debate skills with optimizations by @lyndonkl in https://github.com/lyndonkl/claude/pull/9 * Add 3 new skills and update writer skill workflow pattern by @lyndonkl in https://github.com/lyndonkl/claude/pull/10 * Add skills #12-13: constraint-based-creativity and data-schema-knowle… by @lyndonkl in https://github.com/lyndonkl/claude/pull/11 * Add skills #14-16: decision-matrix, decomposition-reconstruction, deliberation-debate-red-teaming by @lyndonkl in https://github.com/lyndonkl/claude/pull/12 * Add skills #17-19: design-of-experiments, dialectical-mapping-steelmanning, discovery-interviews-surveys by @lyndonkl in https://github.com/lyndonkl/claude/pull/13 * Add chef-assistant skill and update README by @lyndonkl in https://github.com/lyndonkl/claude/pull/14 * Fix README: Remove links to gitignored scratchpad files by @lyndonkl in https://github.com/lyndonkl/claude/pull/15 * Add skills #14-22: 9 new production-ready skills by @lyndonkl in https://github.com/lyndonkl/claude/pull/16 * Add skills #20-24 and workflow pattern updates by @lyndonkl in https://github.com/lyndonkl/claude/pull/17 * Add skill #25: expected-value by @lyndonkl in https://github.com/lyndonkl/claude/pull/18 * Add skills #26-28: facilitation-patterns, financial-unit-economics, focus-timeboxing-8020 by @lyndonkl in https://github.com/lyndonkl/claude/pull/19 * Add skills #29-30: heuristics-and-checklists, hypotheticals-counterfactuals by @lyndonkl in https://github.com/lyndonkl/claude/pull/20 * Add skills #31-33: information-architecture, kill-criteria-exit-ramps, layered-reasoning by @lyndonkl in https://github.com/lyndonkl/claude/pull/21 * Add Claude Code plugin support by @lyndonkl in https://github.com/lyndonkl/claude/pull/22 * Fix plugin marketplace source path by @lyndonkl in https://github.com/lyndonkl/claude/pull/23 * Add skill #34: mapping-visualization-scaffolds by @lyndonkl in https://github.com/lyndonkl/claude/pull/24 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/25 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/26 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/27 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/28 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/29 * Add skill #59: skill-extraction by @lyndonkl in https://github.com/lyndonkl/claude/pull/30 * Add skill-creator: Transform documents into actionable skills by @lyndonkl in https://github.com/lyndonkl/claude/pull/31 * Update skill count from 58 to 61 in README by @lyndonkl in https://github.com/lyndonkl/claude/pull/32 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/33 * Add d3-visualization skill: comprehensive D3.js implementation guide by @lyndonkl in https://github.com/lyndonkl/claude/pull/34 * Add comprehensive Superforecasting Toolkit with 4 skills and orchestr… by @lyndonkl in https://github.com/lyndonkl/claude/pull/35 * Add "Run in Smithery" badge by @gurdasnijor in https://github.com/lyndonkl/claude/pull/36 * Add Scientific Writing Toolkit with 6 skills and orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/37 * Improve skill invocation rules and update README by @lyndonkl in https://github.com/lyndonkl/claude/pull/38 * Add Geometric Deep Learning skill suite and orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/39 * Decompose writer skill into 4 focused skills + orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/40 * Add GraphRAG skill suite with 5 skills + orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/41 * Decompose cognitive-design skill into 3 focused skills + orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/42 ## New Contributors * @lyndonkl made their first contribution in https://github.com/lyndonkl/claude/pull/1 * @gurdasnijor made their first contribution in https://github.com/lyndonkl/claude/pull/36 **Full Changelog**: https://github.com/lyndonkl/claude/commits/0.1

当前收录版本

0.0.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值85/100

亮点

  • 提供完整的 DCF 估值功能,包括逐年预测、终值计算、失败风险调整和敏感性分析
  • 支持反向推导市场隐含预期,具有高度实用价值
  • 适用于专业金融分析和投资决策场景
触发精准95/100

亮点

  • 触发描述清晰完整,覆盖内在估值、DCF模型构建、终值计算等多种使用场景
  • 边界定义明确,不易与其他Skill混淆
结构规范75/100

待提升项

  • 缺少 When to Use 章节 原报告严重程度:轻微

    文档中提到了使用场景但未以明确章节标题组织

    改进建议:建议添加明确的 When to Use 章节以提升可读性

  • 文档过长 原报告严重程度:轻微

    主文档超过500行,影响阅读体验

    改进建议:考虑将部分详细说明移至独立文档或使用折叠结构

亮点

  • 文档结构完整,包含清晰的计算逻辑和输入输出说明
  • 提供了详细的命令行用法和JSON输入示例
执行可靠88/100

亮点

  • 工具来源明确,使用Python标准库无需额外安装
  • 内置参数验证机制,能主动拒绝不合理输入
  • 提供自检功能确保引擎正确性
证据可验 (前四项均值)86/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。