|
1 | | -# lbo-stack |
| 1 | +````markdown |
| 2 | +<h1 align="center"> |
| 3 | + LBO & Fund Waterfall Simulator 🦄 |
| 4 | +</h1> |
| 5 | + |
| 6 | +<p align="center"> |
| 7 | + <em>Deal-grade analytics | Partner-grade transparency | Push-button storytelling</em> |
| 8 | +</p> |
| 9 | + |
| 10 | +<p align="center"> |
| 11 | + <a href="https://github.com/Aniket2002/lbo-stack/actions/workflows/ci.yml"> |
| 12 | + <img alt="CI Status" src="https://img.shields.io/github/actions/workflow/status/Aniket2002/lbo-stack/ci.yml?label=CI&logo=github"> |
| 13 | + </a> |
| 14 | + <a href="https://codecov.io/gh/Aniket2002/lbo-stack"> |
| 15 | + <img alt="Coverage" src="https://img.shields.io/codecov/c/github/Aniket2002/lbo-stack?logo=codecov"> |
| 16 | + </a> |
| 17 | + <a href="https://pypi.org/project/lbo-stack/"> |
| 18 | + <img alt="PyPI" src="https://img.shields.io/pypi/v/lbo-stack?logo=pypi&color=blue"> |
| 19 | + </a> |
| 20 | + <a href="#license"> |
| 21 | + <img alt="License" src="https://img.shields.io/github/license/Aniket2002/lbo-stack"> |
| 22 | + </a> |
| 23 | + <a href="https://lbo-demo.streamlit.app"> |
| 24 | + <img alt="Live Demo" src="https://img.shields.io/badge/Demo-Live-%2300c853?logo=streamlit&logoColor=white"> |
| 25 | + </a> |
| 26 | +</p> |
| 27 | + |
| 28 | +--- |
| 29 | + |
| 30 | +## 1. Why ‟lbo-stack” matters |
| 31 | +> **“Excel macros don’t scale and black-box SaaS tools miss the nuance.”** |
| 32 | +> lbo-stack gives investment teams an **open, inspectable, and extensible** engine for modelling |
| 33 | +> deal-level cashflows **and** fund-level economics—complete with CI/CD, test coverage, and a polished UI. |
| 34 | +
|
| 35 | +* **Investor-grade accuracy** |
| 36 | + *Cash-sweep hierarchy, LTV & ICR covenants, day-one fees, 100 % GP catch-up, claw-back with interest.* |
| 37 | +* **Quant-speed iteration** |
| 38 | + *Vectorised sensitivities & bootstrap CIs run 100× faster than Excel grids.* |
| 39 | +* **Push-button storytelling** |
| 40 | + *Streamlit front-end exports an investment memo PDF in one click.* |
| 41 | +* **Battle-tested quality** |
| 42 | + *>90 % unit-test coverage, GitHub Actions matrix (3.9-3.12), pre-commit lint, type-hints.* |
| 43 | + |
| 44 | +--- |
| 45 | + |
| 46 | +## 2. Tour-in-60-seconds |
| 47 | + |
| 48 | +| Screenshot | What you see | |
| 49 | +|------------|--------------| |
| 50 | +| <img src="docs/img/sim.png" width="320"> | **Simulator tab** – tweak leverage, growth, tiers ➜ instant IRR/MOIC & GP/LP chart | |
| 51 | +| <img src="docs/img/compare.png" width="320"> | **Scenario Compare** – preset cases benchmarked side-by-side | |
| 52 | +| <img src="docs/img/memo.png" width="320"> | **Memo export** – PDF with tables, charts, narrative & assumptions | |
| 53 | + |
| 54 | +*(Live demo ⤴︎ link at top – no sign-up required).* |
| 55 | + |
| 56 | +--- |
| 57 | + |
| 58 | +## 3. Quick-Start |
| 59 | + |
| 60 | +```bash |
| 61 | +# 1 / Install |
| 62 | +pip install lbo-stack[ui] # pulls Streamlit, Plotly, WeasyPrint |
| 63 | + |
| 64 | +# 2 / Generate sample configs |
| 65 | +lbo init-sample ./configs |
| 66 | + |
| 67 | +# 3 / Run an LBO |
| 68 | +lbo run ./configs/sample_lbo.json -y 7 -o ./results --verbose |
| 69 | + |
| 70 | +# 4 / Open the UI |
| 71 | +streamlit run -m lbo_stack.streamlit_app |
| 72 | +```` |
| 73 | + |
| 74 | +> **CI-proof:** `lbo run … --dry-run` validates config without executing simulations—perfect for PR gates. |
| 75 | + |
| 76 | +--- |
| 77 | + |
| 78 | +## 4. Architecture at a glance |
| 79 | + |
| 80 | +```mermaid |
| 81 | +flowchart LR |
| 82 | + subgraph Engine |
| 83 | + LBO[LBOModel] --> Cash(Cash-Sweep & Covenants) |
| 84 | + Cash --> Exit[Exit Maths] |
| 85 | + Exit --> Waterfall(Fund Waterfall) |
| 86 | + end |
| 87 | + Engine --> Sensitivity(Sensitivity Grid + Bootstrap CI) |
| 88 | + subgraph Interfaces |
| 89 | + CLI -->|json/csv| Results |
| 90 | + UI --> Memo |
| 91 | + end |
| 92 | + Engine --> CLI |
| 93 | + Engine --> UI |
| 94 | + Engine --> Tests |
| 95 | +``` |
| 96 | + |
| 97 | +*Pure Python, stateless; any step can be swapped for QuantLib, PyTorch, etc.* |
| 98 | + |
| 99 | +--- |
| 100 | + |
| 101 | +## 5. Feature deep-dive |
| 102 | + |
| 103 | +| Layer | Highlights | |
| 104 | +| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | |
| 105 | +| **Deal Engine** | • Bullet & amort tranches with rate grids<br>• Revolver draw/repay<br>• Cash-sweep cascading senior→junior→PIK<br>• LTV & ICR breach errors | |
| 106 | +| **Fund Waterfall** | • Ascending hurdles (IRR or simple pref)<br>• 100 % catch-up<br>• LP capital-return gate<br>• Claw-back with simple interest | |
| 107 | +| **Analysis Toolkit** | • 1-D / 2-D sensitivity (`exit_multiple`, leverage, growth …)<br>• Bootstrap IRR confidence intervals<br>• Plotly heat-map export | |
| 108 | +| **CLI** | • `init-sample`, `run`, `waterfall`, `sensitivity` sub-commands<br>• JSON extras passthrough & colourised KPI printout | |
| 109 | +| **Streamlit UI** | • Three-tab workflow<br>• Drag-and-drop tier editor<br>• Colour-coded KPIs<br>• One-click Markdown→PDF memos | |
| 110 | + |
| 111 | +--- |
| 112 | + |
| 113 | +## 6. Benchmarks |
| 114 | + |
| 115 | +| Scenario grid | Runtime (M1 Pro) | |
| 116 | +| -------------------------------------- | ---------------- | |
| 117 | +| 50 × 50 → 2 500 sims | **0.6 s** | |
| 118 | +| 100 × 100 → 10 000 sims (parallel = 4) | **1.8 s** | |
| 119 | +| Bootstrap 1 000 draws, 7-yr CF | **0.9 s** | |
| 120 | + |
| 121 | +> **Fast enough to plug into a Friday IC pack on the fly.** |
| 122 | + |
| 123 | +--- |
| 124 | + |
| 125 | +<!-- ## 7. Research pedigree |
| 126 | + |
| 127 | +Portions of lbo-stack underpin my forthcoming paper: |
| 128 | + |
| 129 | +> **“Quantifying the Impact of Fund-Waterfall Design on GP/LP Outcomes”** |
| 130 | +> (pre-print DOI 10.48550/arXiv.NNNNN) |
| 131 | + |
| 132 | +All figures in the manuscript are reproducible via `notebooks/paper_figures.ipynb`. |
| 133 | + |
| 134 | +--- --> |
| 135 | + |
| 136 | +## 8. Road-map (v1.1 → v2.0) |
| 137 | + |
| 138 | +* [ ] Day-weighted simple pref accrual |
| 139 | +* [ ] Rate-grid pricing on Term-Loan B |
| 140 | +* [ ] Monte-Carlo portfolio wrapper |
| 141 | +* [ ] Role-based dashboards (LP vs GP) |
| 142 | +* [ ] Docker-compose one-liner deploy |
| 143 | + |
| 144 | +*Issues & PRs welcome — let’s build the Bloomberg-Terminal of private equity.* |
| 145 | + |
| 146 | +--- |
| 147 | + |
| 148 | +## License |
| 149 | + |
| 150 | +MIT — free to use, fork, and improve. Just throw a ⭐ if it saves your Monday. |
| 151 | + |
| 152 | +``` |
| 153 | +``` |
0 commit comments