Analyzing Financial Statements
AnthropicOfficialPublished by Anthropic
- Skill
- Research and analysis
- Business and productivity
- MIT
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The Financial Ratio Calculator skill enables users to process financial statement data to derive essential performance, liquidity, leverage, efficiency, and valuation metrics. It supports various input formats including CSV, JSON, and text descriptions, providing calculated values alongside industry-standard interpretations and trend analysis.
What it does
- Calculates profitability, liquidity, leverage, efficiency, and valuation ratios.
- Computes per-share metrics such as EPS and Book Value per Share.
- Provides interpretations and insights based on calculated financial figures.
- Supports trend analysis when multiple periods of data are provided.
- Generates formatted Excel reports containing the analysis results.
- Compares calculated ratios against available industry benchmarks.
When to use it
- When evaluating the financial health and performance of a company.
- When you need to perform comparative analysis using liquidity or efficiency ratios.
- When you have raw financial statement data and require automated ratio calculations.
- When assessing valuation metrics like P/E or EV/EBITDA for investment purposes.
Advantages
- Supports multiple data input formats including structured files and text.
- Automates the calculation of complex financial formulas.
- Provides contextual interpretation for the calculated metrics.
- Facilitates trend analysis across different reporting periods.
Usage examples
- “Calculate key financial ratios for this company based on the attached financial statements”
- The agent processes the provided financial data and returns a comprehensive report of profitability, liquidity, and valuation ratios.
- “What's the P/E ratio if the stock price is $50 and annual earnings are $2.50 per share?”
- The agent calculates the P/E ratio based on the provided figures and provides a brief interpretation.
- “Analyze the liquidity position using the balance sheet data”
- The agent extracts relevant balance sheet items to calculate and interpret the current, quick, and cash ratios.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/anthropics/analyzing-financial-statements/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip analyzing-financial-statements.zip -d .agents/skills
Documentation by Anthropic
Financial Ratio Calculator Skill
This skill provides comprehensive financial ratio analysis for evaluating company performance, profitability, liquidity, and valuation.
Capabilities
Calculate and interpret:
Profitability Ratios: ROE, ROA, Gross Margin, Operating Margin, Net Margin
Liquidity Ratios: Current Ratio, Quick Ratio, Cash Ratio
Leverage Ratios: Debt-to-Equity, Interest Coverage, Debt Service Coverage
Efficiency Ratios: Asset Turnover, Inventory Turnover, Receivables Turnover
Valuation Ratios: P/E, P/B, P/S, EV/EBITDA, PEG
Per-Share Metrics: EPS, Book Value per Share, Dividend per Share
How to Use
Input Data: Provide financial statement data (income statement, balance sheet, cash flow)
Select Ratios: Specify which ratios to calculate or use "all" for comprehensive analysis
Interpretation: The skill will calculate ratios and provide industry-standard interpretations
Input Format
Financial data can be provided as:
CSV with financial line items
JSON with structured financial statements
Text description of key financial figures
Excel files with financial statements
Output Format
Results include:
Calculated ratios with values
Industry benchmark comparisons (when available)
Trend analysis (if multiple periods provided)
Interpretation and insights
Excel report with formatted results
Example Usage
"Calculate key financial ratios for this company based on the attached financial statements"
"What's the P/E ratio if the stock price is $50 and annual earnings are $2.50 per share?"
"Analyze the liquidity position using the balance sheet data"
Scripts
calculate_ratios.py: Main calculation engine for all financial ratiosinterpret_ratios.py: Provides interpretation and benchmarking
Best Practices
Always validate data completeness before calculations
Handle missing values appropriately (use industry averages or exclude)
Consider industry context when interpreting ratios
Include period comparisons for trend analysis
Flag unusual or concerning ratios
Limitations
Requires accurate financial data
Industry benchmarks are general guidelines
Some ratios may not apply to all industries
Historical data doesn't guarantee future performance
Files
- ATTRIBUTION.mdAdded by AutoGineer921 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md2.4 KiB
- calculate_ratios.pyScript12.6 KiB
- interpret_ratios.pyScript16.1 KiB
interpret_ratios.py
"""
Financial ratio interpretation module.
Provides industry benchmarks and contextual analysis.
"""
from typing import Any
class RatioInterpreter:
"""Interpret financial ratios with industry context."""
# Industry benchmark ranges (simplified for demonstration)
BENCHMARKS = {
"technology": {
"current_ratio": {"excellent": 2.5, "good": 1.8, "acceptable": 1.2, "poor": 1.0},
"debt_to_equity": {"excellent": 0.3, "good": 0.5, "acceptable": 1.0, "poor": 2.0},
"roe": {"excellent": 0.25, "good": 0.18, "acceptable": 0.12, "poor": 0.08},
"gross_margin": {"excellent": 0.70, "good": 0.50, "acceptable": 0.35, "poor": 0.20},
"pe_ratio": {"undervalued": 15, "fair": 25, "growth": 35, "expensive": 50},
},
"retail": {
"current_ratio": {"excellent": 2.0, "good": 1.5, "acceptable": 1.0, "poor": 0.8},
"debt_to_equity": {"excellent": 0.5, "good": 0.8, "acceptable": 1.5, "poor": 2.5},
"roe": {"excellent": 0.20, "good": 0.15, "acceptable": 0.10, "poor": 0.05},
"gross_margin": {"excellent": 0.40, "good": 0.30, "acceptable": 0.20, "poor": 0.10},
"pe_ratio": {"undervalued": 12, "fair": 18, "growth": 25, "expensive": 35},
},
"financial": {
"current_ratio": {"excellent": 1.5, "good": 1.2, "acceptable": 1.0, "poor": 0.8},
"debt_to_equity": {"excellent": 1.0, "good": 2.0, "acceptable": 4.0, "poor": 6.0},
"roe": {"excellent": 0.15, "good": 0.12, "acceptable": 0.08, "poor": 0.05},
"pe_ratio": {"undervalued": 10, "fair": 15, "growth": 20, "expensive": 30},
},
"manufacturing": {
"current_ratio": {"excellent": 2.2, "good": 1.7, "acceptable": 1.3, "poor": 1.0},
"debt_to_equity": {"excellent": 0.4, "good": 0.7, "acceptable": 1.2, "poor": 2.0},
"roe": {"excellent": 0.18, "good": 0.14, "acceptable": 0.10, "poor": 0.06},
"gross_margin": {"excellent": 0.35, "good": 0.25, "acceptable": 0.18, "poor": 0.12},
"pe_ratio": {"undervalued": 14, "fair": 20, "growth": 28, "expensive": 40},
},
"healthcare": {
"current_ratio": {"excellent": 2.3, "good": 1.8, "acceptable": 1.4, "poor": 1.0},
"debt_to_equity": {"excellent": 0.3, "good": 0.6, "acceptable": 1.0, "poor": 1.8},
"roe": {"excellent": 0.22, "good": 0.16, "acceptable": 0.11, "poor": 0.07},
"gross_margin": {"excellent": 0.65, "good": 0.45, "acceptable": 0.30, "poor": 0.20},
"pe_ratio": {"undervalued": 18, "fair": 28, "growth": 40, "expensive": 55},
},
}
def __init__(self, industry: str = "general"):
"""
Initialize interpreter with industry context.
Args:
industry: Industry sector for benchmarking
"""
self.industry = industry.lower()
self.benchmarks = self.BENCHMARKS.get(self.industry, self._get_general_benchmarks())
def _get_general_benchmarks(self) -> dict[str, Any]:
"""Get general industry-agnostic benchmarks."""
return {
"current_ratio": {"excellent": 2.0, "good": 1.5, "acceptable": 1.0, "poor": 0.8},
"debt_to_equity": {"excellent": 0.5, "good": 1.0, "acceptable": 1.5, "poor": 2.5},
"roe": {"excellent": 0.20, "good": 0.15, "acceptable": 0.10, "poor": 0.05},
"gross_margin": {"excellent": 0.40, "good": 0.30, "acceptable": 0.20, "poor": 0.10},
"pe_ratio": {"undervalued": 15, "fair": 22, "growth": 30, "expensive": 45},
}
def interpret_ratio(self, ratio_name: str, value: float) -> dict[str, Any]:
"""
Interpret a single ratio with context.
Args:
ratio_name: Name of the ratio
value: Calculated ratio value
Returns:
Dictionary with interpretation details
"""
interpretation = {
"value": value,
"rating": "N/A",
"message": "",
"recommendation": "",
"benchmark_comparison": {},
}
if ratio_name in self.benchmarks:
benchmark = self.benchmarks[ratio_name]
interpretation["benchmark_comparison"] = benchmark
# Determine rating based on benchmarks
if ratio_name in ["current_ratio", "roe", "gross_margin"]:
# Higher is better
if value >= benchmark["excellent"]:
interpretation["rating"] = "Excellent"
interpretation["message"] = (
"Performance significantly exceeds industry standards"
)
elif value >= benchmark["good"]:
interpretation["rating"] = "Good"
interpretation["message"] = (
f"Above average performance for {self.industry} industry"
)
elif value >= benchmark["acceptable"]:
interpretation["rating"] = "Acceptable"
interpretation["message"] = "Meets industry standards"
else:
interpretation["rating"] = "Poor"
interpretation["message"] = "Below industry standards - attention needed"
elif ratio_name == "debt_to_equity":
# Lower is better
if value <= benchmark["excellent"]:
interpretation["rating"] = "Excellent"
interpretation["message"] = "Very conservative capital structure"
elif value <= benchmark["good"]:
interpretation["rating"] = "Good"
interpretation["message"] = "Healthy leverage level"
elif value <= benchmark["acceptable"]:
interpretation["rating"] = "Acceptable"
interpretation["message"] = "Moderate leverage"
else:
interpretation["rating"] = "Poor"
interpretation["message"] = "High leverage - potential risk"
elif ratio_name == "pe_ratio":
# Context-dependent
if value > 0:
if value < benchmark["undervalued"]:
interpretation["rating"] = "Potentially Undervalued"
interpretation["message"] = (
f"Trading below typical {self.industry} multiples"
)
elif value < benchmark["fair"]:
interpretation["rating"] = "Fair Value"
interpretation["message"] = "In line with industry averages"
elif value < benchmark["growth"]:
interpretation["rating"] = "Growth Premium"
interpretation["message"] = "Market pricing in growth expectations"
else:
interpretation["rating"] = "Expensive"
interpretation["message"] = "High valuation relative to industry"
# Add specific recommendations
interpretation["recommendation"] = self._get_recommendation(
ratio_name, interpretation["rating"]
)
return interpretation
def _get_recommendation(self, ratio_name: str, rating: str) -> str:
"""Generate actionable recommendations based on ratio and rating."""
recommendations = {
"current_ratio": {
"Poor": "Consider improving working capital management, reducing short-term debt, or increasing liquid assets",
"Acceptable": "Monitor liquidity closely and consider building additional cash reserves",
"Good": "Maintain current liquidity management practices",
"Excellent": "Strong liquidity position - consider productive use of excess cash",
},
"debt_to_equity": {
"Poor": "High leverage increases financial risk - consider debt reduction strategies",
"Acceptable": "Monitor debt levels and ensure adequate interest coverage",
"Good": "Balanced capital structure - maintain current approach",
"Excellent": "Conservative leverage - may consider strategic use of debt for growth",
},
"roe": {
"Poor": "Focus on improving operational efficiency and profitability",
"Acceptable": "Explore opportunities to enhance returns through operational improvements",
"Good": "Solid returns - continue current strategies",
"Excellent": "Outstanding performance - ensure sustainability of high returns",
},
"pe_ratio": {
"Potentially Undervalued": "May present buying opportunity if fundamentals are solid",
"Fair Value": "Reasonably priced relative to industry peers",
"Growth Premium": "Ensure growth prospects justify premium valuation",
"Expensive": "Consider valuation risk - ensure fundamentals support high multiple",
},
}
if ratio_name in recommendations and rating in recommendations[ratio_name]:
return recommendations[ratio_name][rating]
return "Continue monitoring this metric"
def analyze_trend(
self, ratio_name: str, values: list[float], periods: list[str]
) -> dict[str, Any]:
"""
Analyze trend in a ratio over time.
Args:
ratio_name: Name of the ratio
values: List of ratio values
periods: List of period labels
Returns:
Trend analysis dictionary
"""
if len(values) < 2:
return {
"trend": "Insufficient data",
"message": "Need at least 2 periods for trend analysis",
}
# Calculate trend
first_value = values[0]
last_value = values[-1]
change = last_value - first_value
pct_change = (change / abs(first_value)) * 100 if first_value != 0 else 0
# Determine trend direction
if abs(pct_change) < 5:
trend = "Stable"
elif pct_change > 0:
trend = "Improving" if ratio_name != "debt_to_equity" else "Deteriorating"
else:
trend = "Deteriorating" if ratio_name != "debt_to_equity" else "Improving"
return {
"trend": trend,
"change": change,
"pct_change": pct_change,
"message": f"{ratio_name} has {'increased' if change > 0 else 'decreased'} by {abs(pct_change):.1f}% from {periods[0]} to {periods[-1]}",
"values": list(zip(periods, values, strict=False)),
}
def generate_report(self, ratios: dict[str, Any]) -> str:
"""
Generate a comprehensive interpretation report.
Args:
ratios: Dictionary of calculated ratios
Returns:
Formatted report string
"""
report_lines = [
f"Financial Analysis Report - {self.industry.title()} Industry Context",
"=" * 70,
"",
]
for category, category_ratios in ratios.items():
report_lines.append(f"\n{category.upper()} ANALYSIS")
report_lines.append("-" * 40)
for ratio_name, value in category_ratios.items():
if isinstance(value, (int, float)):
interpretation = self.interpret_ratio(ratio_name, value)
report_lines.append(f"\n{ratio_name.replace('_', ' ').title()}:")
report_lines.append(f" Value: {value:.2f}")
report_lines.append(f" Rating: {interpretation['rating']}")
report_lines.append(f" Analysis: {interpretation['message']}")
report_lines.append(f" Action: {interpretation['recommendation']}")
return "\n".join(report_lines)
def perform_comprehensive_analysis(
ratios: dict[str, Any],
industry: str = "general",
historical_data: dict[str, Any] | None = None,
) -> dict[str, Any]:
"""
Perform comprehensive ratio analysis with interpretations.
Args:
ratios: Calculated financial ratios
industry: Industry sector for benchmarking
historical_data: Optional historical ratio data for trend analysis
Returns:
Complete analysis with interpretations and recommendations
"""
interpreter = RatioInterpreter(industry)
analysis = {
"current_analysis": {},
"trend_analysis": {},
"overall_health": {},
"recommendations": [],
}
# Analyze current ratios
for category, category_ratios in ratios.items():
analysis["current_analysis"][category] = {}
for ratio_name, value in category_ratios.items():
if isinstance(value, (int, float)):
analysis["current_analysis"][category][ratio_name] = interpreter.interpret_ratio(
ratio_name, value
)
# Perform trend analysis if historical data provided
if historical_data:
for ratio_name, historical_values in historical_data.items():
if "values" in historical_values and "periods" in historical_values:
analysis["trend_analysis"][ratio_name] = interpreter.analyze_trend(
ratio_name, historical_values["values"], historical_values["periods"]
)
# Generate overall health assessment
analysis["overall_health"] = _assess_overall_health(analysis["current_analysis"])
# Generate key recommendations
analysis["recommendations"] = _generate_key_recommendations(analysis)
# Add formatted report
analysis["report"] = interpreter.generate_report(ratios)
return analysis
def _assess_overall_health(current_analysis: dict[str, Any]) -> dict[str, str]:
"""Assess overall financial health based on ratio analysis."""
ratings = []
for _category, category_analysis in current_analysis.items():
for _ratio_name, ratio_analysis in category_analysis.items():
if "rating" in ratio_analysis:
ratings.append(ratio_analysis["rating"])
# Simple scoring system
score_map = {
"Excellent": 4,
"Good": 3,
"Acceptable": 2,
"Poor": 1,
"Fair Value": 3,
"Potentially Undervalued": 3,
"Growth Premium": 2,
"Expensive": 1,
}
scores = [score_map.get(rating, 2) for rating in ratings]
avg_score = sum(scores) / len(scores) if scores else 0
if avg_score >= 3.5:
health = "Excellent"
message = "Company shows strong financial health across most metrics"
elif avg_score >= 2.5:
health = "Good"
message = "Overall healthy financial position with some areas for improvement"
elif avg_score >= 1.5:
health = "Fair"
message = "Mixed financial indicators - attention needed in several areas"
else:
health = "Poor"
message = "Significant financial challenges requiring immediate attention"
return {"status": health, "message": message, "score": f"{avg_score:.1f}/4.0"}
def _generate_key_recommendations(analysis: dict[str, Any]) -> list[str]:
"""Generate prioritized recommendations based on analysis."""
recommendations = []
# Check for critical issues
for _category, category_analysis in analysis["current_analysis"].items():
for ratio_name, ratio_analysis in category_analysis.items():
if ratio_analysis.get("rating") == "Poor":
recommendations.append(
f"Priority: Address {ratio_name.replace('_', ' ')} - {ratio_analysis.get('recommendation', '')}"
)
# Add trend-based recommendations
for ratio_name, trend in analysis.get("trend_analysis", {}).items():
if trend.get("trend") == "Deteriorating":
recommendations.append(
f"Monitor: {ratio_name.replace('_', ' ')} showing negative trend"
)
# Add general recommendations if healthy
if not recommendations:
recommendations.append("Continue current financial management practices")
recommendations.append("Consider strategic growth opportunities")
return recommendations[:5] # Return top 5 recommendations
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/analyzing-financial-statements · 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 analyzing-financial-statements.zip