Creating Financial Models
AnthropicOfficialPublished by Anthropic
- Skill
- Content generator
- Business and productivity
- MIT
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a suite of financial modeling tools designed for investment analysis and decision-making. It supports various methodologies including Discounted Cash Flow (DCF) analysis, sensitivity testing, Monte Carlo simulations, and scenario planning. The toolkit is structured to handle corporate valuations, project finance, M&A analysis, and leveraged buyout (LBO) models, incorporating standard financial modeling practices such as clear input separation and error validation.
What it does
- Generates DCF models with growth scenarios and terminal value calculations.
- Performs sensitivity analysis to test the impact of key variables on valuation.
- Runs Monte Carlo simulations to model uncertainty and generate probability distributions.
- Develops scenario planning models for different economic environments.
- Provides statistical summaries, confidence intervals, and risk metrics.
- Includes automated checks for balance sheet integrity and circular references.
When to use it
- When performing corporate or project-based valuations.
- When assessing the impact of changing assumptions on financial outcomes.
- When quantifying risk and uncertainty in investment projections.
- When comparing multiple strategic outcomes or economic scenarios.
Advantages
- Supports multiple valuation methods for triangulation.
- Enables rigorous stress testing and risk quantification.
- Automates complex calculations like WACC and probability distributions.
- Adheres to structured modeling standards for clarity and validation.
Usage examples
- “Build a DCF model for this technology company using the attached financials”
- Generates a complete DCF model including financial projections, free cash flow calculations, and enterprise value summary.
- “Run a Monte Carlo simulation on this acquisition model with 5,000 iterations”
- Produces a statistical summary of valuations, including confidence intervals and probability of loss metrics.
- “Create sensitivity analysis showing impact of growth rate and WACC on valuation”
- Provides sensitivity tables and a tornado chart identifying the critical value drivers.
- “Develop three scenarios for this expansion project with probability weights”
- Creates a scenario comparison table with probability-weighted expected values and risk-return profiles.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/anthropics/creating-financial-models/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip creating-financial-models.zip -d .agents/skills
Documentation by Anthropic
Financial Modeling Suite
A comprehensive financial modeling toolkit for investment analysis, valuation, and risk assessment using industry-standard methodologies.
Core Capabilities
1. Discounted Cash Flow (DCF) Analysis
Build complete DCF models with multiple growth scenarios
Calculate terminal values using perpetuity growth and exit multiple methods
Determine weighted average cost of capital (WACC)
Generate enterprise and equity valuations
2. Sensitivity Analysis
Test key assumptions impact on valuation
Create data tables for multiple variables
Generate tornado charts for sensitivity ranking
Identify critical value drivers
3. Monte Carlo Simulation
Run thousands of scenarios with probability distributions
Model uncertainty in key inputs
Generate confidence intervals for valuations
Calculate probability of achieving targets
4. Scenario Planning
Build best/base/worst case scenarios
Model different economic environments
Test strategic alternatives
Compare outcome probabilities
Input Requirements
For DCF Analysis
Historical financial statements (3-5 years)
Revenue growth assumptions
Operating margin projections
Capital expenditure forecasts
Working capital requirements
Terminal growth rate or exit multiple
Discount rate components (risk-free rate, beta, market premium)
For Sensitivity Analysis
Base case model
Variable ranges to test
Key metrics to track
For Monte Carlo Simulation
Probability distributions for uncertain variables
Correlation assumptions between variables
Number of iterations (typically 1,000-10,000)
For Scenario Planning
Scenario definitions and assumptions
Probability weights for scenarios
Key performance indicators to track
Output Formats
DCF Model Output
Complete financial projections
Free cash flow calculations
Terminal value computation
Enterprise and equity value summary
Valuation multiples implied
Excel workbook with full model
Sensitivity Analysis Output
Sensitivity tables showing value ranges
Tornado chart of key drivers
Break-even analysis
Charts showing relationships
Monte Carlo Output
Probability distribution of valuations
Confidence intervals (e.g., 90%, 95%)
Statistical summary (mean, median, std dev)
Risk metrics (VaR, probability of loss)
Scenario Planning Output
Scenario comparison table
Probability-weighted expected values
Decision tree visualization
Risk-return profiles
Model Types Supported
Corporate Valuation
Mature companies with stable cash flows
Growth companies with J-curve projections
Turnaround situations
Project Finance
Infrastructure projects
Real estate developments
Energy projects
M&A Analysis
Acquisition valuations
Synergy modeling
Accretion/dilution analysis
LBO Models
Leveraged buyout analysis
Returns analysis (IRR, MOIC)
Debt capacity assessment
Best Practices Applied
Modeling Standards
Consistent formatting and structure
Clear assumption documentation
Separation of inputs, calculations, outputs
Error checking and validation
Version control and change tracking
Valuation Principles
Use multiple valuation methods for triangulation
Apply appropriate risk adjustments
Consider market comparables
Validate against trading multiples
Document key assumptions clearly
Risk Management
Identify and quantify key risks
Use probability-weighted scenarios
Stress test extreme cases
Consider correlation effects
Provide confidence intervals
Example Usage
"Build a DCF model for this technology company using the attached financials"
"Run a Monte Carlo simulation on this acquisition model with 5,000 iterations"
"Create sensitivity analysis showing impact of growth rate and WACC on valuation"
"Develop three scenarios for this expansion project with probability weights"
Scripts Included
dcf_model.py: Complete DCF valuation enginesensitivity_analysis.py: Sensitivity testing framework
Limitations and Disclaimers
Models are only as good as their assumptions
Past performance doesn't guarantee future results
Market conditions can change rapidly
Regulatory and tax changes may impact results
Professional judgment required for interpretation
Not a substitute for professional financial advice
Quality Checks
The model automatically performs:
Balance sheet balancing checks
Cash flow reconciliation
Circular reference resolution
Sensitivity bound checking
Statistical validation of Monte Carlo results
Updates and Maintenance
Models use latest financial theory and practices
Regular updates for market parameter defaults
Incorporation of regulatory changes
Continuous improvement based on usage patterns
Files
- ATTRIBUTION.mdAdded by AutoGineer911 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md5.0 KiB
- dcf_model.pyScript16.8 KiB
- sensitivity_analysis.pyScript11.3 KiB
sensitivity_analysis.py
"""
Sensitivity analysis module for financial models.
Tests impact of variable changes on key outputs.
"""
from collections.abc import Callable
from typing import Any
import numpy as np
import pandas as pd
class SensitivityAnalyzer:
"""Perform sensitivity analysis on financial models."""
def __init__(self, base_model: Any):
"""
Initialize sensitivity analyzer.
Args:
base_model: Base financial model to analyze
"""
self.base_model = base_model
self.base_output = None
self.sensitivity_results = {}
def one_way_sensitivity(
self,
variable_name: str,
base_value: float,
range_pct: float,
steps: int,
output_func: Callable,
model_update_func: Callable,
) -> pd.DataFrame:
"""
Perform one-way sensitivity analysis.
Args:
variable_name: Name of variable to test
base_value: Base case value
range_pct: +/- percentage range to test
steps: Number of steps in range
output_func: Function to calculate output metric
model_update_func: Function to update model with new value
Returns:
DataFrame with sensitivity results
"""
# Calculate range
min_val = base_value * (1 - range_pct)
max_val = base_value * (1 + range_pct)
test_values = np.linspace(min_val, max_val, steps)
results = []
for value in test_values:
# Update model
model_update_func(value)
# Calculate output
output = output_func()
results.append(
{
"variable": variable_name,
"value": value,
"pct_change": (value - base_value) / base_value * 100,
"output": output,
"output_change": output - self.base_output if self.base_output else 0,
}
)
# Reset to base
model_update_func(base_value)
return pd.DataFrame(results)
def two_way_sensitivity(
self,
var1_name: str,
var1_base: float,
var1_range: list[float],
var2_name: str,
var2_base: float,
var2_range: list[float],
output_func: Callable,
model_update_func: Callable,
) -> pd.DataFrame:
"""
Perform two-way sensitivity analysis.
Args:
var1_name: First variable name
var1_base: First variable base value
var1_range: Range of values for first variable
var2_name: Second variable name
var2_base: Second variable base value
var2_range: Range of values for second variable
output_func: Function to calculate output
model_update_func: Function to update model (takes var1, var2)
Returns:
DataFrame with two-way sensitivity table
"""
results = np.zeros((len(var1_range), len(var2_range)))
for i, val1 in enumerate(var1_range):
for j, val2 in enumerate(var2_range):
# Update both variables
model_update_func(val1, val2)
# Calculate output
results[i, j] = output_func()
# Reset to base
model_update_func(var1_base, var2_base)
# Create DataFrame
df = pd.DataFrame(
results,
index=[f"{var1_name}={v:.2%}" if v < 1 else f"{var1_name}={v:.1f}" for v in var1_range],
columns=[
f"{var2_name}={v:.2%}" if v < 1 else f"{var2_name}={v:.1f}" for v in var2_range
],
)
return df
def tornado_analysis(
self, variables: dict[str, dict[str, Any]], output_func: Callable
) -> pd.DataFrame:
"""
Create tornado diagram data showing relative impact of variables.
Args:
variables: Dictionary of variables with base, low, high values
output_func: Function to calculate output
Returns:
DataFrame sorted by impact magnitude
"""
# Store base output
self.base_output = output_func()
tornado_data = []
for var_name, var_info in variables.items():
# Test low value
var_info["update_func"](var_info["low"])
low_output = output_func()
# Test high value
var_info["update_func"](var_info["high"])
high_output = output_func()
# Reset to base
var_info["update_func"](var_info["base"])
# Calculate impact
impact = high_output - low_output
low_delta = low_output - self.base_output
high_delta = high_output - self.base_output
tornado_data.append(
{
"variable": var_name,
"base_value": var_info["base"],
"low_value": var_info["low"],
"high_value": var_info["high"],
"low_output": low_output,
"high_output": high_output,
"low_delta": low_delta,
"high_delta": high_delta,
"impact": abs(impact),
"impact_pct": abs(impact) / self.base_output * 100,
}
)
# Sort by impact
df = pd.DataFrame(tornado_data)
df = df.sort_values("impact", ascending=False)
return df
def scenario_analysis(
self,
scenarios: dict[str, dict[str, float]],
variable_updates: dict[str, Callable],
output_func: Callable,
probability_weights: dict[str, float] | None = None,
) -> pd.DataFrame:
"""
Analyze multiple scenarios with different variable combinations.
Args:
scenarios: Dictionary of scenarios with variable values
variable_updates: Functions to update each variable
output_func: Function to calculate output
probability_weights: Optional probability for each scenario
Returns:
DataFrame with scenario results
"""
results = []
for scenario_name, variables in scenarios.items():
# Update all variables for this scenario
for var_name, value in variables.items():
if var_name in variable_updates:
variable_updates[var_name](value)
# Calculate output
output = output_func()
# Get probability if provided
prob = (
probability_weights.get(scenario_name, 1 / len(scenarios))
if probability_weights
else 1 / len(scenarios)
)
results.append(
{
"scenario": scenario_name,
"probability": prob,
"output": output,
**variables, # Include all variable values
}
)
# Reset model (simplified - should restore all base values)
df = pd.DataFrame(results)
# Calculate expected value
df["weighted_output"] = df["output"] * df["probability"]
expected_value = df["weighted_output"].sum()
# Add summary row
summary = pd.DataFrame(
[
{
"scenario": "Expected Value",
"probability": 1.0,
"output": expected_value,
"weighted_output": expected_value,
}
]
)
df = pd.concat([df, summary], ignore_index=True)
return df
def breakeven_analysis(
self,
variable_name: str,
variable_update: Callable,
output_func: Callable,
target_value: float,
min_search: float,
max_search: float,
tolerance: float = 0.01,
) -> float:
"""
Find breakeven point where output equals target.
Args:
variable_name: Variable to adjust
variable_update: Function to update variable
output_func: Function to calculate output
target_value: Target output value
min_search: Minimum search range
max_search: Maximum search range
tolerance: Convergence tolerance
Returns:
Breakeven value of variable
"""
# Binary search for breakeven
low = min_search
high = max_search
while (high - low) > tolerance:
mid = (low + high) / 2
variable_update(mid)
output = output_func()
if abs(output - target_value) < tolerance:
return mid
elif output < target_value:
low = mid
else:
high = mid
return (low + high) / 2
def create_data_table(
row_variable: tuple[str, list[float], Callable],
col_variable: tuple[str, list[float], Callable],
output_func: Callable,
) -> pd.DataFrame:
"""
Create Excel-style data table for two variables.
Args:
row_variable: (name, values, update_function)
col_variable: (name, values, update_function)
output_func: Function to calculate output
Returns:
DataFrame formatted as data table
"""
row_name, row_values, row_update = row_variable
col_name, col_values, col_update = col_variable
results = np.zeros((len(row_values), len(col_values)))
for i, row_val in enumerate(row_values):
for j, col_val in enumerate(col_values):
row_update(row_val)
col_update(col_val)
results[i, j] = output_func()
df = pd.DataFrame(
results,
index=pd.Index(row_values, name=row_name),
columns=pd.Index(col_values, name=col_name),
)
return df
# Example usage
if __name__ == "__main__":
# Mock model for demonstration
class SimpleModel:
def __init__(self):
self.revenue = 1000
self.margin = 0.20
self.multiple = 10
def calculate_value(self):
ebitda = self.revenue * self.margin
return ebitda * self.multiple
# Create model and analyzer
model = SimpleModel()
analyzer = SensitivityAnalyzer(model)
# One-way sensitivity
results = analyzer.one_way_sensitivity(
variable_name="Revenue",
base_value=model.revenue,
range_pct=0.20,
steps=5,
output_func=model.calculate_value,
model_update_func=lambda x: setattr(model, "revenue", x),
)
print("One-Way Sensitivity Analysis:")
print(results)
# Tornado analysis
variables = {
"Revenue": {
"base": 1000,
"low": 800,
"high": 1200,
"update_func": lambda x: setattr(model, "revenue", x),
},
"Margin": {
"base": 0.20,
"low": 0.15,
"high": 0.25,
"update_func": lambda x: setattr(model, "margin", x),
},
"Multiple": {
"base": 10,
"low": 8,
"high": 12,
"update_func": lambda x: setattr(model, "multiple", x),
},
}
tornado = analyzer.tornado_analysis(variables, model.calculate_value)
print("\nTornado Analysis:")
print(tornado[["variable", "impact", "impact_pct"]])
Requirements and compatibility
Written for: Claude Code, Claude apps
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Python
Security
What our scanner noticed· Low risk
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Anthropic
- Publisher
- Anthropic (Official)
- Source
- anthropics/claude-cookbooks · skills/custom_skills/creating-financial-models · commit ce8b262
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Anthropic.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download creating-financial-models.zip