Bulge-tier Excel financial model factory. Every cell live-formulated, every number traceable. MCP-native.
Project description
ModelForge
Bulge-tier Excel financial model factory for credit & structured finance. Every cell live-formulated. Every number traceable back to the source document page it came from.
Built for Italian private capital (unitranche, minibond, project finance, RE, NPL, structured credit) — extensible to any asset class.
Use it inside Claude Code, Cursor, ChatGPT Enterprise (MCP-native)
PyPI name: modelforge-finance (the unscoped modelforge was taken by source{d}'s ML library). Import name stays modelforge.
pip install "modelforge-finance[mcp,export]"
# wire into your MCP client config:
{
"mcpServers": {
"modelforge": { "command": "modelforge-mcp" }
}
}
Then in your AI assistant:
"Build me a unitranche LBO model from this YAML spec, export the committee deck."
Tools available: list_templates · build_model · qc_workbook · list_sources · lineage_walk · ingest_dataroom · export_pptx · export_docx.
See GTM_STRATEGY.md and SCORECARD_v2.md for the full GTM thesis and competitor comparison (vs Rogo / Hebbia / Macabacus / o11).
The architectural principle
LLMs produce specs + sources + narrative. Deterministic Python produces the workbook.
The LLM never writes a number into a cell. It writes a typed YAML spec with source IDs. A deterministic builder emits the Excel via openpyxl. A QC gate validates before export. Excel is a render of a linkage graph; the graph is persisted to SQLite and is the canonical artifact.
Quality standards (bulge-tier, non-negotiable)
Formatting
- Blue = hardcoded input. Black = formula. Green = cross-sheet link. Red = warning.
- No mixed formulas (no magic numbers embedded). Named ranges for every driver.
- Costs NEGATIVE (sign convention enforced and checked).
- EN primary labels, IT secondary.
- Historical vs Projected column separator, obvious.
- Check row at top of every sheet (BS balance, CFS tie, covenant headroom — TRUE or 0).
Sourcing
- Every hardcoded cell has a comment with source ID (S-001, S-002, ...).
Sourcessheet lists each source: doc, page, publisher, date, URL, verified-flag.- Assumptions (not sourced) tagged A-001 with rationale + confidence H/M/L.
Scenarios
- WORST / BASE / BEST toggle on Assumptions. Drives every sheet via CHOOSE.
- Every sheet respects the toggle — no orphan assumptions.
Audit
QCsheet with 12 automated checks, all must pass.- Revision log on Cover.
- Named ranges mandatory.
- Print areas set. Print-ready on every sheet.
Quick start
cd "C:/Users/lukep/Desktop/Projects AI/ModelForge"
pip install -e .
modelforge build examples/unitranche_cdmo.yaml
modelforge qc output/unitranche_cdmo.xlsx
Data-room ingestion (v0.3.1)
Turn a directory of PDFs, XLSXs and CSVs into a validated ModelForge YAML spec using Claude Opus. Every extracted number traces back to a doc page via the auto-built Sources registry.
pip install -e .[ingest] # installs anthropic, pdfplumber, pypdf
export ANTHROPIC_API_KEY=sk-ant-... # required
modelforge ingest path/to/dataroom/ \
--template project_finance \
-o output/my_deal.yaml --verbose
# Review output/my_deal.yaml + output/my_deal.ingestion.md
# (INGESTION_REPORT.md lists every extracted field, S-id, confidence)
modelforge build output/my_deal.yaml # produces the workbook
modelforge qc output/my_deal.xlsx # 8/8 quality gate
Supported template: project_finance (MVP). Templates 1, 3, 5-8 queued for v0.3.2. See PRD_v03_dataroom_ingestion.md for the full spec.
Package layout
modelforge/
├── graph/ # First-class linkage graph (nodes, edges, SQLite persistence)
├── spec/ # Pydantic schemas per template
│ ├── base.py # Source, Assumption, Scenario, Target (shared types)
│ └── unitranche.py # Template 1: Unitranche LBO
├── builder/ # Deterministic openpyxl writer
│ ├── styles.py # Bulge-tier formatting library
│ ├── formulas.py # Formula string builders
│ ├── i18n.py # EN/IT label dictionary
│ ├── workbook.py # Top-level builder
│ └── sheets/ # One module per sheet (cover, sources, assumptions, ...)
├── qc/ # Quality gate (12 checks + PDF report)
├── data/ # Market data loaders (Damodaran, ECB, Borsa minibond)
└── cli.py # modelforge build|qc|sources|inspect
Templates (all shipped)
- ✅ Unitranche LBO — Italian mid-market direct lending (Cash sweep + IFRS 9 EIR)
- ✅ Minibond — Banca Finint territory (Gross YTM + Net YTM + Italian WHT)
- ✅ Credit Memo — Extends Unitranche with recovery waterfall + PD×LGD×EAD
- ✅ Project Finance — Construction + operating phases, DSCR-driven
- ✅ Real Estate — NOI build, exit cap, LP/GP promote waterfall
- ✅ NPL Portfolio — Collection curves, servicing fees, senior/mezz capital structure
- ✅ Structured Credit — Tranche waterfall with attachment/detachment points
- ✅ 3-Statement — P&L + BS + CFS with BS balance integrity check
Run modelforge list-templates to see them all. Each ships with an anonymized Italian example YAML in examples/.
The pitch
Bulge-tier Excel models, every cell live-formulated, every number traceable back to the data room page it came from.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file modelforge_finance-0.9.6.tar.gz.
File metadata
- Download URL: modelforge_finance-0.9.6.tar.gz
- Upload date:
- Size: 334.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93362d0c130840afcf40428f22e0b248758492e6688274e39211b5ca012b2181
|
|
| MD5 |
b4e7972748e6fb05ad7df7e122cfb214
|
|
| BLAKE2b-256 |
d642c3718656861708300ce9e3e605a321f04412b35eec0de766f3751fcff9c2
|
File details
Details for the file modelforge_finance-0.9.6-py3-none-any.whl.
File metadata
- Download URL: modelforge_finance-0.9.6-py3-none-any.whl
- Upload date:
- Size: 372.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b7f5c7ee5b845be6b1826ce3d8c04d03d88e38fbc617ef6679c6576b04ee734
|
|
| MD5 |
19dd1f04614e90c93b70883faf471cb5
|
|
| BLAKE2b-256 |
3893c1f212363938eff4615fa536d750087fa359066efb694d776406dbec624b
|