
Dcf Model
Build and validate Excel DCF valuation models with Python checks for formula errors and DCF logic mistakes.
Overview
dcf-model is an agent skill for the Validate phase that builds and validates Excel DCF models with openpyxl-based formula and logic checks.
Install
npx skills add https://github.com/anthropics/financial-services-plugins --skill dcf-modelWhat is this skill?
- Python DCFModelValidator using openpyxl formula and value workbooks
- Checks sheet structure, Excel formula errors, and DCF-specific logic
- Returns structured PASS/FAIL validation with errors, warnings, and info tiers
- Documents openpyxl and requests dependencies for Excel and HTTP workflows
- Designed for financial services plugin DCF Excel artifacts
Adoption & trust: 914 installs on skills.sh; 30.5k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You have a DCF spreadsheet but no automated way to catch formula breakage and standard DCF logic errors.
Who is it for?
Solo builders and analysts preparing investment or pricing DCF workbooks in Excel with agent-assisted QA.
Skip if: Teams needing live market data modeling, non-Excel valuation stacks, or compliance-signed audit without human review.
When should I use this skill?
When building or auditing Excel DCF models that need automated structure, formula, and DCF logic validation.
What do I get? / Deliverables
You get a dated validation report with PASS or fail status, errors, warnings, and info lists tied to the workbook.
- Validation JSON report with status, errors, warnings, and info
- Reviewed DCF workbook structure
Recommended Skills
Journey fit
Discounted cash flow work proves economic viability and price the opportunity before full build commitment. Pricing and valuation fits Validate—stress-testing assumptions in spreadsheets, not shipping app code.
How it compares
Excel-focused validation skill, not a full Bloomberg-terminal replacement or generic spreadsheet tutor.
Common Questions / FAQ
Who is dcf-model for?
Indie founders, analysts, and agent users building DCF valuations in Excel within financial services plugin workflows.
When should I use dcf-model?
Use it during Validate and pricing when you need sheet structure review, formula error scans, and DCF logic checks on an existing .xlsx model.
Is dcf-model safe to install?
Review the Security Audits panel on this page; validation reads local Excel files and may use requests—do not point it at sensitive paths without review.
SKILL.md
READMESKILL.md - Dcf Model
# DCF Model Builder - Python Dependencies # Excel file handling openpyxl>=3.0.0 # HTTP requests requests>=2.28.0 #!/usr/bin/env python3 """ DCF Model Validation Script Validates Excel DCF models for formula errors and common DCF mistakes """ import sys import json from pathlib import Path from typing import Optional class DCFModelValidator: """Validates DCF models for errors and quality issues""" def __init__(self, excel_path: str): try: import openpyxl except ImportError: raise ImportError("openpyxl not installed. Run: pip install openpyxl") self.excel_path = excel_path self.openpyxl = openpyxl if not Path(excel_path).exists(): raise FileNotFoundError(f"File not found: {excel_path}") self.workbook_formulas = openpyxl.load_workbook(excel_path, data_only=False) self.workbook_values = openpyxl.load_workbook(excel_path, data_only=True) self.errors = [] self.warnings = [] self.info = [] def validate_all(self) -> dict: """ Run all validation checks Returns: Dict with validation results """ from datetime import datetime self.check_sheet_structure() self.check_formula_errors() self.check_dcf_logic() results = { 'file': self.excel_path, 'validation_date': datetime.now().isoformat(), 'status': 'PASS' if len(self.errors) == 0 else 'FAIL', 'error_count': len(self.errors), 'warning_count': len(self.warnings), 'errors': self.errors, 'warnings': self.warnings, 'info': self.info } return results def check_sheet_structure(self): """Verify required sheets exist""" required_sheets = ['DCF', 'WACC', 'Sensitivity'] sheet_names = self.workbook_values.sheetnames for sheet in required_sheets: if sheet not in sheet_names: self.warnings.append(f"Recommended sheet missing: {sheet}") else: self.info.append(f"Found sheet: {sheet}") def check_formula_errors(self): """Check for Excel formula errors in all sheets""" excel_errors = ['#VALUE!', '#DIV/0!', '#REF!', '#NAME?', '#NULL!', '#NUM!', '#N/A'] error_details = {err: [] for err in excel_errors} total_errors = 0 total_formulas = 0 for sheet_name in self.workbook_values.sheetnames: ws_values = self.workbook_values[sheet_name] ws_formulas = self.workbook_formulas[sheet_name] for row in ws_values.iter_rows(): for cell in row: formula_cell = ws_formulas[cell.coordinate] # Count formulas if formula_cell.value and isinstance(formula_cell.value, str) and formula_cell.value.startswith('='): total_formulas += 1 # Check for errors if cell.value is not None and isinstance(cell.value, str): for err in excel_errors: if err in cell.value: location = f"{sheet_name}!{cell.coordinate}" error_details[err].append(location) total_errors += 1 self.errors.append(f"{err} at {location}") break # Add summary info self.info.append(f"Total formulas: {total_formulas}") if total_errors == 0: self.info.append("✓ No formula errors found") else: self.errors.append(f"Total formula errors: {total_errors}") return error_details, total_errors def check_dcf_logic(self): """Validate DCF-specific logic and calculations""" self._check_terminal_growth_vs_wacc() self._check_w