biz-dcf
建立 DCF 現金流折現模型,估算公司內在價值
中文翻譯
---
name: "biz-dcf"
description: "建立現金流量折現(DCF)估值模型,估算內在價值。當使用者需要替公司估值、評估投資、估算合理股價、或建立財務預測時使用,即使他們說的是「這家公司值多少錢」、「我們該不該收購他們」或「幫我建一個估值模型」也一樣。"
metadata:
category: "WP-15 商學院—財務"
tags: ["finance", "dcf", "valuation"]
---
# 現金流量折現(DCF)估值
## 概述
DCF 透過預測未來的自由現金流,並用 WACC 折現到現值,來估算公司的內在價值。它回答的是「這個事業根據未來創造現金的能力,值多少錢?」
## 何時使用
**觸發條件:**
- 使用者需要替公司或事業單位估值
- 使用者在評估併購標的或投資機會
- 使用者問「合理價格是多少?」或「建一個估值模型」
**何時不要用:**
- 還沒有營收的早期新創 → 用可比公司法或創投法
- 快速的相對估值 → 用倍數(P/E、EV/EBITDA)
- 投資組合層級的決策 → 用 BCG 矩陣
## 框架
```
鐵律:垃圾進,垃圾出
DCF 的輸出,只會和它的假設一樣好。每一個假設(成長率、利潤率、
WACC、終值成長率)都必須明確列出,並附上理由。
沒有假設表的 DCF 一文不值。
```
```
鐵律:終值占主導,處理要小心
終值通常占 DCF 總價值的 60-80%。如果你的終值成長率超過
長期 GDP 成長(約 2-3%),就等於暗示這家公司最終會比整個經濟體還大。
終值成長率要以無風險利率或 GDP 成長為上限。
```
### 步驟 1:預測自由現金流(5-10 年)
```
FCF = EBIT × (1 - 稅率) + 折舊 - 資本支出 - Δ營運資金
```
預測的依據:
- 營收成長假設(由上而下或由下而上)
- 營業利益率的走勢
- 資本支出需求
- 營運資金的變動
### 步驟 2:計算 WACC
```
WACC = (E/V × Re) + (D/V × Rd × (1 - 稅率))
```
其中:
- Re = 股權成本(用 CAPM:Rf + β × 市場風險溢酬)
- Rd = 債務成本(借款的利率)
- E/V = 股權權重,D/V = 債務權重
### 步驟 3:計算終值
**Gordon 成長模型(建議):**
```
TV = FCF_final × (1 + g) / (WACC - g)
```
其中 g = 終值成長率(上限 2-3%)
**退出倍數法(替代方案):**
```
TV = EBITDA_final × EV/EBITDA 倍數
```
### 步驟 4:折現到現值
```
企業價值 = Σ FCFt / (1 + WACC)^t + TV / (1 + WACC)^n
股權價值 = 企業價值 - 淨負債
每股價值 = 股權價值 / 流通在外股數
```
### 步驟 5:敏感度分析
測試關鍵假設:WACC(±1%)、終值成長率(±0.5%)、營收成長(±2%)。以敏感度表呈現。
## 輸出格式
```markdown
# DCF 估值:{公司}
## 關鍵假設
| 假設 | 數值 | 理由 |
|-----------|-------|---------------|
| 營收成長(第 1-5 年) | X% | {依據} |
| 營業利益率(終值) | X% | {依據} |
| WACC | X% | {計算} |
| 終值成長率 | X% | {依據} |
## 預測的自由現金流
| 年度 | 營收 | EBIT | FCF |
|------|---------|------|-----|
| 第 1 年 | ... | ... | ... |
## 估值摘要
- FCF 現值:$X
- 終值現值:$X(占總額的 X%)
- 企業價值:$X
- 減:淨負債:$X
- 股權價值:$X
- 每股:$X
## 敏感度表
| WACC \ 終值 g | 1.5% | 2.0% | 2.5% |
|-------------------|------|------|------|
| 8% | $X | $X | $X |
| 9% | $X | $X | $X |
| 10% | $X | $X | $X |
```
## 範例
### 正確的應用
**情境:** 一家台灣 SaaS 公司的 DCF(ARR NT$500M,成長 25%)
- 預測 5 年的 FCF,成長率遞減(25% → 15%)
- WACC 10.5%(有理由:Rf 1.5%、β 1.2、ERP 6%、債務成本 4%)
- 終值成長率 2.5%(以台灣 GDP 成長為代理)
- TV = 企業價值的 72%,在正常範圍內 ✓
- 敏感度表顯示 WACC ±1% 下的 $X 區間
### 錯誤的應用
- 終值成長率 8% → 暗示這家公司會永遠比經濟體成長得更快。違反鐵律。
- 沒有假設表,只寫「企業價值 = NT$2.5B」→ 沒有辦法驗證。違反鐵律。
## 常見陷阱
- **終值的敏感度**:終值成長率或 WACC 的小幅變動,就會讓估值擺盪 20-30%。一定要呈現一個區間,不要只給點估計。
- **WACC 的循環參照**:WACC 需要股權價值(市值),但 DCF 算的就是股權價值。要用迭代,或使用目標資本結構。
- **FCF vs 淨利**:DCF 用的是自由現金流,不是盈餘。資本支出或營運資金需求高的公司,可能盈餘為正,但 FCF 為負。
- **國家風險溢酬**:對台灣/新興市場的公司,要在 WACC 上加國家風險溢酬(通常 1-3%)。
- **早期年度的 FCF 為負**:成長型公司一開始可能 FCF 為負。這沒關係,價值來自後面幾年和終值。
## 腳本
| 腳本 | 說明 | 用法 |
|--------|-------------|-------|
| `scripts/dcf.py` | 計算含終值的 DCF 企業價值 | `python scripts/dcf.py --help` |
執行 `python scripts/dcf.py --verify` 可以跑內建的健全性測試。
## 參考資料
- WACC 計算的細節,見 `references/wacc-calculation.md`
- 可比公司倍數法,見 `references/comparables.md`英文原文
---
name: "biz-dcf"
description: "Build Discounted Cash Flow (DCF) valuation models to estimate intrinsic value. Use this skill when the user needs to value a company, evaluate an investment, estimate fair share price, or build financial projections — even if they say 'what is this company worth', 'should we acquire them', or 'build me a valuation model'."
metadata:
category: "WP-15 商學院—財務"
tags: ["finance", "dcf", "valuation"]
---
# Discounted Cash Flow (DCF) Valuation
## Overview
DCF estimates a company's intrinsic value by projecting future free cash flows and discounting them to present value using WACC. It answers "what is this business worth based on its future cash generation ability?"
## When to Use
**Trigger conditions:**
- User needs to value a company or business unit
- User evaluating M&A targets or investment opportunities
- User asks "what's the fair price?" or "build a valuation model"
**When NOT to use:**
- For early-stage startups with no revenue → use comparables or venture method
- For quick relative valuation → use multiples (P/E, EV/EBITDA)
- For portfolio-level decisions → use BCG Matrix
## Framework
```
IRON LAW: Garbage In, Garbage Out
DCF output is ONLY as good as its assumptions. Every assumption (growth rate,
margin, WACC, terminal growth) must be explicitly stated with justification.
A DCF without an assumptions table is worthless.
```
```
IRON LAW: Terminal Value Dominates — Handle with Care
Terminal value typically represents 60-80% of total DCF value. If your
terminal growth rate exceeds long-term GDP growth (~2-3%), you're implying
the company will eventually become larger than the economy. Cap terminal
growth at the risk-free rate or GDP growth.
```
### Step 1: Project Free Cash Flows (5-10 years)
```
FCF = EBIT × (1 - Tax Rate) + Depreciation - CapEx - ΔWorking Capital
```
Build projections from:
- Revenue growth assumptions (top-down or bottom-up)
- Operating margin trajectory
- Capital expenditure requirements
- Working capital changes
### Step 2: Calculate WACC
```
WACC = (E/V × Re) + (D/V × Rd × (1 - Tax))
```
Where:
- Re = Cost of equity (use CAPM: Rf + β × Market Risk Premium)
- Rd = Cost of debt (interest rate on borrowings)
- E/V = Equity weight, D/V = Debt weight
### Step 3: Calculate Terminal Value
**Gordon Growth Model (preferred):**
```
TV = FCF_final × (1 + g) / (WACC - g)
```
Where g = terminal growth rate (cap at 2-3%)
**Exit Multiple Method (alternative):**
```
TV = EBITDA_final × EV/EBITDA multiple
```
### Step 4: Discount to Present Value
```
Enterprise Value = Σ FCFt / (1 + WACC)^t + TV / (1 + WACC)^n
Equity Value = Enterprise Value - Net Debt
Per Share Value = Equity Value / Shares Outstanding
```
### Step 5: Sensitivity Analysis
Test key assumptions: WACC (±1%), terminal growth (±0.5%), revenue growth (±2%). Present as a sensitivity table.
## Output Format
```markdown
# DCF Valuation: {Company}
## Key Assumptions
| Assumption | Value | Justification |
|-----------|-------|---------------|
| Revenue growth (Y1-5) | X% | {basis} |
| Operating margin (terminal) | X% | {basis} |
| WACC | X% | {calculation} |
| Terminal growth | X% | {basis} |
## Projected Free Cash Flows
| Year | Revenue | EBIT | FCF |
|------|---------|------|-----|
| Y1 | ... | ... | ... |
## Valuation Summary
- PV of FCFs: $X
- PV of Terminal Value: $X (X% of total)
- Enterprise Value: $X
- Less: Net Debt: $X
- Equity Value: $X
- Per Share: $X
## Sensitivity Table
| WACC \ Terminal g | 1.5% | 2.0% | 2.5% |
|-------------------|------|------|------|
| 8% | $X | $X | $X |
| 9% | $X | $X | $X |
| 10% | $X | $X | $X |
```
## Examples
### Correct Application
**Scenario:** DCF for a Taiwanese SaaS company (ARR NT$500M, growing 25%)
- Projected 5 years of FCF with declining growth (25% → 15%)
- WACC 10.5% (justified: Rf 1.5%, β 1.2, ERP 6%, debt cost 4%)
- Terminal growth 2.5% (Taiwan GDP growth proxy)
- TV = 72% of enterprise value — within normal range ✓
- Sensitivity table shows $X range across ±1% WACC
### Incorrect Application
- Terminal growth rate of 8% → Implies the company outgrows the economy forever. Violates Iron Law.
- No assumptions table — just "Enterprise Value = NT$2.5B" → No way to validate. Violates Iron Law.
## Gotchas
- **Terminal value sensitivity**: Small changes in terminal growth or WACC swing valuation 20-30%. Always present a range, not a point estimate.
- **Circular reference in WACC**: WACC needs equity value (market cap), but DCF calculates equity value. Iterate or use target capital structure.
- **FCF vs Net Income**: DCF uses Free Cash Flow, not earnings. Companies with high capex or working capital needs can have positive earnings but negative FCF.
- **Country risk premium**: For Taiwan/emerging market companies, add a country risk premium to WACC (typically 1-3%).
- **Negative FCF in early years**: Growth companies may have negative FCF initially. This is fine — the value comes from later years and terminal value.
## Scripts
| Script | Description | Usage |
|--------|-------------|-------|
| `scripts/dcf.py` | Compute DCF enterprise value with terminal value | `python scripts/dcf.py --help` |
Run `python scripts/dcf.py --verify` to execute built-in sanity tests.
## References
- For WACC calculation details, see `references/wacc-calculation.md`
- For comparable company multiples approach, see `references/comparables.md`