Implementation:AI4Finance Foundation FinRobot calculate lbo
| Knowledge Sources | |
|---|---|
| Domains | Finance, Private_Equity, Deterministic_Compute |
| Last Updated | 2026-10-18 00:00 GMT |
Overview
Concrete deterministic engine for running a full LBO model (schedule + MOIC/IRR + sensitivity grid) from structured inputs, provided by the FinRobot compute layer.
Description
The calculate_lbo function is the LBO compute operator. It takes a fully-seeded LBOInputs object (produced by seed_lbo_inputs) and performs reproducible arithmetic: builds the year-by-year operating and debt schedule, computes MOIC and IRR via Newton-Raphson, and attaches a sensitivity grid.
Key features:
- Debt-service waterfall: mandatory amortization first, then optional cash sweep capped at remaining debt. Shortfalls are funded by a revolver draw (debt rises).
- Self-financing test: detects when projected FCF is negative across the hold (net debt rises rather than amortizes) and flags it via capital_structure_warning.
- Cyclical entry normalization: when entry_ebitda is supplied (a cyclical's normalized through-cycle EBITDA), entry EV and debt are priced on it, not the current LTM.
- Capital structure feasibility: when entry debt ≥ entry EV (negative equity), MOIC/IRR are None (undefined, not a total loss).
Usage
- LBO_Analysis workflow (Step 3): Called after seed_lbo_inputs to compute the full LBO schedule and returns.
- IC_Memo workflow (Step 2): Called alongside calculate_dcf to produce LBO returns for the IC memo; the IRR is compared against the 15% sponsor hurdle.
- Equity_Research workflow (Step 4): The LBO result feeds the valuation synthesis as one valuation method.
Code Reference
Source Location
- Repository: FinRobot
- File: finrobot_desktop/finrobot/engine/compute/operators/lbo.py
Signature
def calculate_lbo(inputs: LBOInputs) -> LBOResult:
"""Run full LBO model: build schedule, compute MOIC/IRR, attach sensitivity.
Args:
inputs: LBOInputs with entry/exit multiples, leverage, holding period,
growth/margin assumptions, debt terms. When entry_ebitda is
supplied (cyclical), entry EV and debt price on it, not ltm_ebitda.
Returns:
LBOResult with entry_ev, entry_debt, entry_equity, schedule,
exit_ebitda, exit_ev, exit_equity, moic, irr, self_financing,
irr_formula_warning, capital_structure_warning, sensitivity.
"""
Import
from finrobot.engine.compute.operators.lbo import calculate_lbo
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| inputs | LBOInputs | Yes | Seeded LBO inputs: entry/exit EV/EBITDA, leverage, holding period, revenue growth, ebitda margin, capex, D&A, NWC, interest rate, mandatory amort, tax, ltm_ebitda, revenue_base, optional entry_ebitda (cyclical) |
Outputs
| Name | Type | Description |
|---|---|---|
| LBOResult | LBOResult | None), irr_formula_warning, capital_structure_warning, sensitivity |
Usage Examples
Basic LBO Analysis
from finrobot.engine.compute.operators.lbo import calculate_lbo
from finrobot.engine.compute.operators.lbo_seed import seed_lbo_inputs
# 1. Seed LBO inputs from real financials
lbo_inputs = seed_lbo_inputs(
financials=financial_data,
historical=historical_metrics,
holding_period_years=5,
leverage_multiple=5.0, # 5x Debt/EBITDA
)
# 2. Run the LBO
lbo_result = calculate_lbo(lbo_inputs)
print(f"MOIC: {lbo_result.moic:.2f}x")
print(f"IRR: {lbo_result.irr:.1%}")
print(f"Self-financing: {lbo_result.self_financing}")
if not lbo_result.self_financing:
print(lbo_result.capital_structure_warning)
With Custom Entry/Exit Multiples
lbo_inputs = seed_lbo_inputs(
financials=financial_data,
historical=historical_metrics,
entry_ev_ebitda=9.0, # Premium entry
exit_ev_ebitda=10.0, # Multiple expansion
leverage_multiple=6.0,
)
lbo_result = calculate_lbo(lbo_inputs)