
quantitative-valuation
Estimate intrinsic value of stocks and companies using DCF, dividend discount models, comparable multiples, and residual income. Use when the user asks about discounted cash flow, DCF models, WACC, terminal value, dividend discount models, comparable multiples, or sum-of-the-parts valuation. Also trigger when users mention 'what is this stock worth', 'fair value estimate', 'Gordon growth model', 'free cash flow valuation', 'cost of equity', 'sensitivity analysis', 'exit multiple', or ask whether a stock is overvalued or undervalued.
- Installs
- 787
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/joellewis/finance_skills --skill quantitative-valuation- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads quantitative-valuation automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Quantitative Valuation
Core Concepts
Discounted Cash Flow (DCF)
The DCF model values a company as the present value of its future free cash flows plus a terminal value:
V = Σ FCF_t / (1 + WACC)^t + TV / (1 + WACC)^n
where FCF_t is the free cash flow in year t, WACC is the weighted average cost of capital, and TV is the terminal value at the end of the explicit forecast period.
Terminal Value — Gordon Growth Model
Estimates the value of all cash flows beyond the explicit forecast period assuming perpetual growth:
TV = FCF_n × (1 + g) / (WACC - g)
where g is the long-term sustainable growth rate (typically near nominal GDP growth, 2-4%).
Terminal Value — Exit Multiple Method
Estimates terminal value by applying a market multiple to the final-year financial metric:
TV = EBITDA_n × EV/EBITDA multiple
The exit multiple is typically based on current peer trading multiples or long-run sector averages.
Weighted Average Cost of Capital (WACC)
Blends the cost of equity and after-tax cost of debt weighted by their market-value proportions:
WACC = w_e × r_e + w_d × r_d × (1 - τ)
where w_e and w_d are equity and debt weights, r_e and r_d are their respective costs, and τ is the marginal tax rate.
Cost of Equity — CAPM
The Capital Asset Pricing Model estimates the required return on equity:
r_e = R_f + β × (R_m - R_f)
where R_f is the risk-free rate, β is the stock's sensitivity to market returns, and (R_m - R_f) is the equity risk premium.
Dividend Discount Model (DDM)
Values a stock as the present value of its future dividends. The Gordon Growth (single-stage) form:
P = D_1 / (r - g)
where D_1 is the next-period dividend, r is the required return, and g is the constant dividend growth rate.
Multi-Stage DDM
Accommodates companies transitioning through growth phases:
- Stage 1 (High growth): Dividends grow at g_1 for n years
- Stage 2 (Transition): Growth declines linearly from g_1 to g_3
- Stage 3 (Stable): Dividends grow at g_3 in perpetuity (valued via Gordon Growth)
Residual Income Model
Values a company as its book value plus the present value of economic profits:
V = BV_0 + Σ (ROE - r) × BV_{t-1} / (1 + r)^t
This model is useful when free cash flows are negative but the company earns above its cost of equity.
Comparable Multiples
Relative valuation uses pricing ratios from a peer group to infer value:
- P/E (Price-to-Earnings): most common for profitable companies
- EV/EBITDA (Enterprise Value to EBITDA): capital-structure neutral
- P/S (Price-to-Sales): useful for unprofitable or early-stage companies
- P/B (Price-to-Book): useful for asset-heavy businesses (banks, REITs)
Use the median of the peer group to reduce outlier effects. Adjust for differences in growth, margins, and risk.
Relative Valuation
Compare a stock's current multiple to:
- Its own historical average (time-series comparison)
- Sector or industry median (cross-sectional comparison)
A stock trading at a discount to both may be undervalued, or there may be fundamental deterioration.
Sum-of-the-Parts (SOTP)
Value each business segment separately using the most appropriate method (DCF, multiples, or asset-based), then sum. Subtract net debt and add non-operating assets to arrive at equity value.
Sensitivity Analysis
Vary key assumptions (WACC and terminal growth rate are the most impactful) in a two-way data table to understand the range of possible valuations. This exposes which assumptions drive the result.
Key Formulas
| Formula | Expression | Use Case |
|---|---|---|
| DCF Value | V = Σ FCF_t/(1+WACC)^t + TV/(1+WACC)^n | Enterprise valuation from cash flows |
| Gordon Growth TV | TV = FCF_n×(1+g)/(WACC-g) | Terminal value assuming perpetual growth |
| Exit Multiple TV | TV = EBITDA_n × multiple | Terminal value using market multiples |
| WACC | WACC = w_e×r_e + w_d×r_d×(1-τ) | Blended discount rate |
| CAPM | r_e = R_f + β×(R_m - R_f) | Cost of equity estimation |
| Gordon Growth DDM | P = D_1/(r-g) | Stock value from dividends |
| Residual Income | V = BV_0 + Σ (ROE-r)×BV_{t-1}/(1+r)^t | Value from economic profit |
| Implied Value (Comps) | V = Metric × Peer Median Multiple | Relative valuation |
Worked Examples
Example 1: Two-Stage DCF
Given:
- Current FCF: $100M
- Stage 1: 15% FCF growth for 5 years
- Terminal growth rate: 3%
- WACC: 10%
Calculate: Enterprise value
Solution:
Projected free cash flows:
- Year 1: $100M × 1.15 = $115.0M
- Year 2: $115M × 1.15 = $132.3M
- Year 3: $132.3M × 1.15 = $152.1M
- Year 4: $152.1M × 1.15 = $174.9M
- Year 5: $174.9M × 1.15 = $201.1M
PV of Stage 1 cash flows:
- PV = $115.0/1.10 + $132.3/1.10² + $152.1/1.10³ + $174.9/1.10⁴ + $201.1/1.10⁵
- PV = $104.5 + $109.3 + $114.3 + $119.5 + $124.9 = $572.5M
Terminal value (Gordon Growth):
- TV = $201.1M × 1.03 / (0.10 - 0.03) = $207.2M / 0.07 = $2,959.6M
- PV of TV = $2,959.6M / 1.10⁵ = $1,837.7M
Enterprise Value = $572.5M + $1,837.7M = $2,410.1M
Note: Terminal value represents 76% of total value, which is typical but underscores the importance of terminal assumptions.
Example 2: Comparable P/E Analysis
Given:
- Target company EPS: $5.00
- Peer group P/E ratios: 15x, 17x, 18x, 19x, 22x
Calculate: Implied share price using peer median
Solution:
Peer median P/E = 18x (middle value of the sorted set)
Implied share price = EPS × Peer Median P/E = $5.00 × 18 = $90.00
If the stock trades at $75, it appears undervalued relative to peers (16.7% discount). Before concluding, check whether lower growth, margins, or higher risk justify the discount.
Common Pitfalls
- Terminal value dominates DCF output (often 60-80% of total value) — scrutinize terminal assumptions carefully
- Garbage-in-garbage-out: a DCF is only as good as its assumptions; false precision gives false confidence
- Using trailing multiples when forward multiples are more relevant for fast-growing or cyclical companies
- Not adjusting comparable multiples for differences in growth rates, margins, and capital structure
- Circular reference when WACC depends on market cap which depends on the WACC-derived valuation — iterate or use target capital structure
- Projecting high growth rates indefinitely without considering competitive dynamics and mean reversion
- Ignoring dilution from stock-based compensation in per-share value estimates
Cross-References
- historical-risk (wealth-management plugin): historical beta estimation for CAPM inputs
- forward-risk (wealth-management plugin): cost of equity estimation via CAPM and factor models
- financial-statements (wealth-management plugin): FCF and EBITDA derivation from financials
- qualitative-valuation (wealth-management plugin): complements quantitative models with moat and quality analysis
- asset-allocation (wealth-management plugin): valuation outputs feed into portfolio construction decisions
Running the script
uv run scripts/quantitative_valuation.py
The PEP 723 header resolves the numpy dependency automatically. Alternatively run python3 scripts/quantitative_valuation.py after pip install numpy.
- Bare run prints a demo covering WACC/CAPM, a two-stage DCF with sensitivity table, dividend discount models, residual income, and comparable multiples.
--verifyre-runs the demo computations and asserts the outputs match this skill's worked examples (prints PASS/FAIL, nonzero exit on mismatch).--helplists the available classes.
The file is primarily meant to be imported as a module, e.g. from quantitative_valuation import DCF, WACC, DividendDiscount, ComparableMultiples.
FAQ
What does the quantitative-valuation skill do?
Estimate intrinsic value of stocks and companies using DCF, dividend discount models, comparable multiples, and residual income. Use when the user asks about discounted cash flow, DCF models, WACC, terminal value, dividend discount models, comparable multiples, or sum-of-the-parts valuation. Also trigger when users mention 'what is this stock worth', 'fair value estimate', 'Gordon growth model', 'free cash flow valuation', 'cost of equity', 'sensitivity analysis', 'exit multiple', or ask whether a stock is overvalued or undervalued.
How do I install quantitative-valuation?
Run npx skills add https://github.com/joellewis/finance_skills --skill quantitative-valuation in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/quantitative-valuation/ (personal) or .claude/skills/quantitative-valuation/ (project).
Which AI agents can use quantitative-valuation?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is quantitative-valuation safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains quantitative-valuation?
It is published by joellewis in joellewis/finance_skills. It has 787 recorded installs.
More from joellewis/finance_skills
asset-allocation
joellewis/finance_skills
Determine how to distribute capital across asset classes using strategic and tactical allocation frameworks. Use when the user asks about portfolio allocation, mean-variance optimization, Black-Litterman, risk parity, glide paths, or target-date strategies. Also trigger when users mention 'how much in stocks vs bonds', '60/40 portfolio', 'policy portfolio', 'core-satellite', 'liability-driven investing', 'asset-liability matching', or ask how to split their money across investments.
statistics-fundamentals
joellewis/finance_skills
Apply statistical methods to financial data including descriptive statistics, covariance estimation, regression, hypothesis testing, and resampling. Use when the user asks about return distributions, correlation between assets, building a covariance matrix, running a CAPM regression, testing whether alpha is significant, checking if returns are normal, or estimating confidence intervals. Also trigger when users mention 'volatility', 'how correlated are these', 'fat tails', 'skewness', 'R-squared', 'beta of a fund', 'bootstrap a Sharpe ratio', 'shrinkage estimator', 'Ledoit-Wolf', or ask why their optimizer produces unstable weights.
finance-psychology
joellewis/finance_skills
Recognize and mitigate cognitive biases that impair financial decisions, and coach clients toward values-driven financial lives. Use when the user asks about behavioral finance, money psychology, loss aversion, overconfidence, herd behavior, or emotional investing. Also trigger when users mention 'why do I panic sell', 'money fights with my spouse', 'I can never save enough', 'fear of investing', 'lifestyle creep', 'keeping up with the Joneses', 'Rich Life', 'money scripts', or ask how emotions affect financial decisions.
commodities
joellewis/finance_skills
Analyze commodity markets including futures curve dynamics, roll yield, and supply/demand fundamentals. Use when the user asks about commodity investing, commodity ETFs, contango, backwardation, roll yield, commodity indices (GSCI, BCOM), or commodities as an inflation hedge. Also trigger when users mention 'oil prices', 'gold as a safe haven', 'agricultural futures', 'convenience yield', 'storage costs', 'natural gas', 'copper demand', or ask why commodity ETF returns differ from spot price changes.
investment-policy
joellewis/finance_skills
Construct comprehensive Investment Policy Statements governing return objectives, risk tolerance, and portfolio constraints. Use when the user asks about building an IPS, setting return objectives, assessing risk tolerance, defining investment constraints, or establishing rebalancing and benchmark policies. Also trigger when users mention 'investment plan', 'policy portfolio', 'risk capacity vs willingness', 'spending rate for an endowment', 'foundation payout', 'manager selection criteria', or ask how to document their investment strategy.
order-lifecycle
joellewis/finance_skills
Guide the design and implementation of order lifecycle management in trading systems. Owns FIX application-layer message flows (NewOrderSingle, ExecutionReport, cancel/replace) and order state. Use when building an order state machine for an OMS or EMS, handling cancel/replace race conditions, defining pre-submission validation rules (buying power, position limits, restricted lists), selecting order types and time-in-force instructions, designing multi-leg or OCO or bracket orders, building CAT-compliant audit trails, troubleshooting order rejections or unexpected state transitions, hardening an OMS against edge cases, or implementing order persistence and recovery for failover. Also covers execution-report handling, ClOrdID chaining, and partial fill aggregation. For FIX session management (logon, sequence gaps, disconnects) see exchange-connectivity.
Popular business & finance skills
sales-enablement
coreyhaines31/marketingskills
When the user wants to create sales collateral, pitch decks, one-pagers, objection handling docs, or demo scripts. Also use when the user mentions 'sales deck,' 'pitch deck,' 'one-pager,' 'leave-behind,' 'objection handling,' 'deal-specific ROI analysis,' 'demo script,' 'talk track,' 'sales playbook,' 'proposal template,' 'buyer persona card,' 'battle card,' 'battlecard,' 'competitive one-pager,' 'win-loss analysis,' 'why are we losing deals,' 'loss reasons,' 'how do I respond to this objection,' 'prospect just said,' 'help my sales team,' 'sales materials,' or 'what should I give my sales reps,' 'cold call script,' or 'voicemail script.' Use this for any document or asset that helps a sales team close deals. For public competitor comparison pages, see competitors. For running buyer interviews or churn research, see customer-research. For marketing website copy, see copywriting. For cold outreach emails, see cold-email. For the offer being sold (bonuses, guarantees, pricing structure),
revops
coreyhaines31/marketingskills
When the user wants help with revenue operations, lead lifecycle management, or marketing-to-sales handoff processes. Also use when the user mentions 'RevOps,' 'revenue operations,' 'lead scoring,' 'outbound pipeline stages,' 'lead routing,' 'MQL,' 'SQL,' 'pipeline stages,' 'deal desk,' 'CRM automation,' 'marketing-to-sales handoff,' 'data hygiene,' 'leads aren't getting to sales,' 'pipeline management,' 'lead qualification,' or 'when should marketing hand off to sales.' Use this for anything involving the systems and processes that connect marketing to revenue. For cold outreach emails, see cold-email. For email drip campaigns, see emails. For pricing decisions, see pricing.
sales-funnel-blueprint
autonnel/autonnel-skills
Turn an offer into a concrete multi-step sales funnel spec - page-by-page structure, price ladder, copy outline and the metrics each step must hit. Use when asked to build a sales funnel, marketing funnel, landing page flow, lead magnet funnel, webinar funnel, tripwire or VSL funnel, when planning a product launch page flow, or when someone asks "what pages do I need" for selling something online.
pricing
coreyhaines31/marketingskills
When the user wants help with pricing decisions, packaging, or monetization strategy. Also use when the user mentions 'pricing,' 'pricing tiers,' 'freemium,' 'free trial,' 'packaging,' 'price increase,' 'value metric,' 'Van Westendorp,' 'willingness to pay,' 'monetization,' 'how much should I charge,' 'my pricing is wrong,' 'pricing page,' 'annual vs monthly,' 'per seat pricing,' 'should I offer a free plan,' 'pricing page teardown,' 'pricing page audit,' 'is my pricing page AI-readable,' or 'can AI read my pricing.' Use this whenever someone is figuring out what to charge, how to structure their plans, or wants to audit a pricing page (for humans and for the AI agents that shortlist tools). For in-app upgrade screens, see paywalls. For offer construction (bonuses, guarantees, value framing, naming) on services/courses/coaching/high-ticket B2B, see offers.
cross-border-ecommerce
nexscope-ai/ecommerce-skills
Cross-border e-commerce expansion advisor. Scores target markets on 8 weighted dimensions (market size, ecommerce penetration, competition, regulatory complexity, logistics infrastructure, payment ecosystem, cultural distance, IP protection), compares 5 fulfillment models with cost and transit data, provides country-by-country tax/duty compliance guides (EU VAT/IOSS, UK VAT, US sales tax, CA GST, AU GST, JP consumption tax), maps local payment preferences by market, and builds a phased expansion roadmap. No API key required.
pricing-strategy
coreyhaines31/marketingskills
When the user wants help with pricing decisions, packaging, or monetization strategy. Also use when the user mentions 'pricing,' 'pricing tiers,' 'freemium,' 'free trial,' 'packaging,' 'price increase,' 'value metric,' 'Van Westendorp,' 'willingness to pay,' 'monetization,' 'how much should I charge,' 'my pricing is wrong,' 'pricing page,' 'annual vs monthly,' 'per seat pricing,' or 'should I offer a free plan.' Use this whenever someone is figuring out what to charge or how to structure their plans. For in-app upgrade screens, see paywall-upgrade-cro.