Metadata-Version: 2.4
Name: bond-issuer-screener
Version: 0.1.0
Summary: CDFI Bond Guarantee Program eligibility screener — net asset, lending volume, portfolio quality thresholds, and bond issuance feasibility analysis
Home-page: https://github.com/Jaypatel1511/bond-issuer-screener
Author: Jay Patel
Author-email: Jay Patel <thejaypatel1511@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/Jaypatel1511/bond-issuer-screener
Project-URL: Repository, https://github.com/Jaypatel1511/bond-issuer-screener
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: home-page
Dynamic: requires-python

# bond-issuer-screener

![PyPI](https://img.shields.io/pypi/v/bond-issuer-screener)
![Python](https://img.shields.io/pypi/pyversions/bond-issuer-screener)
![License](https://img.shields.io/pypi/l/bond-issuer-screener)

**CDFI Bond Guarantee Program eligibility screener** — quickly assess whether a CDFI meets the net asset, lending volume, portfolio quality, and governance thresholds required to participate in Treasury's BGP. Compute a composite capacity score, estimate maximum issuance size, quantify gaps, and generate Markdown screening reports.

## Why

The CDFI Bond Guarantee Program allows certified CDFIs to issue bonds of $100M–$1B with a federal guarantee. Qualifying is non-trivial: CDFIs must meet minimum asset, volume, and quality thresholds, have at least three years of certification, and demonstrate governance strength. This library makes the screening process transparent, repeatable, and auditable.

## Installation

```bash
pip install bond-issuer-screener
```

## Quickstart

```python
from bondscreener import (
    CDFIProfile,
    BondIssuance,
    BGP_THRESHOLDS,
    check_basic_eligibility,
    check_portfolio_quality,
    check_governance,
    comprehensive_eligibility_check,
    estimate_bond_capacity,
    lending_capacity_score,
    portfolio_quality_score,
    governance_score,
    issuance_feasibility,
    gap_to_eligibility,
    peer_comparison,
    generate_screening_report,
    eligibility_summary_table,
)

# Describe the CDFI
profile = CDFIProfile(
    name="Heartland CDFI",
    certification_date="2018-03-01",
    total_assets=150_000_000,
    net_assets=18_000_000,
    total_lending_volume_5yr=320_000_000,
    sectors_served=["small_business", "affordable_housing"],
    geographic_areas=["IL", "IN", "WI"],
    regulator="state",
    audit_status="clean",
    governance_structure="independent_board",
    npl_rate=0.04,
    charge_off_rate=0.012,
    single_borrower_concentration=0.07,
)

# Describe the proposed bond
issuance = BondIssuance(
    proposed_amount=150_000_000,
    term_years=15,
    intended_use="Small business and community facility lending",
    expected_lending_pace=35_000_000,
    projected_portfolio_composition={"small_business": 0.60, "community_facility": 0.40},
)

# Run individual threshold checks
basic = check_basic_eligibility(profile)
print(f"Basic eligibility: {'PASS' if basic['overall_passed'] else 'FAIL'}")
print(f"Net assets: ${profile.net_assets:,.0f}  (min: ${BGP_THRESHOLDS['min_net_assets']:,.0f})")

quality = check_portfolio_quality(profile)
print(f"Portfolio quality: {'PASS' if quality['overall_passed'] else 'FAIL'}")

gov = check_governance(profile)
print(f"Governance: {'PASS' if gov['overall_passed'] else 'FAIL'}")

# Full eligibility check
result = comprehensive_eligibility_check(profile, issuance)
print(result.summary())

# Capacity scores
lc = lending_capacity_score(profile)
pq = portfolio_quality_score(profile)
gs = governance_score(profile)
print(f"Lending capacity: {lc:.1f}  Portfolio quality: {pq:.1f}  Governance: {gs:.1f}")

# Bond capacity estimate
cap = estimate_bond_capacity(profile)
print(f"Max bond size: ${cap['recommended_max']:,.0f}  ({cap['rationale']})")

# Full feasibility analysis
feasibility = issuance_feasibility(profile, issuance)
print(f"Feasibility: {feasibility['overall_feasibility']}")
for note in feasibility["summary_notes"]:
    print(f"  - {note}")

# Gap analysis (what's needed to qualify)
gap = gap_to_eligibility(profile, issuance)
print(f"Already eligible: {gap['is_already_eligible']}")

# Peer comparison
peer = CDFIProfile(
    "Peer Fund", "2016-01-01", 80_000_000, 10_000_000, 210_000_000,
    ["small_business"], ["OH"], "OCC", "clean", "independent_board",
    npl_rate=0.07, charge_off_rate=0.02, single_borrower_concentration=0.09,
)
comp = peer_comparison(profile, [peer])
print(f"Peer standing: {comp['peer_standing']}  (overall percentile: {comp['overall_percentile']:.0f})")

# Generate a full Markdown report
report = generate_screening_report(profile, issuance)
print(report[:500])

# Summary table for multiple CDFIs
table = eligibility_summary_table([profile, peer], [issuance, issuance])
for row in table:
    print(f"{row['name']:25s}  eligible={row['is_eligible']}  tier={row['capacity_tier']}")
```

## Key Features

- **Threshold checking** — net assets ($2M), 5-year lending volume ($200M), certification years (3+), leverage ratio, NPL rate (≤15%), charge-offs (≤5%), single-borrower concentration (≤10%)
- **Governance assessment** — audit status (clean required), board independence, federal vs. state regulation
- **Capacity scoring** — 0-100 composite score weighted across lending capacity (40%), portfolio quality (35%), and governance (25%)
- **Bond capacity estimation** — leverage-based and deployment-based caps; identifies binding constraint
- **Feasibility analysis** — combines eligibility, capacity, and deployment pace into a single verdict
- **Gap analysis** — quantifies exactly what a CDFI needs to close to qualify, with time estimates
- **Peer comparison** — percentile ranks across all key metrics vs. a peer group
- **Markdown report generation** — export-ready screening reports with threshold tables and recommendations

## Use Cases

- **CDFIs** assessing their BGP readiness before investing in application preparation
- **Consultants** screening client portfolios for BGP suitability
- **Intermediaries** comparing multiple CDFIs for referral or co-issuance opportunities
- **Researchers** analyzing BGP participant characteristics at scale

## License

MIT © Jay Patel
