capstack-lbo 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1260 @@
1
+ Metadata-Version: 2.4
2
+ Name: capstack-lbo
3
+ Version: 0.1.0
4
+ Summary: A leveraged buyout engine: sources and uses, a debt waterfall with cash sweep, covenant tests, and returns attribution.
5
+ Author: Daniyal
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/DaniyalMlk/capstack
8
+ Project-URL: Repository, https://github.com/DaniyalMlk/capstack
9
+ Project-URL: Issues, https://github.com/DaniyalMlk/capstack/issues
10
+ Keywords: lbo,leveraged-buyout,private-equity,finance,debt-schedule,irr
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Financial and Insurance Industry
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: Implementation :: CPython
18
+ Classifier: Topic :: Office/Business :: Financial :: Investment
19
+ Classifier: Typing :: Typed
20
+ Requires-Python: >=3.11
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Provides-Extra: dev
24
+ Requires-Dist: pytest>=8.0; extra == "dev"
25
+ Requires-Dist: mypy>=1.8; extra == "dev"
26
+ Requires-Dist: ruff>=0.4; extra == "dev"
27
+ Dynamic: license-file
28
+
29
+ # capstack
30
+
31
+ A leveraged buyout engine.
32
+
33
+ `capstack` builds the model a deal team argues over: what the business is bought
34
+ for, how the purchase is funded, what the operating case throws off, how the debt
35
+ gets paid down, whether the covenants hold, and what the sponsor makes on the way
36
+ out.
37
+
38
+ Every phase in `ROADMAP.md` is built, with the suite, the type checker and the
39
+ linter running on every push. What is there: the numerics (exact money, day
40
+ counts, period grids,
41
+ the return measures), the transaction (entry valuation, a sources and uses table
42
+ that balances, and the opening balance sheet after the recapitalisation), the
43
+ operating case (drivers through to unlevered free cash flow), the capital
44
+ structure (interest, amortisation, a cash sweep by seniority and a revolver that
45
+ runs both ways), the covenants (maintenance tests, headroom measured in EBITDA,
46
+ and a sweep that steps with a leverage grid), and the exit (equity value,
47
+ returns by security through a preferred waterfall, and a value-creation bridge),
48
+ and the analysis on top of them (two-dimensional sensitivity with the whole
49
+ engine rebuilt and re-run at every cell, break-evens solved along any
50
+ assumption, and the committee memo that assembles all of it), together with the
51
+ management incentive plan that sits between the preferred and the common — an
52
+ option pool with a strike, a vesting schedule, and a ratchet that steps with the
53
+ sponsor's own return — the dividend recapitalisation, which raises debt part-way
54
+ through a hold and pays it straight out to the shareholders, the add-on
55
+ acquisition, which buys earnings during the hold and blends them into the entry
56
+ multiple, and the refinancing, which retires a facility early and reports
57
+ whether the lower coupon covered the premium. See [ROADMAP.md](ROADMAP.md).
58
+
59
+ ## What is checked, and against what
60
+
61
+ An LBO model is easy to describe and hard to believe: every one of them claims
62
+ to price a deal, schedule its debt and report a return, and the question a
63
+ reader actually has is what any of it was checked against. So here is that,
64
+ before the install line. Every figure is produced by `examples/evidence.py`,
65
+ which runs in CI and exits non-zero if one of them moves:
66
+
67
+ | Check | Result |
68
+ | --- | --- |
69
+ | The ambiguous-IRR stream against the quadratic's exact roots | 20.0% and 30.0%, within 1.5e-13 of 20% and 30% |
70
+ | A two-flow return against the money multiple over the hold | 25.723629% a year, agreeing with m ** (1 / years) - 1 to 1.7e-16 |
71
+ | Sources and uses on all 4 shipped deals | balanced by equality, worst gap 0, not within a tolerance |
72
+ | The value-creation bridge against the change in equity value | worst unexplained residue 0 across 4 deals |
73
+ | A sensitivity grid's base cell against the deal run on its own | 6 cells each a full rebuild, base cell out by 0 |
74
+ | The interest deduction settled against the debt it is charged on, 4 shipped deals | at most 5 passes, worst residual 5.9e-5, and re-running each schedule on the settled cash flows moves its interest by 0 |
75
+ | The deduction past saturation, 4 structures from 6.0x to 8.0x | all deduct 380.16 and pay 158.40 - spread 0, while the debt they leave spans 615.22 |
76
+ | What the deduction is worth, 4 shipped deals | 90 to 189 basis points of return, and the equity gains 1.09 to 1.15 times the cash tax saved rather than once |
77
+
78
+ The first two rows are the ones worth looking at twice, because they are the
79
+ only two checked against something that shares no derivation with the engine.
80
+
81
+ **The ambiguous stream is a quadratic.** A flow of -1,000 / +2,500 / -1,560
82
+ gives `1000x² - 2500x + 1560 = 0` in `x = 1 + r`. Its discriminant is 10,000, a
83
+ perfect square, so the roots are exactly 1.2 and 1.3 and the rates are exactly
84
+ 20% and 30% — not approximately, exactly. The solver knows nothing about
85
+ quadratics: it scans the rate range for sign changes and refines every bracket
86
+ it finds. Agreeing with the algebra to 1.5e-13 is therefore a statement about
87
+ the solver rather than a restatement of it, and it is the check that makes
88
+ "`capstack` reports *both* rates" mean something.
89
+
90
+ **A two-flow return has a closed form.** One cheque out and one cheque in over
91
+ a known hold is `m ** (1 / years) - 1`, by definition. A root finder that
92
+ disagrees with that on two flows is wrong, whatever it does on twenty.
93
+
94
+ **Two of the rows are about the circularity between tax and debt.** The
95
+ interest deduction frees cash, the cash repays debt, the smaller balance earns
96
+ less interest, and the smaller interest earns a smaller deduction. The solve
97
+ that settles those against each other reports its own work — at most five
98
+ passes on the shipped deals, and the residual it stopped on — rather than
99
+ promising convergence. The claim worth more than the pass count is the third
100
+ figure in that row: re-running each schedule on the cash flows the solve
101
+ returns reproduces the interest it reported *exactly*. What comes back is one
102
+ pass, not an average of several.
103
+
104
+ **And past a point, leverage stops buying a deduction at all.** Once the cap
105
+ binds in every period and the disallowed pool is never absorbed, the deduction
106
+ *is* the allowance, and the allowance is a function of earnings alone — so it
107
+ stops depending on the debt. Four structures from six turns to eight deduct the
108
+ same amount and pay the same cash tax, to the last place, while the debt they
109
+ leave at exit spans 615. The spread of zero is the finding; the spread of 615 is
110
+ what stops it being vacuous, because it shows the four really were different
111
+ structures.
112
+
113
+ **And what all of that is worth is 90 to 189 basis points of return.** Which
114
+ is why the convention is offered at all: a deal underwritten at 17.1% clears a
115
+ 20% hurdle at 18.9% no more than it did, but the gap between those two numbers
116
+ is not a rounding difference, and a model that reports the first while the
117
+ business pays the second is answering a question nobody asked.
118
+
119
+ The second half of that row is the part worth reading twice. The equity gains
120
+ **more** than the cash tax the structure saved — 1.09 to 1.15 times it, not
121
+ once. The saved cash is swept against the debt, and debt repaid early does not
122
+ accrue the interest it would otherwise have accrued, so the equity collects the
123
+ saving *and* the interest the saving avoided. A test asserting the obvious
124
+ thing, that the equity gains exactly the saving, is how that was found: it
125
+ failed.
126
+
127
+ The convention is **opt-in**, not the new default. Every figure in this
128
+ repository is struck on the unlevered basis, the worked example's expected
129
+ values were computed by hand on it, and which convention a model runs under is
130
+ a modelling decision rather than a defect. `Case.run(deal, levered=True)` and
131
+ `capstack exit --levered` ask for the other one.
132
+
133
+ The zero rows are zeros rather than small numbers, and the distinction is
134
+ the point. A funding table out by a few thousand on a billion has not nearly
135
+ balanced — it has a missing line item, and a tolerance would hide precisely the
136
+ error the table exists to catch. The same goes for a bridge that nearly
137
+ explains the change in equity value: the residue would be a component nobody
138
+ had named. Both are asserted as equality, which is only possible because every
139
+ amount here is a `Decimal` carried at full precision and never a float.
140
+
141
+ The two rate figures are quoted as bounds rather than digits, deliberately.
142
+ Where two implementations of the same rate stop agreeing is a fact about the
143
+ floating-point unit underneath, so a figure quoted to sixteen places would be a
144
+ number that happens to be true on the machine that measured it. The bound is
145
+ the claim, and it is the bound the script enforces.
146
+
147
+ ```bash
148
+ python examples/evidence.py # all eight, non-zero if a figure moves
149
+ ```
150
+
151
+ Behind them: 1,719 tests on Python 3.11 through 3.13, with `mypy --strict` and
152
+ `ruff` over the source, the tests and the gate above.
153
+
154
+ ## Install
155
+
156
+ ```bash
157
+ python -m pip install capstack-lbo
158
+ ```
159
+
160
+ > **Not on the package index yet.** The `pip install` line above is what it
161
+ > will be; until the first release lands, install from source:
162
+ >
163
+ > ```bash
164
+ > python -m pip install "git+https://github.com/DaniyalMlk/capstack.git"
165
+ > ```
166
+
167
+ The distribution is `capstack-lbo` and the import is `capstack`. The two differ
168
+ because `capstack` on the index is an unrelated library; the binary, the module
169
+ and every identifier are unchanged, and `capstack-lbo` also works as a command
170
+ so that `uvx capstack-lbo` resolves.
171
+
172
+ Python 3.11 or newer. There are no dependencies — the engine imports only the
173
+ standard library, so there is nothing else to resolve and nothing to compile.
174
+
175
+ For a checkout:
176
+
177
+ ```bash
178
+ python -m pip install -e ".[dev]"
179
+ ```
180
+
181
+ ## Use
182
+
183
+ ```console
184
+ $ capstack returns 2026-06-30:-420000000:"sponsor equity" \
185
+ 2031-06-30:1134000000:"exit proceeds"
186
+ Cash flows
187
+ 2026-06-30 sponsor equity -420,000,000.00
188
+ 2031-06-30 exit proceeds 1,134,000,000.00
189
+
190
+ Day count ACT/365F
191
+ Holding period 5.00 years
192
+ Net 714,000,000.00
193
+ MoIC 2.70x
194
+ IRR 21.96%
195
+ ```
196
+
197
+ Add `--json` for machine-readable output, and `--convention` to pick the
198
+ day-count basis used to annualise.
199
+
200
+ A deal is described in a file — there are already more inputs than a flag list
201
+ carries legibly, and the operating case and debt schedule will add more:
202
+
203
+ ```console
204
+ $ capstack deal examples/meridian.json
205
+ Project Meridian (close 2026-06-30)
206
+ =====================================
207
+
208
+ Entry
209
+ LTM EBITDA 240.00
210
+ Entry multiple 11.50x
211
+ Enterprise value 2,760.00
212
+ Net debt 345.00
213
+ Equity purchase price 2,415.00
214
+
215
+ Sources
216
+ Term Loan B 1,150.00 issued at 99.50
217
+ Senior secured notes 450.00
218
+ Second lien 250.00 issued at 98.00
219
+ Rollover equity 85.00 no cash moves
220
+ Cash from balance sheet 45.00
221
+ Sponsor equity 994.14 the plug
222
+ --------
223
+ Total 2,974.14
224
+
225
+ Uses
226
+ Purchase of equity 2,415.00
227
+ Repay existing debt 410.00
228
+ Transaction fees 38.64 expensed
229
+ Financing fees 41.25 capitalised
230
+ Original issue discount 10.75
231
+ Cash to balance sheet 40.00
232
+ Change of control payments 18.50 management contracts
233
+ --------
234
+ Total 2,974.14
235
+
236
+ Entry metrics
237
+ Total leverage 7.71x
238
+ Equity contribution 36.8%
239
+ Sponsor ownership 92.1%
240
+ Total capitalisation 2,929.14
241
+ ```
242
+
243
+ It also carries the target's own balance sheet, which is what purchase
244
+ accounting is applied to:
245
+
246
+ ```console
247
+ $ capstack balance examples/meridian.json
248
+ Project Meridian - opening balance sheet (close 2026-06-30)
249
+ =============================================================
250
+
251
+ Assets
252
+ Cash 60.00
253
+ Identifiable assets 1,675.00
254
+ Goodwill 1,610.00
255
+ Deferred financing costs 41.25
256
+ Unamortised issue discount 10.75
257
+ --------
258
+ Total assets 3,397.00
259
+
260
+ Liabilities
261
+ Debt at face 1,850.00
262
+ Operating liabilities 480.00
263
+ Deferred tax liability 45.00
264
+ --------
265
+ Total liabilities 2,375.00
266
+
267
+ Equity
268
+ Sponsor equity 994.14
269
+ Rollover equity 85.00
270
+ Expensed at close -57.14
271
+ --------
272
+ Total equity 1,022.00
273
+
274
+ Liabilities and equity 3,397.00
275
+
276
+ Net debt 1,790.00
277
+ Goodwill share of assets 47.4%
278
+ ```
279
+
280
+ The same file carries the operating case:
281
+
282
+ ```console
283
+ $ capstack project examples/meridian.json
284
+ Project Meridian - operating case
285
+ =================================
286
+
287
+ P1 P2 P3 P4 P5
288
+ 2027-06 2028-06 2029-06 2030-06 2031-06
289
+ -------------------------------------------------------------------------------
290
+ Revenue 1,605.80 1,722.22 1,825.55 1,912.27 1,979.20
291
+ EBITDA 261.75 291.49 320.38 347.55 372.09
292
+ Depreciation & amortisation 57.81 62.00 65.72 68.84 71.25
293
+ EBIT 203.94 229.49 254.66 278.71 300.84
294
+
295
+ Cash tax -50.98 -57.37 -63.67 -69.68 -75.21
296
+ NOPAT 152.95 172.11 191.00 209.03 225.63
297
+
298
+ Add back D&A 57.81 62.00 65.72 68.84 71.25
299
+ Capital expenditure -77.08 -78.36 -78.50 -77.45 -75.21
300
+ Change in working capital -14.09 -13.04 -11.57 -9.71 -7.50
301
+ Unlevered free cash flow 119.59 142.71 166.65 190.72 214.17
302
+
303
+ EBITDA margin 16.3% 16.9% 17.5% 18.2% 18.8%
304
+ Cash conversion 45.7% 49.0% 52.0% 54.9% 57.6%
305
+ ```
306
+
307
+ And it carries the capital structure, which is where the cash actually goes:
308
+
309
+ ```console
310
+ $ capstack schedule examples/meridian.json
311
+ Project Meridian - debt schedule
312
+ ================================
313
+
314
+ P1 P2 P3 P4 P5
315
+ 2027-06 2028-06 2029-06 2030-06 2031-06
316
+ ----------------------------------------------------------------------------------
317
+ Unlevered free cash flow 119.59 142.71 166.65 190.72 214.17
318
+ Cash interest -141.32 -138.62 -134.23 -128.78 -122.71
319
+ Commitment fees -0.73 -0.67 -0.69 -0.74 -0.76
320
+ Levered free cash flow -22.45 3.42 31.73 61.20 90.71
321
+
322
+ Mandatory repayment -11.50 -11.50 -11.50 -11.50 -11.50
323
+ Cash sweep 0.00 0.00 -15.17 -37.27 -39.60
324
+ Revolver draw 13.95 8.08 0.00 0.00 0.00
325
+ Closing cash 40.00 40.00 45.06 57.48 97.08
326
+
327
+ Accrued to balances 11.67 12.25 12.79 13.39 14.01
328
+ Closing debt 1,864.12 1,872.95 1,859.07 1,823.69 1,786.60
329
+
330
+ Closing balances
331
+ Revolving credit facility 13.95 22.03 6.86 0.00 0.00
332
+ Term Loan B 1,138.50 1,127.00 1,115.50 1,073.59 1,022.48
333
+ Senior secured notes 450.00 450.00 450.00 450.00 450.00
334
+ Second lien 261.67 273.92 286.71 300.10 314.11
335
+
336
+ Leverage 7.12x 6.43x 5.80x 5.25x 4.80x
337
+ Base rate 4.25% 3.94% 3.62% 3.31% 3.00%
338
+ ```
339
+
340
+ The first two years are the interesting part: levered free cash flow is
341
+ negative, the revolver funds the gap, the second lien accrues rather than pays,
342
+ and total debt goes *up* before the operating case grows into the structure.
343
+
344
+ The sweep in this deal steps: three quarters of excess cash flow above 5.50x,
345
+ half above 4.50x, a quarter above 3.50x and nothing below. That is why the cash
346
+ balance climbs in the last two periods instead of every spare pound going
347
+ straight into the term loan.
348
+
349
+ See [`examples/meridian.json`](examples/meridian.json) for the input. Assumption
350
+ series are written the way an operating case is actually described — a bare
351
+ number for something flat, `{"ramp": [0.085, 0.035]}` for growth that tapers, or
352
+ a list when the years genuinely differ.
353
+
354
+ Whether the structure is *allowed* to keep running is a separate question:
355
+
356
+ ```console
357
+ $ capstack covenants examples/meridian.json
358
+ Project Meridian - covenants
359
+ ============================
360
+
361
+ P1 P2 P3 P4 P5
362
+ 2027-06 2028-06 2029-06 2030-06 2031-06
363
+ ----------------------------------------------------------------------------------
364
+ Total net leverage n/a 6.29x 5.66x 5.08x 4.54x
365
+ covenant n/a 7.50x 6.75x 6.00x 5.50x
366
+ cushion n/a 16.2% 16.1% 15.3% 17.4%
367
+ status - ok ok ok ok
368
+
369
+ First lien net leverage n/a 3.80x 3.36x 2.92x 2.49x
370
+ covenant n/a 5.25x 4.75x 4.25x 4.00x
371
+ cushion n/a 27.5% 29.2% 31.2% 37.8%
372
+ status - ok ok ok ok
373
+
374
+ Interest coverage n/a 2.09x 2.37x 2.68x 3.01x
375
+ covenant n/a 1.73x 1.85x 1.98x 2.10x
376
+ cushion n/a 17.6% 22.1% 26.4% 30.3%
377
+ status - ok ok ok ok
378
+
379
+ Fixed charge coverage n/a 1.03x 1.22x 1.42x 1.64x
380
+ covenant n/a 1.00x 1.00x 1.00x 1.00x
381
+ cushion n/a 1.7% 9.9% 17.1% 23.3%
382
+ status - ok ok ok ok
383
+
384
+ Tightest test
385
+ Fixed charge coverage in period 2
386
+ EBITDA projected 291.49
387
+ Breaches below 286.53
388
+ Cushion 1.7%
389
+
390
+ No maintenance test is breached across the hold.
391
+ ```
392
+
393
+ Each test shows the ratio, the covenant in force that period, and the cushion —
394
+ how far EBITDA could fall before the test trips. The cushion is the number worth
395
+ reading. All four tests pass comfortably in turns, but the fixed-charge test in
396
+ period two survives a fall in EBITDA of only 1.7%, which is a materially
397
+ different deal from the one the leverage rows describe.
398
+
399
+ And finally what the whole thing was for:
400
+
401
+ ```console
402
+ $ capstack exit examples/meridian.json
403
+ Project Meridian - exit
404
+ =======================
405
+
406
+ Exit at 2031-06-30
407
+ Exit EBITDA 372.09
408
+ Enterprise value 4,092.98
409
+ Debt outstanding 1,786.60
410
+ Cash 97.08
411
+ Cost of sale 30.70
412
+ Equity value 2,372.77
413
+ Exit multiple 11.00x
414
+ Exit leverage 4.54x
415
+
416
+ Equity
417
+ invested proceeds MoIC IRR
418
+ Sponsor preferred 845.02 1,241.87 1.47x 8.0%
419
+ Sponsor common 149.12 927.34 6.22x 44.1%
420
+ Management rollover 85.00 203.56 2.39x 19.1%
421
+ -------------------------------------------------------------------------
422
+ Total 1,079.14 2,372.77 2.20x 17.1%
423
+ over 5.00 years
424
+
425
+ Where the value came from
426
+ EBITDA growth 1,519.02
427
+ Multiple change -186.04
428
+ Debt paydown 100.49
429
+ Entry and exit costs -139.84
430
+ --------------
431
+ Value created 1,293.63
432
+ ```
433
+
434
+ The equity rows are the point. Bought and sold at a lower multiple than it was
435
+ bought at, the deal still returns 2.20x — and the sponsor's preferred earns 8.0%
436
+ while the common behind it earns 44.1%, on exactly the same exit. That gap is
437
+ the structure doing what the structure is for, and a model that reported one
438
+ blended figure for the equity would hide it.
439
+
440
+ The bridge underneath ties to the change in equity value exactly. It is worth
441
+ reading in the order it prints: the business is worth 1,519 more because it
442
+ earns more, 186 less because the multiple came in, and 100 more because the
443
+ schedule repaid debt out of cash flow — a reminder that in a five-year hold at
444
+ this leverage, deleveraging is a rounding error next to growth.
445
+
446
+ Management get paid too, and the plan that pays them comes out of the common:
447
+
448
+ ```console
449
+ $ capstack exit examples/kestrel.json
450
+ Project Kestrel - exit
451
+ ======================
452
+ ...
453
+ Equity
454
+ invested proceeds MoIC IRR
455
+ Sponsor equity 407.62 936.50 2.30x 18.1%
456
+ Management rollover 24.00 139.94 5.83x 42.3%
457
+ -------------------------------------------------------------------------
458
+ Total 431.62 1,076.43 2.49x 20.0%
459
+ over 5.00 years
460
+
461
+ Management incentive plan
462
+ Vested 100.0%
463
+ Share of the pot 5.7%
464
+ Residual before the plan 1,093.28
465
+ Strike paid in 47.96
466
+ Pot divided 1,141.24
467
+ Entitlement 64.81
468
+ Paid to management 16.85
469
+ What management are paid is what the common give up, to the penny.
470
+ ```
471
+
472
+ Kestrel's pool is 10% of the fully diluted equity, struck at what the equity was
473
+ worth on the day it closed, on a ratchet that pays 5% of the pot up to a 2.0x
474
+ sponsor return and 10% above it. The sponsor lands on 2.30x, so the second band
475
+ is partly in play and the blended take is 5.7% — a number that is not any of the
476
+ inputs. Every return above it is quoted net of the plan, which is the only
477
+ version worth quoting: a sponsor multiple struck before management are paid is a
478
+ multiple on money somebody else receives.
479
+
480
+ Not every deal is bought once and sold once. Kestrel raises 80 of incremental
481
+ debt at the end of the third year and pays the proceeds out:
482
+
483
+ ```console
484
+ $ capstack report examples/kestrel.json
485
+ ...
486
+ Paid during the hold
487
+ --------------------
488
+
489
+ 98.2 reached the equity before the exit, funded by 80.0 of new debt. The
490
+ money multiple moves -0.02x and the rate of return moves +0.8pp: the same
491
+ money, banked earlier, less what the debt cost to carry.
492
+
493
+ Distributed during the hold 98.2
494
+ Incremental face raised 80.0
495
+ Cost of raising it 1.8 fees and issue discount
496
+ Money multiple, as run 2.47x
497
+ Money multiple, held flat 2.49x
498
+ Rate of return, as run 20.9%
499
+ Rate of return, held flat 20.0%
500
+
501
+ Date Payment Amount Years Preferred Common
502
+ ---------- ---------------------- ------ ----- --------- ------
503
+ 2029-09-30 Distribution, period 3 98.2 3.00 0.0 98.2
504
+
505
+ Dividend recapitalisation put 0.84x of leverage back on, taking net debt
506
+ from 3.13x to 3.97x of EBITDA.
507
+ ```
508
+
509
+ The four figures in the middle are the point. Nothing about the business
510
+ changed — same earnings, same multiple, same buyer — and the two measures
511
+ disagree about whether anything happened. The multiple falls slightly, because
512
+ the new debt costs interest for two years and the fees were real. The rate rises,
513
+ because it is the only measure that knows the sponsor had the money in 2029
514
+ rather than 2031. The "held flat" rows are the same deal run a second time with
515
+ the event stripped out, which is the only way to say what the event was worth
516
+ rather than merely that it occurred.
517
+
518
+ A deal that buys other businesses while it holds this one is described under
519
+ `acquisitions`, and each purchase gets its own funding table:
520
+
521
+ ```console
522
+ $ capstack acquisitions examples/thornbury.json
523
+ Project Thornbury - acquisitions
524
+ ================================
525
+
526
+ Halloway (end of period 1)
527
+ ---------------------------
528
+ EBITDA acquired 6.50
529
+ Multiple paid 6.75x
530
+ Enterprise value 43.88
531
+ Synergies, over 2 periods 0.90
532
+ Multiple after synergies 5.93x
533
+ Transaction fees 0.66
534
+ Integration cost 1.20
535
+ Total uses 45.73
536
+ Face drawn 44.00
537
+ Debt proceeds 42.90
538
+ Funded from cash 2.83
539
+ Capital deployed 46.83
540
+ Cash after 16.28
541
+ Leverage after 5.06x
542
+ Turns added +0.92x
543
+ ...
544
+ Blended entry
545
+ Platform enterprise value 504.00
546
+ Platform EBITDA 48.00
547
+ Platform multiple 10.50x
548
+ Acquired enterprise value 134.25
549
+ EBITDA acquired 20.00
550
+ Combined EBITDA 68.00
551
+ Capital deployed 647.09
552
+
553
+ Blended multiple 9.39x
554
+ After synergies 9.01x
555
+ On capital deployed 9.52x
556
+ Multiple arbitrage +1.11x
557
+ Bought, not built 29.4%
558
+ ```
559
+
560
+ The last five lines are what a buy-and-build is argued on. A platform bought at
561
+ 10.50x that adds three businesses between 6.25x and 7.00x has an entry multiple
562
+ of 9.39x, and it is that number the exit multiple has to be compared against —
563
+ quoting the platform's 10.50x flatters the deal by exactly the arbitrage. The
564
+ three readings above it answer different questions. After synergies is 9.01x,
565
+ which credits earnings that have not been earned yet. On capital deployed is
566
+ 9.52x, which counts the fees, the discount and the integration cost that a
567
+ multiple quoted on enterprise value leaves out: doing five transactions instead
568
+ of one is not free, and the gap between 9.39x and 9.52x is what it cost.
569
+
570
+ The purchases then run through everything downstream without being told about.
571
+ The acquired earnings join the operating case from the following period at their
572
+ own margin, growing on their own base; the debt raised for them is swept,
573
+ amortised and tested by the covenants; and the memo reports the programme
574
+ against the same deal with the purchases stripped out:
575
+
576
+ ```console
577
+ $ capstack report examples/thornbury.json
578
+ ...
579
+ Bought during the hold
580
+ ----------------------
581
+
582
+ 3 acquisitions added 20.0 of run-rate EBITDA at 9.39x blended against a
583
+ platform bought at 10.50x, 1.11x of arbitrage. Against the platform run on
584
+ its own the money multiple moves +0.43x and the rate of return moves
585
+ +4.5pp.
586
+
587
+ Business Closes EBITDA Multiple Price New debt From cash
588
+ --------------- ------ ------ -------- ----- -------- ---------
589
+ Halloway P1 6.5 6.75x 43.9 44.0 2.8
590
+ Ferrand Group P2 8.0 7.00x 56.0 56.0 3.7
591
+ Calder Services P3 5.5 6.25x 34.4 33.0 3.5
592
+
593
+ 25.2 of the 94.1 of EBITDA the exit is priced on was bought rather than
594
+ built, which is 26.7% of it. An exit multiple argued from the platform's
595
+ own growth has to carry that share too.
596
+ ```
597
+
598
+ A facility taken out early is described under `refinancings`, and the memo
599
+ reports the trade rather than the new coupon:
600
+
601
+ ```console
602
+ $ capstack report examples/thornbury.json
603
+ ...
604
+ Refinanced during the hold
605
+ --------------------------
606
+
607
+ 200.9 of paper was retired early at a cash cost of 4.9. The lower coupon
608
+ does not earn back that over the hold that remains: 2.5 of interest saved.
609
+ A further 2.5 of capitalised fees was written off, which is a charge
610
+ against earnings and not against cash.
611
+
612
+ Face retired early 200.9
613
+ Face of the new paper 195.0
614
+ Call premiums paid 2.0
615
+ Cost of the exercise 4.9 premium, fees and discount
616
+ Interest saved over the remainder 2.5 undiscounted, before amortisation
617
+ Fees written off 2.5 non-cash; derived from the capitalised balance
618
+
619
+ Term Loan B repricing took 200.9 out at 7.7% and replaced it at 6.4%,
620
+ saving 2.5 a period with 1 of them left. Over that remainder the saving
621
+ does not cover what it cost: 2.5 against 4.9.
622
+ ```
623
+
624
+ That verdict is the reason the section exists. A repricing is always attractive
625
+ stated as a spread — 130 basis points off the coupon — and this one still does
626
+ not clear, because the premium and the fees are paid at once while the saving
627
+ arrives a period at a time and there is only one period left. The example ships
628
+ with a decision the model argues against, which is more useful than one where
629
+ everything works.
630
+
631
+ That write-off is derived rather than stated. What each tranche was placed with
632
+ — the arrangement fee charged on face and the discount it cleared at — is
633
+ released across the life of the paper, and `capstack fees` shows the release and
634
+ what the money actually costs once it is counted:
635
+
636
+ ```console
637
+ $ capstack fees examples/kestrel.json
638
+ Project Kestrel - capitalised financing costs
639
+ =============================================
640
+
641
+ P1 P2 P3 P4 P5
642
+ 2027-09 2028-09 2029-09 2030-09 2031-09
643
+ -------------------------------------------------------------------
644
+ Charge for the period
645
+ Unitranche 1.96 2.13 2.32 2.53 2.76
646
+
647
+ Balance remaining
648
+ Unitranche 12.74 10.61 8.29 5.77 3.01
649
+
650
+ Cost of the money
651
+ coupon effective uplift method
652
+ Unitranche 9.65% 10.48% 83bp effective interest
653
+
654
+ Capitalised at close 14.70
655
+ Released if the paper runs to term 11.69
656
+ Still capitalised at the end 3.01
657
+ ```
658
+
659
+ The unitranche is quoted at 9.65% and costs 10.48%. Eighty-three basis points is
660
+ not a rounding difference on 420 of paper, and it is invisible in a model that
661
+ puts the fees on the uses side of the funding table and never looks at them
662
+ again. The balance still capitalised at the end is not an error either: the
663
+ paper matures in period seven and the hold runs five, so somebody writes off 3.01
664
+ at the exit.
665
+
666
+ Most deals do not sign on a reporting date. A deal closing on 16 November
667
+ against a 31 December year end owns forty-five days of the year it closed in,
668
+ and modelling that as a full period puts the trading in the wrong place and
669
+ dates every column after it a month and a half early — which moves the exit
670
+ date, the holding period and therefore the rate of return on a deal where
671
+ nothing else changed. `projection.first_period_end` opens the grid on a stub:
672
+
673
+ ```console
674
+ $ capstack project examples/ashcroft.json
675
+ Project Ashcroft - operating case
676
+ =================================
677
+
678
+ Stub P1 P2 P3 P4 P5
679
+ 2026-12 2027-12 2028-12 2029-12 2030-12 2031-12
680
+ -----------------------------------------------------------------------------------
681
+ Revenue 62.26 541.36 576.01 643.11 673.98 700.94
682
+ EBITDA 9.65 83.91 92.39 107.00 116.01 124.19
683
+ ...
684
+ Change in working capital 0.00 -3.45 -3.29 -6.37 -2.93 -2.56
685
+ Unlevered free cash flow 5.11 40.94 47.31 54.17 64.63 71.62
686
+ ```
687
+
688
+ That zero is the whole exercise. Revenue, EBITDA and capital expenditure are
689
+ flows and scale with the length of the period; working capital is a balance and
690
+ does not. A model that struck the working-capital balance against six weeks of
691
+ revenue would carry an eighth of the real one and release the difference into
692
+ the stub as cash the business never had — which is the single largest number in
693
+ a badly built stub and the easiest one to miss, because it makes the first
694
+ period look better rather than worse.
695
+
696
+ Two assumptions at a time, with the deal rebuilt and re-run per cell:
697
+
698
+ ```console
699
+ $ capstack sensitivity examples/meridian.json \
700
+ --rows ebitda-margin:-6,-3,0,3 --columns exit-year:3,4,5,6
701
+ Project Meridian - sensitivity
702
+ ==============================
703
+
704
+ IRR
705
+ exit year across, ebitda margin down
706
+ base case 17.1%, marked *
707
+
708
+ 3y 4y 5y* 6y
709
+ -6pp -34.7%! -16.0%! -6.8%! -3.8%!
710
+ -3pp -3.9%! 3.2%! 6.7%! 7.2%!
711
+ 0pp* 16.0% 17.1% 17.1% 15.8%
712
+ +3pp 30.6% 27.2% 24.6% 21.9%
713
+
714
+ ! a covenant breaches on this case
715
+ * the assumption the file describes
716
+ ```
717
+
718
+ The marks are the part worth reading. Three hundred basis points off the margin
719
+ still returns 6.7% over the planned hold, and every cell in that row trips a
720
+ maintenance test before it gets there — a return the lenders have the right to
721
+ interrupt is not a return. Axes are written the way they are said: levels as
722
+ levels (`entry-multiple:11,11.5,12`), shifts in percentage points off the file's
723
+ own case (`ebitda-margin:-1.5,0,1.5`). Seven dimensions and seven metrics are
724
+ available; `capstack sensitivity --help` lists them.
725
+
726
+ And the whole thing as one document:
727
+
728
+ ```console
729
+ $ capstack report examples/meridian.json
730
+ Project Meridian — investment committee (close 2026-06-30)
731
+ ==========================================================
732
+
733
+ The transaction
734
+ ---------------
735
+
736
+ 240.0 of LTM EBITDA at 11.50x, funded at 7.71x of gross debt and 7.46x net
737
+ of the cash left on the balance sheet.
738
+ ...
739
+
740
+ Where the case stops working
741
+ ----------------------------
742
+
743
+ The sponsor gets its capital back at 7.50x, which is 4.00x below the
744
+ 11.50x paid going in.
745
+
746
+ Question Answer
747
+ -------------------------------------------- -------
748
+ Exit multiple returning capital and no more 7.50x
749
+ Exit multiple returning twice capital 10.42x
750
+ Margin shift tripping the first covenant -0.35pp
751
+ Opening leverage tripping the first covenant 7.94x
752
+ ```
753
+
754
+ `--markdown` for anything that has to be pasted somewhere, `--json` for
755
+ anything that would rather lay the memo out itself, and `--no-breakevens` to
756
+ skip the last section, which is the expensive part.
757
+
758
+ That last section is the reason the report exists. Everything above it restates
759
+ the base case, which is the one thing the reader already believes. The
760
+ break-evens say where it stops: this structure has 4.00x of room on the exit
761
+ multiple and 35 basis points of room on margin before a lender has a right to
762
+ accelerate, and those two facts are what the meeting is actually about.
763
+
764
+ ## Test
765
+
766
+ ```bash
767
+ pytest
768
+ mypy
769
+ ```
770
+
771
+ ## Design decisions
772
+
773
+ **Money is `Decimal`, never `float`.** A debt schedule is a chain of dependent
774
+ subtractions running twenty periods deep; binary floating point drifts, and the
775
+ drift shows up as a balance that fails to reach zero in the period it should.
776
+ Every currency amount in `capstack` is a `Decimal` carried at full precision and
777
+ rounded only at the point of presentation.
778
+
779
+ Rates are a separate matter. Solving for an internal rate of return means root
780
+ finding, and root finding wants floats. So the boundary is explicit: cash flows
781
+ are exact, the solver works in floating point, and the result is a rate rather
782
+ than an amount.
783
+
784
+ **An ambiguous IRR is reported as ambiguous.** A cash-flow stream that changes
785
+ sign more than once can have several rates at which its present value is zero.
786
+ A stream of -1,000 / +2,500 / -1,560 returns 20% and it returns 30%; both are
787
+ true, and which one a solver reports depends on where it started looking.
788
+
789
+ `capstack` scans the whole rate range for sign changes, refines every bracket it
790
+ finds, and raises `AmbiguousIRR` carrying all the roots rather than picking one.
791
+ Refusing to answer is the correct behaviour here — the alternative is a model
792
+ that quietly reports the flattering root.
793
+
794
+ **Sources and uses balance exactly, or the object does not exist.** The check is
795
+ in `__post_init__`, and it is equality rather than a tolerance. A funding table
796
+ that is out by a few thousand on a three-billion deal has not nearly balanced —
797
+ it has a missing line item, and a tolerance would hide precisely the error the
798
+ table exists to catch.
799
+
800
+ The sponsor's cheque is a derived residual rather than an input, which is how it
801
+ works on a real deal: leverage is negotiated with lenders, price is negotiated
802
+ with the seller, and equity fills whatever gap is left. When that residual comes
803
+ out negative the structure is funding itself entirely out of its own borrowing
804
+ capacity and paying the sponsor a distribution at close. That is aggressive, not
805
+ invalid, so the model labels it rather than refusing it.
806
+
807
+ **Goodwill is a residual, and the target's own goodwill is not part of it.**
808
+ Goodwill on the target's books is the leftover of somebody else's transaction.
809
+ It is written off at close and a new residual is struck against the price just
810
+ paid; carrying both counts the same intangible twice and flatters the asset side
811
+ by the whole of the old number.
812
+
813
+ A fair-value step-up in a stock deal comes with a deferred tax liability, because
814
+ book depreciation rises and tax depreciation does not. Recognising the step-up
815
+ without the liability overstates equity by the tax on it. In the shipped example,
816
+ 180 of step-up at 25% moves only 135 out of goodwill, not 180.
817
+
818
+ **A preferred paid down early accrues on what is left.** Once a deal can pay
819
+ its shareholders more than once, a preferred claim stops being "the cheque plus
820
+ a hold's worth of coupon". A distribution meets the accrued return first and
821
+ capital second — which is the ordinary waterfall ordering, and the thing that
822
+ makes "how much capital is still outstanding" answerable at all after a partial
823
+ repayment. The remaining capital is what the coupon runs on from there.
824
+
825
+ Charging the coupon on the original cheque after part of it has been repaid
826
+ overstates the preferred's claim at exit and understates everything ranking
827
+ behind it, which on a structure with preferred ahead of common is a transfer
828
+ between two holders who both read the model.
829
+
830
+ **A recapitalisation is reported against the deal without it.** Interest and
831
+ fees mean the money multiple falls slightly and the rate of return rises
832
+ materially: the same money, banked earlier, less what the debt cost to carry.
833
+ Reported on its own, that says the sponsor received some money early. Reported
834
+ against the same deal run a second time with the event stripped out, it says
835
+ what the event was worth. The second run costs a full pass of the engine and is
836
+ worth it, because the counterfactual is the entire content of the claim.
837
+
838
+ **An acquired business is carried as its own stream, not as a lift to the
839
+ platform's revenue line.** The natural implementation adds the bought revenue
840
+ into the base that compounds, and it is wrong twice over: the acquired base then
841
+ grows a second time next period, and the earnings inherit the platform's margin
842
+ whatever they were actually bought on. Carrying the purchase separately keeps
843
+ both honest — it compounds from its own run-rate at its own margin — and it also
844
+ buys the one figure a buy-and-build cannot be judged without, which is how much
845
+ of the exit earnings were bought rather than built.
846
+
847
+ **Cash is the plug for an acquisition, and a purchase the balance sheet cannot
848
+ fund is refused.** The draws raise what they raise; whatever is left of the
849
+ price comes off the cash the business is holding. That means the funding table
850
+ cannot fail to balance, and reduces the failure modes to one real question:
851
+ whether the business could actually pay. When it cannot, the answer is an error
852
+ naming what was needed and what was there, not a quietly smaller purchase. A
853
+ model that pays less than the file describes has answered a question nobody
854
+ asked.
855
+
856
+ **An acquisition in the final period is refused rather than modelled.** It would
857
+ pay cash for earnings no period ever records, and the exit — priced on the final
858
+ period's EBITDA — would value nothing at all. The deal would then report a
859
+ purchase price out, no earnings in, and a bridge blaming the shortfall on the
860
+ operating case. Bringing the purchase forward or lengthening the projection is
861
+ what such a file actually means, and saying so is more useful than modelling the
862
+ nonsense faithfully.
863
+
864
+ **Synergies are quoted twice and neither is the headline.** The blended multiple
865
+ holds them out, because a multiple struck on earnings that do not exist yet is a
866
+ forecast wearing the clothes of a fact. The synergised multiple credits them,
867
+ because it is the number the price was defended with and hiding it does not make
868
+ the argument go away. Phasing is explicit for the same reason: an add-on that
869
+ pays for itself in year one and one that pays for itself in year three are
870
+ different deals, and underwriting the first when the second is what happens is
871
+ how a roll-up gets into trouble.
872
+
873
+ **A refinancing is judged on the hold that remains, not on the spread.** The
874
+ premium and the fees on the new paper are paid at once; the lower coupon arrives
875
+ a period at a time. Two years from an exit there is frequently not enough left
876
+ of the hold to earn back what the exercise cost, and a model reporting the new
877
+ coupon without that comparison has made the case for something it never tested.
878
+ The saving is deliberately struck on the balance retired and before amortisation
879
+ and the sweep reduce it, which makes it an upper bound — the direction a cost
880
+ comparison should err in.
881
+
882
+ **Unamortised financing fees written off are reported, and reported apart from
883
+ anything that is cash.** The fees on the original paper were capitalised at
884
+ close and written down over its life; retiring it early charges whatever is
885
+ left in one go. Nothing moves in the bank account, no balance in this engine
886
+ changes and the return does not shift by a basis point — which is exactly why
887
+ it has to sit outside the cash cost rather than inside it. It is reported at all
888
+ because it is real in a real set of accounts, and a reader who meets the number
889
+ for the first time somewhere else has been failed by the model.
890
+
891
+ **A takeout repays before it draws.** The order only shows when the new paper is
892
+ the same facility at a new price, and then it decides the answer: repaying first
893
+ makes a repricing net to the difference, while drawing first carries both
894
+ balances for an instant and reports a figure the credit agreement never showed.
895
+ The balance retired is the one left after the period's own amortisation and
896
+ sweep have run, because that is the balance the notice would be served on.
897
+
898
+ **A ratchet is written as marginal bands, because the obvious reading is
899
+ circular.** A management pool that steps up as the sponsor clears hurdles is the
900
+ common structure and the awkward one to model: the pool's share depends on the
901
+ sponsor's return, and the sponsor's return depends on the pool's share. Models
902
+ that write down the circle either iterate to whatever they converge on, or test
903
+ the hurdle on a pre-dilution figure and leave the reader to discover that 2.0x
904
+ meant 2.1x before management were paid.
905
+
906
+ `capstack` writes the ratchet the way a well-drafted one reads: a *marginal*
907
+ share of the proceeds in each band above a hurdle, rather than a higher share of
908
+ everything once the hurdle is cleared. That makes the sponsor's post-ratchet
909
+ proceeds continuous and strictly increasing in the sale price, so each band's
910
+ boundary can be solved in closed form from the band below it — no iteration, and
911
+ the hurdles mean what they say. There is a test that re-derives the first
912
+ boundary from a finished deal and asserts the sponsor lands on exactly 2.0x
913
+ there.
914
+
915
+ The retroactive alternative is a real structure and it is deliberately not
916
+ modelled. It is discontinuous: a penny more of enterprise value can leave the
917
+ sponsor with less money than it had a penny earlier, and a solver asked where
918
+ the hurdle binds has to choose between two answers on either side of a cliff.
919
+
920
+ **An option pool is settled by the treasury method, and struck at cost means
921
+ struck at cost.** The exercise proceeds join the pot before the pot is divided,
922
+ so a pool holding a tenth of the fully diluted equity does not hold a tenth of
923
+ the residual — it holds a tenth of the residual plus its own strike, less the
924
+ strike. Below the point where those two are equal the options lapse: management
925
+ are paid nothing and the common are not diluted at all.
926
+
927
+ The strike itself is described as a multiple of the equity value at close rather
928
+ than as an amount, so it moves with the entry multiple across a sensitivity grid
929
+ instead of pricing every column against the base case. The gross-up in that
930
+ derivation is easy to get wrong and worth stating: the existing holders' cheque
931
+ buys them the share of the company the pool does *not* hold, so the fully diluted
932
+ value at close is that cheque divided by one less the pool's share. Struck there,
933
+ a plan is exactly at the money on a deal that creates no value. The naive
934
+ derivation — the pool's share times the cheque — pays management something on a
935
+ deal that created nothing, which is not what anyone signing it believed.
936
+
937
+ **Working capital reaches cash flow as a movement, not a level.** A business
938
+ growing at 8% with working capital steady at 15% of revenue consumes cash every
939
+ single period, because the balance is rising and the increase has to be funded —
940
+ even though the ratio never moves. Subtracting the balance rather than the change
941
+ is the classic error, and it understates cash flow by an order of magnitude.
942
+
943
+ **A loss carryforward cannot shelter everything.** The pool is capped at a
944
+ percentage of taxable income — 80% by default, matching the limitation on US
945
+ losses arising from 2018 onward — so a company with large historic losses still
946
+ writes a cheque the moment it turns profitable. Modelling the pool without the
947
+ cap overstates cash in precisely the years a sponsor is counting on it.
948
+
949
+ **The interest/balance circularity is solved, not avoided.** Accrue interest on
950
+ the average of the opening and closing balance — the right convention when
951
+ repayments are spread through the period — and the closing balance depends on
952
+ what was repaid, which depends on the cash left after interest, which depends on
953
+ the balance the interest was accrued on. Once repayments are capped at balances
954
+ and sweeps at available cash there is no closed form, so the engine iterates to
955
+ a fixed point and reports the residual it reached. The alternative, accruing on
956
+ the opening balance, overstates interest in every period a structure
957
+ deleverages — which is every period a buyout is working.
958
+
959
+ The map contracts by roughly `rate x year_fraction / 2` per turn, so a full step
960
+ settles in about ten iterations; the step is halved if it ever fails to reduce
961
+ the residual. Where no fixed point exists — a PIK rate at or past the pole at
962
+ `pik_rate x year_fraction = 2` — the engine raises rather than returning its last
963
+ iterate, because an unconverged schedule is not an approximate answer, it is a
964
+ set of balances that do not reconcile with the interest charged against them.
965
+
966
+ **A cash sweep is measured on the period's excess cash flow.** Not on the cash
967
+ balance. Cash that a partial sweep deliberately left behind is not excess cash
968
+ flow any more, and a credit agreement does not reach it again at the next test
969
+ date. Sweeping the balance instead takes back half the retained cash next
970
+ period, then half of that, until a negotiated 50% sweep has quietly become a
971
+ 100% one — which makes the sweep percentage, the most argued-over number in the
972
+ credit agreement, do nothing at all.
973
+
974
+ **Headroom is measured in EBITDA, not in turns.** The distance from 5.20x to a
975
+ 6.00x covenant is 0.80x. That is arithmetic, and it is not comparable across
976
+ tests: 0.80x of leverage headroom and 0.80x of interest-cover headroom describe
977
+ completely different amounts of trouble. Every observation therefore carries the
978
+ EBITDA at which the test would trip and the shortfall as a percentage of the
979
+ EBITDA projected. In the worked example the leverage tests look loose and the
980
+ fixed-charge test survives a 1.7% miss, which is the fact worth knowing and the
981
+ one the turns hide.
982
+
983
+ The debt and the charges are held at their projected levels while EBITDA is
984
+ flexed, which is why this is called a cushion and not a forecast. A business
985
+ actually earning less would sweep less and carry more debt into the following
986
+ year, so the true cushion is a little thinner than the reported one, never
987
+ thicker.
988
+
989
+ **An undefined ratio is not a pass and is not a blank.** A period with no
990
+ earnings has no leverage ratio. Whether that is a breach depends on what is
991
+ behind it: a business with no debt cannot be over-levered, and a business with
992
+ debt and no earnings is exactly the case the covenant exists to catch. Both
993
+ report no ratio; one passes and one breaches, and the report says which and why
994
+ rather than leaving a reader to infer it from an empty cell.
995
+
996
+ **The sweep grid is certified in arrears.** Real agreements sweep 50% of excess
997
+ cash flow, stepping down as leverage falls. Reading the step off the leverage of
998
+ the period being swept would make the rate depend on the closing balance, which
999
+ depends on the sweep — a second circularity, and a step function dropped into
1000
+ the middle of the interest fixed point, where it can oscillate between two rungs
1001
+ indefinitely. The step is resolved against the leverage at the most recent test
1002
+ date instead. That is not a modelling convenience: an excess cash flow payment
1003
+ is made in arrears, at a rate set by a certificate signed before the cash was
1004
+ counted.
1005
+
1006
+ **A structure carrying both a grid and a flat sweep rate is refused.** It has
1007
+ two answers to the same question, and silently preferring one of them hides a
1008
+ contradiction in the description of the deal rather than resolving it.
1009
+
1010
+ **Growth is valued at the entry multiple and the multiple at exit EBITDA.** The
1011
+ cross term between the two — the extra turns earned on the extra EBITDA — has to
1012
+ be assigned somewhere, and the choice changes the story. Putting it in the
1013
+ multiple line is the conservative reading: the alternative flatters the growth
1014
+ line in precisely those deals where the multiple expanded, which are the deals
1015
+ where a sponsor least wants to be asked how much of the return was theirs.
1016
+
1017
+ **The attribution is computed, not plugged.** The costs line could be defined as
1018
+ whatever the other three do not explain, and the bridge would then tie by
1019
+ construction and mean nothing. It is instead computed from the deal — the fees
1020
+ and issue discount the equity funded at close, plus the cost of selling — so the
1021
+ four components summing to the change in equity value is a check that can fail.
1022
+ It is asserted in the test suite at three different exit multiples.
1023
+
1024
+ **The bridge is drawn before limited liability, the distribution after it.**
1025
+ Equity in a leveraged company is an option: shareholders in a business worth
1026
+ less than its debt hand the keys to the lenders rather than receiving a bill.
1027
+ So the equity value is floored at zero when it is distributed. It is *not*
1028
+ floored in the attribution, because the floor is a legal fact rather than a
1029
+ source of value, and folding it into the costs line would misattribute a loss
1030
+ the lenders absorbed to fees the sponsor paid. The two are reported side by
1031
+ side, with the difference named.
1032
+
1033
+ **A security that was wiped out has no rate of return.** There is no rate at
1034
+ which nothing back is a return, and the solver's search range does not reach
1035
+ -100% because the discount factor is singular there. Rather than report the
1036
+ floor of the range as though it were an answer, the row carries no rate and the
1037
+ reason travels with it.
1038
+
1039
+ **Falling below the minimum cash balance is not the same as running out.** A
1040
+ business that ends a period on less cash than its own policy requires has a
1041
+ covenant conversation ahead of it. One that ends below zero has an unpaid bill.
1042
+ The model reports them separately, and plugs only the second — notionally, and
1043
+ by name — so the periods after it stay readable instead of compounding a deficit
1044
+ that has already been reported.
1045
+
1046
+ **Break-evens are bisected, not extrapolated.** Each evaluation rebuilds and
1047
+ re-runs the whole engine, so the function being solved is expensive — but more
1048
+ to the point it is not smooth. A cash sweep that steps at a leverage rung and a
1049
+ covenant that starts testing in period two put real discontinuities in these
1050
+ curves, and a secant or Brent step assuming local linearity will extrapolate
1051
+ across one and return a crossing that is not there. Halving an interval assumes
1052
+ nothing but a sign change. The bracket is required rather than guessed, because
1053
+ an open-ended search over an entry multiple eventually wanders into prices at
1054
+ which the deal does not describe a transaction at all.
1055
+
1056
+ **A sensitivity cell is the whole engine, not a gradient.** Raising the entry
1057
+ multiple raises the price, which the funding table absorbs into the sponsor
1058
+ cheque, which changes the capital every multiple in the column is measured
1059
+ against — and, since the debt did not move, changes opening leverage and so the
1060
+ sweep step and so the debt outstanding at exit. Lowering the *exit* multiple
1061
+ touches the last period and nothing upstream. A linearisation reports the two as
1062
+ mirror images; they are not, and the deals that get done live in that gap.
1063
+
1064
+ **Equity is described rather than measured.** A security funded as a share of
1065
+ the sponsor cheque keeps the description, not the amount. The sponsor's
1066
+ contribution is the plug that balances the funding table, so it moves whenever
1067
+ anything else does, and a stack that remembered the amount would report every
1068
+ multiple in a sensitivity column against the base case's denominator.
1069
+
1070
+ **Debt is carried at face, not at proceeds.** A tranche placed at 99.5 raises
1071
+ 99.5 and owes 100. The half-point is a use of funds. Carrying the tranche at
1072
+ proceeds understates leverage and understates every interest payment that
1073
+ follows it, because interest accrues on what is owed rather than on what was
1074
+ received.
1075
+
1076
+ **Amortisation is struck against a basis, and the basis is a ledger.** A credit
1077
+ agreement writes the instalment as a fraction of face — 1% a year on a term loan
1078
+ means 1% of what was borrowed, not 1% of what is left, which is why a sweep
1079
+ running ahead of the schedule does not reduce what is contractually due next
1080
+ period. Reading "what was borrowed" as the face drawn at close is right for
1081
+ paper placed at close and wrong in both directions for anything else: a
1082
+ delayed-draw facility repays nothing however much is taken down on it later, an
1083
+ incremental facility grows the balance without growing the instalment, and a
1084
+ facility retired at a refinancing keeps amortising against face that no longer
1085
+ exists. So the basis is carried across the hold rather than read off the
1086
+ tranche. It opens at the face drawn at close, rises by incremental face taken
1087
+ down at a period boundary, and goes to zero when the facility is retired —
1088
+ which means face drawn at the end of one period first amortises in the next,
1089
+ because the instalment for a period is struck on the basis that period opened
1090
+ on. The schedule prints the basis wherever it moves, so a step in the instalment
1091
+ has a visible cause.
1092
+
1093
+ **Capitalised financing costs are released over the life of the paper, not the
1094
+ life of the model.** Arrangement fees and original issue discount are one
1095
+ adjustment to what the debt is worth, not two, and they are a cost of borrowing
1096
+ the money rather than a cost of the period the cheque was written in. The
1097
+ general method is effective interest: solve the rate at which the contractual
1098
+ cash flows discount back to the net proceeds, and charge the gap between that
1099
+ rate and the coupon. On a bullet the charge rises as the discount unwinds
1100
+ towards face; on an amortising loan it falls, because principal comes off faster
1101
+ than the discount closes. A straight line is neither, which is why it is offered
1102
+ as a choice rather than as the default — and why it is what a revolver gets
1103
+ regardless, having no principal profile to solve a rate against.
1104
+
1105
+ The profile the rate is solved against is contractual: the amortisation schedule
1106
+ and the bullet at maturity, never the swept path. A borrower who sweeps hard in
1107
+ year one has not renegotiated the rate on the money it borrowed, and a profile
1108
+ that included the sweep would solve a different effective rate for every
1109
+ operating case the same loan was run against.
1110
+
1111
+ The point of carrying the balance is that a refinancing writes it off. That
1112
+ figure used to be typed into the deal file, and a figure a reader cannot check
1113
+ is a figure that will eventually be wrong: Thornbury asserted 2.40 where its own
1114
+ funding table implies 2.48. `unamortised_fees` is now optional, derived from the
1115
+ paper the deal actually placed, and the memo says which of the two it printed. A
1116
+ file with a balance an accountant has already agreed still states it and is
1117
+ still believed.
1118
+
1119
+ **A stub is part of a year, not a year of its own.** With a short period at
1120
+ close, reading an assumption series by position would hand the stub year one's
1121
+ growth and the first whole period year two's — so every column after the stub
1122
+ would be a year ahead of itself. The stub and the first whole period share a
1123
+ driver index instead. The stub trades at the rate the business is running at
1124
+ when the deal closes, prorated; growth is a whole period's assumption and is not
1125
+ applied inside it, so the base the first whole period compounds from is the base
1126
+ the deal was underwritten on.
1127
+
1128
+ Two things follow that a model without a stub never has to decide. Interest
1129
+ needs no help, because it accrues on a day count and prorates itself — but
1130
+ contractual amortisation does: an instalment written as 1% a year is not 1% in a
1131
+ forty-five-day period, and nothing in the amortisation driver knows how long the
1132
+ period it is being read for actually is. And a stub does not certify. A
1133
+ maintenance covenant is tested on a reporting date against the last twelve
1134
+ months' earnings, and a business six weeks into a hold has no twelve months;
1135
+ measuring a whole debt balance against a part-period figure would report
1136
+ leverage several turns worse than the deal carries and breach a covenant nobody
1137
+ has breached. The stub is recorded as untested with the reason on the row, and
1138
+ the leverage line shows nothing rather than a number.
1139
+
1140
+ **A date is stated as a period or as a year, and a file says which.** An
1141
+ assumption is read by the year a period falls in, so an operating case already
1142
+ describes the same five years however often they are reported. Everything a file
1143
+ stated as a period number was still a column, and a column is a different date on
1144
+ every frequency: `maturity: 7` retired a term loan in year seven on an annual
1145
+ grid and in quarter seven on a quarterly one, a year and a half into a five-year
1146
+ hold, with nothing raised anywhere.
1147
+
1148
+ Reinterpreting period numbers would have been the wrong fix. A period number is
1149
+ the right unit for something that genuinely happens in a particular quarter — an
1150
+ add-on that closes in the third one — and it is not supposed to survive a change
1151
+ of frequency. What was missing was the ability to say which of the two was meant.
1152
+ So a bare number is a period, as it always was, and a number suffixed with `y` is
1153
+ the end of that year, resolved against the grid: `"7y"` is period 7 on an annual
1154
+ grid and period 28 on a quarterly one, which are the same date. Maturities,
1155
+ availability periods, event dates and a covenant's first test period all read it.
1156
+
1157
+ The same reasoning applies to how long an assumption series is. A ramp from 8.5%
1158
+ to 3.5% across a five-year case is five numbers however often the years are
1159
+ reported, so a series is expanded over the years of the projection rather than
1160
+ over its columns. Expanding it over columns and reading it by year — which is
1161
+ what happened when assumptions first became annual — tapered the business over a
1162
+ quarter of the intended span on a quarterly grid, and cost 2% of exit EBITDA
1163
+ without raising anything.
1164
+
1165
+ Together with the two decisions above, this is what makes a file portable: the
1166
+ shipped Meridian deal run quarterly instead of annually prices its exit on the
1167
+ same earnings at the same multiple and lands within half a per cent on debt
1168
+ outstanding and two hundredths of a per cent on equity value. The residual is
1169
+ not error — a quarterly model accrues interest over shorter periods and sweeps
1170
+ four times a year, and genuinely deleverages a little differently.
1171
+
1172
+ **A commitment is consumed by drawing on it, unless it revolves.** A revolver
1173
+ and a delayed-draw term loan look alike in a file — both are committed at close
1174
+ with nothing drawn, both charge a fee on the undrawn balance — and they behave
1175
+ differently in the one way that matters. Repaying a revolver restores its
1176
+ capacity, because that is what revolving means. Repaying a delayed-draw facility
1177
+ does not entitle anyone to draw it again. So the two measure "undrawn" against
1178
+ different things: a revolver against the balance outstanding, a term commitment
1179
+ against the cumulative face taken down since close, which is the figure the
1180
+ amortisation basis has been carrying all along. A model that used the balance for
1181
+ both would let a borrower draw an acquisition line, repay it out of cash flow,
1182
+ and draw it again, and would bill the ticking fee at its highest on the facility
1183
+ the borrower had repaid the most of.
1184
+
1185
+ A term commitment has to state an availability period. A revolver is available
1186
+ until it matures and already knows when that is; a delayed-draw facility lapses
1187
+ on a date whether or not anyone drew it, and without that date there is nothing
1188
+ to stop a ticking fee running for the rest of the hold on capacity nobody can
1189
+ take down. Draws are checked against the capacity that exists, walked in date
1190
+ order, because two add-ons that each fit inside a facility can still overdraw it
1191
+ between them. A tranche with no commitment stays an uncommitted accordion: there
1192
+ is nothing to check a draw against, which is an honest description of what an
1193
+ accordion is.
1194
+
1195
+ The alternative — describing the facility as a term loan already drawn at close,
1196
+ which is what the engine used to require — is wrong three ways. Interest is
1197
+ charged on money the business does not have. Leverage is overstated from close,
1198
+ so covenant headroom and the sweep step are both struck against a balance that
1199
+ does not exist. And the ticking fee, which is the actual cost of the arrangement
1200
+ and usually a third to a half of the margin, cannot be charged at all.
1201
+
1202
+ **A covenant is certified over the year behind the date, not over the column.**
1203
+ A maintenance test compares a stock against a flow, and a flow only means
1204
+ something over a stated interval. Every credit agreement names a year. On an
1205
+ annual grid the year is the column, which is why dividing one column by another
1206
+ was right for as long as the engine only had annual grids — and wrong by the
1207
+ frequency the moment it did not. On a quarterly grid a structure at 5.2x reads
1208
+ as 20.8x, every leverage test in the file breaches from the first certification,
1209
+ and the memo leads with a deal that fails.
1210
+
1211
+ So the balances are the ones standing on the test date and the flows — earnings,
1212
+ cash interest, contractual repayment, capital expenditure, tax — are summed over
1213
+ the twelve months to it. The cash sweep steps on the same measure, because a
1214
+ grid that steps on leverage is asking the same question and would otherwise sit
1215
+ at its top rate for an entire hold.
1216
+
1217
+ A date with fewer than twelve months behind it cannot certify. Nine months of
1218
+ earnings is not a conservative year, it is a different measure, and a ratio built
1219
+ on one reads a third too high — so the first three quarters of a quarterly grid
1220
+ are reported untested with the reason on the row, exactly as a stub already was,
1221
+ and the row says how long the interval actually was rather than calling it a
1222
+ year. The sweep falls back to the level the deal was priced at, which has to be a
1223
+ year of earnings too: falling back to the first entry of a trailing series would
1224
+ certify the opening structure at four times its leverage.
1225
+
1226
+ **An assumption is annual, and a period is a share of a year.** The same deal
1227
+ file has to describe the same business whether the year is reported once or
1228
+ twelve times, and that single requirement settles four questions that look
1229
+ unrelated. An assumption series is read by the year a period falls in rather
1230
+ than by the column, so a five-year case is not exhausted in five quarters. A
1231
+ growth rate is converted before it is applied more than once a year — the rate
1232
+ that belongs in a quarter is the one that compounds to the annual figure across
1233
+ four of them, not the annual figure itself, which would grow a business 36% a
1234
+ year on an 8% assumption. A flow takes its period's share of the year rather
1235
+ than the whole of it. And contractual amortisation, written per year, is charged
1236
+ per year: 1% a year is 0.25% a quarter, on the same side of the model where
1237
+ interest already accrues on days.
1238
+
1239
+ The year's revenue is settled first, at the annual rate, exactly as it is on an
1240
+ annual grid; the periods inside the year then divide that figure between them.
1241
+ Not evenly, because a business growing at 9% earns more in its fourth quarter
1242
+ than in its first — the shares ramp at the rate that compounds to the annual one
1243
+ and are normalised to sum to one. That buys both properties at once: the
1244
+ quarters slope, and they add back to the year exactly. Balance-sheet ratios are
1245
+ struck against the trailing twelve months rather than against a single period
1246
+ annualised, for the same reason a working-capital ratio is a stock over a year
1247
+ of sales.
1248
+
1249
+ What follows is that revenue, EBITDA, capital expenditure, cash tax, free cash
1250
+ flow and the year-end working-capital balance agree year by year on annual,
1251
+ semi-annual, quarterly and monthly grids, and an annual model is arithmetically
1252
+ untouched. What does *not* carry across is anything a file states as a period
1253
+ number — a maturity, an add-on's closing period, a covenant's first test date.
1254
+ Those are period numbers by design, so `maturity: 7` is the seventh year on an
1255
+ annual grid and the seventh quarter on a quarterly one, and a file moved between
1256
+ frequencies has to restate them.
1257
+
1258
+ ## Licence
1259
+
1260
+ MIT