Skip to main content

SBIC investment portfolio analyzer — fund-level IRR/TVPI/DPI, licensee tracking, and SBA program data analysis

Project description

sbic-tracker

PyPI version Python 3.9+ License: MIT

Professional SBIC investment portfolio analyzer for Python.

Model and analyze Small Business Investment Company (SBIC) portfolios: fund-level IRR, TVPI, DPI, RVPI, vintage-year cohort analysis, peer benchmarking, and sector/state concentration — all built on pure Python with no external dependencies.


Why sbic-tracker?

SBICs deploy over $6 billion annually into U.S. small businesses through SBA-leveraged funds. Portfolio managers, fund-of-funds analysts, and SBA examiners need consistent, auditable metrics across heterogeneous portfolios. sbic-tracker provides typed Python data structures and financial functions that match SBA and LP reporting standards.

Installation

pip install sbic-tracker

No external dependencies — pure Python 3.9+.

Quickstart

from datetime import date
from sbictracker import (
    SBICLicensee, Investment,
    SBICPortfolio,
    load_sample_investments, load_sample_licensees,
    irr, tvpi, dpi, rvpi,
    vintage_year_analysis, peer_quartile_ranking,
    sector_breakdown, state_breakdown, top_naics,
)

# Load sample data (or plug in your own)
licensees = load_sample_licensees()
investments = load_sample_investments()

# Build a portfolio
portfolio = SBICPortfolio("Apex Growth Fund I")
portfolio.add_many(investments)
print(portfolio.summary())
# === Apex Growth Fund I ===
#   Investments      : 20 (10 realized / 10 unrealized)
#   Called capital   : $78,150,000
#   Distributed      : $85,410,000
#   NAV (unrealized) : $30,550,000
#   TVPI             : 1.48x
#   DPI              : 1.09x
#   RVPI             : 0.39x

# IRR from custom cash flows
fund_flows = [-10_000_000, 0, 500_000, 2_000_000, 8_000_000, 5_000_000]
print(f"Fund IRR: {irr(fund_flows):.2%}")

# Vintage cohort analysis
cohorts = vintage_year_analysis(investments)
for yr, data in sorted(cohorts.items()):
    print(f"  {yr}: {data['count']} investments, TVPI {data['tvpi']:.2f}x")

# Peer quartile ranking
ranking = peer_quartile_ranking(fund_tvpi=1.8, peer_tvpis=[1.2, 1.4, 1.6, 1.9, 2.1])
print(f"Quartile: Q{ranking['quartile']}  ({ranking['percentile']}th percentile)")

# Sector concentration
top = top_naics(investments, n=3)
for code, name, invested in top:
    print(f"  NAICS {code} ({name}): ${invested:,.0f}")

Key Features

Feature Detail
IRR Newton-Raphson solver for arbitrary annual cash-flow vectors
TVPI / DPI / RVPI Industry-standard multiples from first principles
Write-off tracking Net cost basis automatically reflects partial/full write-offs
Vintage cohort analysis Group and compare by investment year
Peer quartile ranking Percentile and Q1–Q4 ranking vs a peer TVPI distribution
SBICPortfolio Add/remove investments; filter by sector, state, or instrument type
Sector/state breakdown NAICS 2-digit concentration with portfolio % weights
Sample data 10 licensees + 20 investments for immediate prototyping
SBA URL loader load_from_sba_url() attempts live SBA data with sample fallback

Use Cases

  • Fund managers — Track called/distributed capital and compute NAV-based multiples for LP reporting.
  • SBA examiners — Audit licensee leverage ratios and investment-level MOIC across the portfolio.
  • Fund-of-funds analysts — Compare SBIC fund vintage cohorts and rank against peer TVPIs.
  • Policy researchers — Analyze SBIC capital deployment by sector, state, and instrument type.
  • Limited partners — Build DPI/RVPI waterfalls and sensitivity models in Python.

API Reference

Data Classes

SBICLicensee(license_number, fund_name, fund_manager, license_date,
             license_status, license_type, total_capital, sba_leverage, private_capital)
  .leverage_ratio   # sba_leverage / private_capital
  .vintage_year

Investment(investee_company, investment_date, investment_amount, naics_code, state,
           exit_date, exit_proceeds, write_off_amount, instrument_type)
  .is_realized       # bool
  .realized_value    # exit_proceeds if realized, else 0
  .net_cost_basis    # amount - write_off_amount
  .moic              # exit_proceeds / amount (realized only)
  .naics_sector      # human-readable sector name
  .vintage_year

Fund Metrics

irr(cash_flows)                   # Newton-Raphson IRR
tvpi(investments)                 # (distributed + NAV) / called
dpi(investments)                  # distributed / called
rvpi(investments)                 # NAV / called
called_capital(investments)
distributed_capital(investments)
nav(investments)                  # unrealized positions at net cost
total_value(investments)

Portfolio & Analysis

SBICPortfolio(name)
  .add(investment)
  .add_many(investments)
  .remove(investee_company)
  .filter_by_sector(naics_prefix)
  .filter_by_state(state)
  .filter_realized() / .filter_unrealized()
  .summary_stats()
  .summary()

vintage_year_analysis(investments)          # → {year: {count, tvpi, dpi, ...}}
peer_quartile_ranking(fund_tvpi, peer_tvpis) # → {quartile, percentile, peer_median}

sector_breakdown(investments)               # → {naics_2: {sector_name, invested, pct}}
state_breakdown(investments)                # → {state: {count, invested, pct}}
top_naics(investments, n=5)                 # → [(code, name, invested), ...]

License

MIT © Jay Patel

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sbic_tracker-0.1.0.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sbic_tracker-0.1.0-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file sbic_tracker-0.1.0.tar.gz.

File metadata

  • Download URL: sbic_tracker-0.1.0.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.12

File hashes

Hashes for sbic_tracker-0.1.0.tar.gz
Algorithm Hash digest
SHA256 703017a9b7299fe1d278fba08176daf9419ddf9c81ae483fff2a67ef730c343f
MD5 df6216f5e8f874d546a6616cbed2a9e4
BLAKE2b-256 f0fb073300064dc900ae68a18024e3769f594cc72b87dc89b182054bb3235e83

See more details on using hashes here.

File details

Details for the file sbic_tracker-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sbic_tracker-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.12

File hashes

Hashes for sbic_tracker-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d33a0e6306746d48b5544980f9547fa20f401489296bbcd6f15d26818b73971a
MD5 6f00ed2aba3555a75f7b68bb19e39126
BLAKE2b-256 85a83bc7ea00fc44e8928691644e6c716c0c9d7fefd78e650583e34f332d3f69

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page