1.305 Fiscal Health Metrics#
Libraries and tools for calculating and tracking government financial health indicators. Focuses on municipal credit score calculation, pension obligation modeling, revenue volatility analysis, and debt sustainability metrics to support fiscal planning and oversight.
Explainer
Domain: Fiscal Health Metrics#
What This Domain Is About#
Government fiscal health is the ability of a jurisdiction to meet its financial obligations now and in the future. This domain focuses on quantitative tools and libraries for assessing whether governments (cities, counties, states) are financially sustainable, creditworthy, and well-managed.
Unlike corporate finance where profitability is the key metric, government fiscal health involves:
- Revenue stability (can they maintain services through economic cycles?)
- Debt sustainability (can they service debt without cutting essential services?)
- Pension obligations (can they meet promises to retirees?)
- Fund balances (do they have reserves for emergencies?)
- Long-term liabilities (are they deferring costs to future generations?)
Key Challenges#
1. Fund Accounting vs. Corporate Accounting#
- Governments use fund accounting (separate pools of money for specific purposes)
- Corporate finance tools don’t translate directly
- GASB standards differ from FASB (corporate accounting)
- Multiple funds need aggregation for overall fiscal health picture
2. Data Availability and Quality#
- Small jurisdictions may not publish CAFRs (Comprehensive Annual Financial Reports)
- Data scattered across: annual budgets, CAFRs, bond disclosures, census reports
- Timeliness varies (some publish 18 months after fiscal year-end)
- Inconsistent reporting across jurisdictions
3. Complex Actuarial Modeling#
- Pension obligations require demographic projections
- Investment return assumptions are policy choices (3% vs 7.5% makes huge difference)
- Healthcare cost inflation is unpredictable
- Longevity trends affect liability calculations
4. Peer Comparison Challenges#
- What makes a valid peer? (Population size? Economy type? Region?)
- Accounting method differences (some use modified accrual, some full accrual)
- Economic context varies wildly (boom town vs declining industrial city)
- Legal constraints differ by state (debt limits, balanced budget requirements)
Why Existing Tools Fall Short#
General financial libraries (pandas, numpy, financial calculators) provide:
- Mathematical functions (NPV, IRR, time value of money)
- But NOT: Government-specific metrics, GASB-compliant reporting, fund accounting
Spreadsheet templates (Excel models circulated among practitioners):
- Customized per jurisdiction
- Not reusable without major rework
- Error-prone (formula bugs, copy-paste mistakes)
- Not version-controlled or peer-reviewed
Commercial rating agencies (Moody’s, S&P, Fitch):
- Sophisticated models for credit rating
- But: Proprietary methodologies, expensive ($10k+ per rating), not transparent
- Small governments can’t afford ratings
- Investors and researchers can’t replicate analysis
Academic research models:
- Published in papers with methodology described
- But: Code rarely published, not maintained, not packaged as libraries
- Each researcher builds from scratch
Current State of Practice#
What Practitioners Do Today#
Municipal finance officers:
Annual fiscal health assessment process:
1. Export data from financial system to Excel
2. Manually calculate 20+ financial ratios
3. Create charts comparing to prior years
4. Write narrative report for city council
5. Repeat next year (no automation, no reusable code)Bond investors:
Credit analysis workflow:
1. Purchase rating agency reports ($500-$1000 per report)
2. Read CAFR PDFs (100-300 pages)
3. Manually extract key metrics to spreadsheet
4. Compare to peer cities (manual research)
5. Make investment decision with limited comparative dataState oversight agencies:
Municipal distress monitoring:
1. Collect CAFRs from 100+ municipalities (manual requests)
2. Each analyst assigned 20-30 cities
3. Spot-check red flags (late payments, fund deficits)
4. Alert system is reactive, not predictive
5. No systematic pattern detection across all jurisdictionsPolicy researchers:
Fiscal policy impact study:
1. Manually collect data from 50+ jurisdiction CAFRs
2. Build custom analysis code per study
3. Results not easily reproducible by others
4. Infrastructure not reusable for next study
5. Findings published, code/data often not sharedThe Gap This Domain Addresses#
There’s a missing layer of fiscal health analysis infrastructure between:
- Low-level tools (spreadsheets, general financial libraries)
- High-level applications (rating agency reports, transparency portals)
This infrastructure should provide:
Standardized metrics with clear definitions
- Debt-to-revenue ratio (using what revenue measure? General fund? All funds?)
- Quick ratio (which funds count as liquid?)
- Pension funded ratio (actuarial vs GASB reporting?)
- Revenue diversification (Herfindahl index calculation)
Reusable calculation engines
- Input: CAFR data (structured or parsed from PDF)
- Output: Full set of fiscal health metrics
- Handles: Different accounting methods, missing data, outliers
Peer comparison frameworks
- Clustering: Find similar jurisdictions automatically
- Benchmarking: Compare metrics to peer groups
- Normalization: Account for size, economy, regional differences
Forecasting and scenario analysis
- Revenue projections with uncertainty bands
- Debt service schedules under different refinancing scenarios
- Pension liability projections under different return assumptions
- “What-if” analysis for policy decisions
Example Use Cases#
Municipal Finance Officer: Annual Fiscal Health Report#
Scenario: Finance director needs to present fiscal health to city council
Current approach:
# Hours of manual Excel work
# - Export data from financial system
# - Calculate ratios one by one
# - Create charts
# - Write narrative
# - No comparison to peers or historical trendsWith fiscal health infrastructure:
from fiscal_health import CAFRData, HealthMetrics, PeerComparison
# Load financial data
cafr = CAFRData.from_pdf('city_cafr_2024.pdf')
# Or: cafr = CAFRData.from_dict(exported_data)
# Calculate all standard metrics
metrics = HealthMetrics(cafr)
print(f"Quick Ratio: {metrics.quick_ratio:.2f}")
print(f"Debt-to-Revenue: {metrics.debt_to_revenue:.1%}")
print(f"Pension Funded Ratio: {metrics.pension_funded_ratio:.1%}")
print(f"Revenue Diversification (HHI): {metrics.revenue_herfindahl:.3f}")
print(f"Fund Balance as % of Revenue: {metrics.fund_balance_ratio:.1%}")
# Compare to historical
trend = metrics.compare_to_years([2020, 2021, 2022, 2023, 2024])
trend.plot(metrics=['debt_to_revenue', 'fund_balance_ratio'])
# Compare to peers
peers = PeerComparison.find_peers(
cafr,
criteria=['population', 'median_income', 'region'],
n_peers=10
)
comparison = peers.compare(metrics)
print(comparison.summary()) # "Above average on reserves, below on debt burden"
# Generate report
report = metrics.generate_report(
format='pdf',
include=['metrics', 'trends', 'peer_comparison', 'recommendations']
)
report.save('fiscal_health_2024.pdf')Bond Investor: Independent Credit Assessment#
Scenario: Investor evaluating municipal bonds, wants independent analysis
Current approach:
1. Purchase Moody's/S&P report (~$500)
2. Read 300-page CAFR manually
3. Extract key numbers to spreadsheet
4. Limited ability to compare across many bonds
5. Expensive and time-consuming at scaleWith fiscal health infrastructure:
from fiscal_health import CreditScorer, BondAnalyzer
# Load multiple jurisdictions
cities = [
CAFRData.from_pdf('city_a_cafr.pdf'),
CAFRData.from_pdf('city_b_cafr.pdf'),
CAFRData.from_pdf('city_c_cafr.pdf'),
]
# Score each jurisdiction
scorer = CreditScorer(methodology='transparent_municipal_v1')
for city in cities:
score = scorer.score(city)
print(f"{city.name}: {score.grade} ({score.numeric_score}/100)")
print(f" Strengths: {', '.join(score.strengths)}")
print(f" Risks: {', '.join(score.risks)}")
print(f" Comparable to: {score.rating_agency_equivalent}")
print()
# Analyze specific bond offering
bond = BondAnalyzer(
issuer=cities[0],
bond_amount=50_000_000,
term_years=20,
purpose='water_infrastructure'
)
assessment = bond.assess_risk()
print(f"Debt Service Coverage: {assessment.coverage_ratio:.2f}x")
print(f"New Debt as % of Revenue: {assessment.debt_increase_pct:.1%}")
print(f"Credit Impact: {assessment.rating_impact}") # "Neutral to Positive"State Oversight: Early Warning System#
Scenario: State treasurer monitors 150 municipalities for fiscal distress
Current approach:
1. Collect CAFRs manually (email requests, wait for responses)
2. Staff of 5 analysts, each monitors 30 cities
3. Spot-check for red flags (late payments, negative fund balances)
4. Reactive: Problems discovered after they're severe
5. Inconsistent: Different analysts use different criteriaWith fiscal health infrastructure:
from fiscal_health import DistressDetector, DataCollector
# Automated data collection (from state databases, open data portals)
collector = DataCollector(state='Massachusetts')
jurisdictions = collector.fetch_all_cafr_data(year=2024)
print(f"Collected data from {len(jurisdictions)} municipalities")
# Run distress detection on all jurisdictions
detector = DistressDetector(
red_flags=[
'negative_general_fund_balance',
'debt_service_coverage_below_1.0',
'revenue_decline_two_years',
'pension_funded_below_40',
'reliance_on_one_time_revenue'
],
severity_weights='state_policy'
)
# Get ranked list of concerns
results = detector.analyze_all(jurisdictions)
high_risk = results.filter(risk_level='high')
medium_risk = results.filter(risk_level='medium')
print(f"High Risk: {len(high_risk)} municipalities")
for jurisdiction in high_risk:
print(f" {jurisdiction.name}: {jurisdiction.primary_concern}")
print(f" Distress Score: {jurisdiction.score}/100")
print(f" Trend: {jurisdiction.trend}") # "Deteriorating", "Stable", "Improving"
# Generate alerts
for j in high_risk:
alert = detector.generate_alert(j, recipient='oversight_team')
alert.send() # Email with key metrics, trends, recommended actions
# Dashboard for ongoing monitoring
dashboard = detector.create_dashboard(
jurisdictions,
refresh_interval='monthly',
visualizations=['risk_map', 'trend_chart', 'outlier_detection']
)
dashboard.deploy('https://fiscal-oversight.state.ma.us/')Policy Researcher: Fiscal Impact Study#
Scenario: Researcher studying impact of tax policy changes on fiscal health
Current approach:
1. Manually collect CAFRs from 50 jurisdictions (weeks of work)
2. Extract data to spreadsheet (error-prone)
3. Write custom analysis code (not reusable)
4. Publish findings (code/data often not shared)
5. Next researcher starts from scratchWith fiscal health infrastructure:
from fiscal_health import CAFRData, HealthMetrics, PolicySimulator
# Reproducible data collection
collector = DataCollector()
study_set = collector.fetch_jurisdictions(
states=['California', 'Texas', 'New York'],
population_range=(50_000, 500_000),
years=range(2015, 2025)
)
print(f"Study dataset: {len(study_set)} jurisdictions over 10 years")
# Calculate metrics for all jurisdiction-years
metrics_panel = HealthMetrics.panel_data(study_set)
# Identify tax policy changes
policy_changes = PolicySimulator.identify_policy_changes(
study_set,
policy_type='property_tax_limits'
)
# Analyze fiscal health impact
from fiscal_health.analysis import DifferenceInDifferences
analysis = DifferenceInDifferences(
panel=metrics_panel,
treatment_var='adopted_tax_limit',
outcome_vars=['revenue_growth', 'debt_ratio', 'fund_balance'],
control_vars=['population', 'median_income', 'year']
)
results = analysis.estimate()
print(results.summary())
# "Tax limits associated with 1.2 pp slower revenue growth,
# 0.3 pp increase in debt ratio, no significant effect on reserves"
# Publish reproducible research
analysis.export_replication_package(
path='fiscal_policy_study_2025',
include=['data', 'code', 'results', 'documentation']
)Civic Transparency: Public Dashboard#
Scenario: Civic tech org building transparency portal for residents
Current approach:
1. Manually extract data from city CAFR
2. Create custom visualizations
3. Write explanations in plain language
4. Hard to update (manual process each year)
5. No comparison to other citiesWith fiscal health infrastructure:
from fiscal_health import CAFRData, HealthMetrics, CitizenReport
# Load city financial data
cafr = CAFRData.from_pdf('city_cafr_2024.pdf')
metrics = HealthMetrics(cafr)
# Generate citizen-friendly report
report = CitizenReport(metrics, audience='general_public')
# Automatic plain-language explanations
print(report.explain('debt_to_revenue'))
# "The city has $1.20 in debt for every $1.00 of annual revenue.
# This is similar to a household with $60k income having $72k in debt
# (like a car loan and some credit card debt).
# This is within the healthy range for cities our size."
# Comparison to peers (automatically found)
peers = report.find_peers(auto=True)
comparison = report.compare_to_peers(peers, metric='debt_to_revenue')
print(comparison)
# "Our city's debt level is lower than 70% of similar cities."
# Interactive dashboard
dashboard = report.create_dashboard(
widgets=[
'fiscal_health_score',
'debt_trends',
'revenue_composition',
'peer_comparison',
'pension_status',
'reserve_levels'
],
style='accessible' # WCAG 2.1 AA compliant
)
dashboard.deploy('https://ourmoney.cityname.gov/')Technical Challenges#
1. Revenue Volatility Modeling#
Challenge: Revenue streams have different volatility profiles
- Property tax: Stable, predictable (changes slowly)
- Sales tax: Volatile, correlates with consumer spending
- Income tax: Highly volatile, correlates with employment
- Fees and charges: Variable by type
- Intergovernmental transfers: Subject to state/federal budget changes
Complexity:
- Time series analysis with multiple revenue sources
- Correlation with economic indicators (local employment, GDP, housing prices)
- Structural breaks (tax policy changes, economic shocks)
- Forecasting with uncertainty quantification
Existing tools: General time series libraries (statsmodels, Prophet)
Gap: Need government revenue-specific models that understand:
- Revenue source characteristics
- Policy change impacts
- Multi-jurisdiction patterns
- Integration with economic forecasting
2. Pension Obligation Modeling#
Challenge: Calculating unfunded pension liability requires actuarial expertise
Complexity:
- Demographic projections (retirements, deaths, new hires)
- Salary growth assumptions
- Investment return assumptions (7.5% vs 3% = huge difference)
- Healthcare cost inflation for OPEB (other post-employment benefits)
- Plan design details (benefit formulas, vesting, COLA)
Existing tools:
- Commercial actuarial software (very expensive, not libraries)
- Academic models (research code, not production-ready)
Gap: Need open-source actuarial engine for government pensions:
- Standard demographic models
- Sensitivity analysis across return assumptions
- GASB 67/68 compliant reporting
- Stress testing (recession scenarios, longevity changes)
- Integration with CAFR data
3. Credit Score Calculation#
Challenge: Rating agencies use proprietary, complex methodologies
Complexity:
- Multifactor models (20+ input variables)
- Qualitative factors (management quality, economic outlook)
- Peer comparison and benchmarking
- Historical default data (rare for municipal bonds)
- Distinction between general obligation and revenue bonds
Existing tools:
- Rating agency methodologies (proprietary, not reproducible)
- Academic credit risk models (corporate focused, not municipal)
Gap: Need transparent municipal credit scoring:
- Factor-based model (clear input variables, weights)
- Replicable methodology (no black boxes)
- Calibrated to historical performance
- Open to peer review and improvement
- Produces ratings comparable to Moody’s/S&P for validation
4. Debt Sustainability Assessment#
Challenge: What’s “too much” debt depends on context
Complexity:
- Debt ratios need context (debt for what purpose?)
- Debt service coverage (can they afford payments?)
- Legal constraints (debt limits vary by state)
- Economic capacity (wealthy suburb vs declining city)
- Peer comparison (who are valid peers?)
Existing tools:
- Standard ratio calculations (simple formulas)
- But no frameworks for interpretation, peer selection, capacity modeling
Gap: Need debt sustainability framework:
- Standard metric calculation with clear definitions
- Peer selection methodology (clustering by characteristics)
- Borrowing capacity models (within legal/policy constraints)
- Scenario analysis (what if interest rates rise?)
- Integration with capital planning
Related Research Domains#
From This Survey#
1.020: Linear Programming
- Relevant for: Budget optimization under fiscal constraints
- Use case: Maximize service delivery subject to debt limits, balanced budget requirements
- Gap: Public sector objective functions different from corporate profit maximization
1.027: Numerical Integration
- Relevant for: Actuarial calculations in pension modeling
- Use case: Integrate demographic distributions, survival curves for liability calculations
- Foundation: Mathematical tools applicable to fiscal modeling
1.300: Public Finance Modeling
- Closely related: Tax/revenue modeling feeds into fiscal health assessment
- Use case: Revenue projections from tax policy are inputs to sustainability analysis
- Connection: Revenue volatility analysis in this domain uses revenue models from 1.300
1.301: Government Data Access
- Foundation: Need to access Census, economic data for forecasting models
- Use case: Population trends, income data, employment statistics for revenue projections
- Integration: Fiscal health tools should interface with 1.301 data access libraries
1.302: Budget Document Parsing
- Foundation: Extract financial data from CAFRs for fiscal health analysis
- Use case: Automated data collection from PDF financial reports
- Integration: Parsed CAFR data is input to fiscal health metric calculation
1.310-319: Corporate Finance
- Partial overlap: Some financial analysis infrastructure is shared
- Differences: Fund accounting vs corporate, no profit metric, bond market vs stock market
- Shared needs: Time series analysis, forecasting, ratio calculation
Beyond This Survey#
Academic Literature:
- Municipal fiscal distress prediction models (logit models, machine learning)
- Pension obligation research (actuarial methods, underfunding causes)
- Revenue forecasting (time series methods, economic indicators)
- Credit risk modeling (though mostly corporate focused)
Industry Standards:
- GASB 67/68: Pension accounting and reporting
- GASB 34: Financial reporting model for state and local governments
- GFOA best practices: Financial indicators, fund balance policies
- NACSLB: Fiscal health indicators for state budget officers
Commercial Tools:
- Moody’s Analytics: Municipal credit assessment (proprietary)
- S&P Global: Rating methodologies (proprietary)
- Lumesis: Municipal bond analytics platform
- OpenGov: Financial planning and transparency software (SaaS, not library)
Nonprofit Organizations:
- Pew Charitable Trusts: Fiscal health research and best practices
- Truth in Accounting: Financial condition analysis methodology
- Volcker Alliance: Truth and Integrity in State Budgeting
- GFOA: Government Finance Officers Association resources
Why This Matters#
Fiscal Sustainability#
- Governments must balance budgets (can’t run deficits indefinitely)
- Unfunded obligations (pensions) are real liabilities
- Fiscal distress leads to service cuts, tax increases, or bankruptcy
- Early warning systems prevent crises
Transparency & Accountability#
- Citizens have a right to understand their government’s fiscal health
- Complex CAFRs are inaccessible to most people
- Standardized, understandable metrics improve democratic accountability
- Transparency tools empower informed voting and advocacy
Market Efficiency#
- Municipal bond market is $4 trillion (larger than corporate bonds)
- Small investors lack access to expensive rating agency reports
- More transparent credit analysis levels the playing field
- Open-source tools enable independent validation of ratings
Evidence-Based Policy#
- Policy decisions should consider fiscal impacts
- Researchers need reusable infrastructure to study fiscal policy
- Reproducible research requires shared tools and data
- Cross-jurisdiction comparison identifies best practices
Preventing Fiscal Crisis#
- Detroit, Puerto Rico, Stockton bankruptcies were predictable
- Earlier intervention could have prevented worst outcomes
- Systematic monitoring (not ad-hoc) catches problems sooner
- Better tools enable proactive fiscal management
Success Criteria#
This domain succeeds if:
- Finance officers monitor fiscal health with standard tools, not custom Excel spreadsheets
- Researchers conduct fiscal policy studies using reproducible, shared infrastructure
- Citizens access understandable fiscal health indicators for their governments
- Oversight agencies deploy early warning systems that detect distress before crisis
- Bond investors make informed decisions with transparent, affordable analytics
- Small governments get fiscal health assessments without expensive consultants
Getting Started#
For Tool Builders#
If you’re building fiscal health analysis tools, this domain should help you:
- Identify gaps: See what’s missing (don’t assume it exists elsewhere)
- Understand challenges: Learn why this is hard (actuarial modeling, data availability)
- Find related work: Build on existing infrastructure (1.300-1.304)
- Define use cases: Who needs these tools? (officers, investors, researchers, citizens)
Where to start:
- Easiest: Revenue volatility analysis (time series, economic correlation)
- Medium: Debt sustainability metrics (ratio calculation, peer comparison)
- Hard: Credit scoring (requires validation against historical data)
- Hardest: Pension modeling (requires actuarial expertise)
For Users#
If you analyze government fiscal health, this domain should help you:
- Discover missing tools: Understand why you can’t find what you need (it doesn’t exist yet)
- Make informed requests: Know what to ask tool builders for (specific gaps)
- Contribute domain knowledge: Help tool builders understand practitioner needs
- Share methods: Document your current approaches (Excel models, custom code)
Current workarounds:
- Excel models shared informally among practitioners
- Custom scripts written per analysis (not reusable)
- Expensive consultants for complex analysis
- Manual processes that should be automated
For Researchers#
If you study government fiscal health, this domain should help you:
- Build on existing work: Don’t reinvent infrastructure for each study
- Cite shared tools: Improve reproducibility of research
- Publish reusable code: Contribute to the ecosystem
- Identify research gaps: Where is more methodological work needed?
Opportunities:
- Validate open-source credit scoring against rating agency outcomes
- Develop pension modeling with uncertainty quantification
- Build revenue forecasting models using local economic indicators
- Create peer comparison methodologies with rigorous clustering
Last Updated: 2026-02-05 Maintainer: research/crew/ivan Related: docs/survey/1.300-309-structure.md