mcpField
F
financial-analysis-dcf

financial-analysis-dcf

github.com/pionex-officialData & databases5112 installsUpdated 14w ago
Repository

About financial-analysis-dcf

A skill that estimates per-share intrinsic value with a discounted cash flow model for US-listed stocks. It gathers financial and market inputs, projects free cash flow, and presents a sensitivity table with assumptions and limitations.

Key features

  1. 01Fetches SEC EDGAR financial data
  2. 02Uses FRED rates and Yahoo Finance market data
  3. 03Projects free cash flow and terminal value
  4. 04Produces a 5×5 WACC and growth sensitivity table
  5. 05Documents assumptions, interpretation, and model limits

Use cases

  1. 01Estimating intrinsic value for a US-listed stock
  2. 02Comparing valuation outcomes under different assumptions
  3. 03Reviewing cash flow and debt considerations alongside a valuation

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/pionex-official/pionex-skills --skill financial-analysis-dcf

After installing, type/financial-analysis-dcfin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

run.sh
scripts/
get_beta.py
get_dcf.py
get_fundamentals.py
get_quote.py

Details

From the project README

DCF Valuation

Estimate intrinsic value per share using a discounted cash flow model. Data from SEC EDGAR (financials), FRED (risk-free rate), and Yahoo Finance (price, beta).

Setup

No dependencies required. All scripts use Python standard library only.

Workflow

Step 1 — Run the DCF script
bash run.sh <SYMBOL>
# With custom assumptions:
bash run.sh <SYMBOL> --terminal-growth 3.0 --fcf-growth 15 --projection-years 7

The script:

  1. Fetches 5 years of 10-K data from SEC EDGAR
  2. Computes unlevered FCF = OCF − CapEx + InterestExpense × (1−T)
  3. Derives historical FCF growth rate (or uses override)
  4. Gets risk-free rate from FRED (10Y Treasury)
  5. Gets beta and current price from Yahoo Finance
  6. Calculates WACC = Ke × E/V + Kd × (1−T) × D/V
  7. Projects FCFs, computes terminal value (Gordon Growth Model)
  8. Generates 5×5 sensitivity table (WACC vs terminal growth)
Step 2 — Section 1: Summary

First output must be this summary box:

[TICKER] — DCF VALUATION

Intrinsic value:  $XXX.XX  |  Current price: $XXX.XX  |  ▲/▼ XX.X%
WACC:             X.X%     |  Terminal growth: X.X%   |  FCF base: $X.XB
Step 3 — Section 2: Sensitivity Table

Show the full 5×5 sensitivity table from the JSON output:

Terminal Growth \\ WACC  |  8.2%   |  9.2%   |  10.2%
------------------------|---------|---------|--------
1.5%                    | $198.4  | $176.2  | $158.1
2.5%                    | $221.3  | $194.5  | $172.6
3.5%                    | $251.7  | $218.0  | $191.4

Display N/A for null values (WACC ≤ terminal growth).

Step 4 — Section 3: Interpretation

Note key assumptions and their impact:

  • Which inputs drive the most variance (usually WACC and growth rate)
  • Whether the beta seems reasonable for the company
  • How the historical FCF growth rate compares to analyst expectations
  • Any red flags (negative FCF years, volatile cash flows, high debt)

Disclaimer: DCF output is highly sensitive to WACC and growth assumptions. It should be used as one input among many, not as a definitive price target. Always present the sensitivity table alongside the point estimate.


Model Assumptions

  • ERP: 5.5% (Damodaran market average)
  • Tax rate: derived from SEC filings (IncomeTaxExpense / PreTaxIncome); fallback 21%
  • Cost of debt: derived from SEC filings (InterestExpense / LongTermDebt); fallback 4%
  • FCF: Unlevered = OCF − CapEx + InterestExpense × (1−T) from most recent 10-K
  • FCF growth: per-share UFCF CAGR from historical 10-K data (accounts for buybacks); fallback 3% if insufficient data
  • Beta: OLS regression on daily returns vs SPY (~5 years); Blume adjustment applied (adjusted = 0.67 × raw + 0.33)
  • Shares outstanding: from SEC EDGAR; fallback to market cap / price
  • Mid-year convention: FCFs and terminal value both discounted at mid-year

Formatting Rules

  • Intrinsic value and current price: "$XXX.XX"
  • Upside/downside: "▲ +XX.X%" or "▼ −XX.X%"
  • WACC and growth rates: one decimal, e.g. "9.2%"
  • FCF: B or M, e.g. "$12.3B"

When NOT to Use

  • Negative or volatile FCF: companies with negative free cash flow cannot be valued via DCF — the model requires a positive base FCF to project forward
  • Banks and financial institutions: revenue and cash flow structures differ fundamentally (interest income vs. operating revenue); use price-to-book or dividend discount models instead
  • Insurance companies: similar to banks — earnings driven by underwriting and investment income, not operating cash flow
  • Pre-revenue or early-stage companies: no meaningful FCF history to extrapolate

Limitations

  • US stocks only: SEC EDGAR data for US-listed equities
  • Backward-looking: uses historical financials — future may differ significantly
  • No analyst estimates: growth rates extrapolated from historical data unless user provides one

Comments

Markdown supported