dcf-model

Builds DCF valuation models in Excel with WACC, terminal value, scenarios, and sensitivity tables.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/xu1713/openhorse --skill dcf-model-xu1713
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dcf-model
Source: https://github.com/xu1713/openhorse/tree/main/openhorse/openhorse/optional-skills/finance/dcf-model
Command: npx skills add https://github.com/xu1713/openhorse --skill dcf-model-xu1713

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openpyxl, requests, and includes scripts (resource) components.

What problem does it solve? Building a discounted cash flow valuation model in Excel is error-prone and time-consuming, requiring correct formulas, scenario logic, WACC calculations, and sensitivity analysis that must all recalculate live when assumptions change. ## Core Features & Use Cases - Full DCF Workflow: Guides revenue projections, FCF build, WACC via CAPM, terminal value, and the enterprise-to-equity value bridge with live Excel formulas instead of hardcoded values. - Scenario & Sensitivity Analysis: Creates Bear/Base/Bull assumption blocks with a case selector and three 5x5 sensitivity tables (WACC vs terminal growth, revenue growth vs EBIT margin, beta vs risk-free rate) populated programmatically via openpyxl. - Validation & Recalculation: Ships a validate_dcf.py script that checks formula errors, terminal growth vs WACC, WACC range, and terminal value proportion, plus mandatory recalc.py runs before delivery. - Use Case: An equity analyst needs an intrinsic-value model for a stock; the skill produces a two-sheet Excel workbook (DCF + WACC) with sourced cell comments, scenario switching, and sensitivity grids ready for client review. ## Quick Start Build a DCF valuation model in Excel for ticker AAPL using consensus growth estimates with Bear, Base, and Bull scenarios and sensitivity tables.

Frequently Asked Questions about dcf-model

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a DCF model in Excel with Python?

Use openpyxl to write live Excel formulas for revenue projections, FCF, WACC, and terminal value rather than hardcoded computed values. This skill structures the workbook into DCF and WACC sheets, then recalculates with LibreOffice via recalc.py to verify zero formula errors.

How do I create sensitivity tables in Excel using openpyxl?

Write a 5x5 grid of formulas programmatically where each cell recalculates the full DCF using the row and column header values, such as WACC and terminal growth. Center the base case in the middle cell and avoid Excel's Data Table feature, which cannot be automated with openpyxl.

What happens if terminal growth is greater than WACC in a DCF?

Terminal growth greater than or equal to WACC makes the perpetuity formula denominator zero or negative, producing infinite or invalid value. The included validate_dcf.py script flags this as a critical error and also checks WACC range and terminal value proportion of enterprise value.

Why does my Excel model show #REF! or #DIV/0! errors after generation?

These errors usually come from writing formulas before locking row positions, so inserted headers shift references. Define all section rows first, then write formulas, and run recalc.py to scan every cell for #REF!, #DIV/0!, #VALUE!, and similar errors before delivery.

Can I model Bear, Base, and Bull scenarios in one Excel DCF?

Yes. Create three separate assumption blocks with year columns, add a case selector cell containing 1, 2, or 3, and use a consolidation column with INDEX formulas to pull the active scenario. Projection formulas then reference the consolidation column for clean, auditable logic.