---
title: "Legal Documentation"
book: "The Desk and the Firm"
subject: quant
language: en
chapter: 18
exercises: 8
source: https://one-course.com/books/quant/16/en/chapter/18-legal-documentation
---

# Chapter 18 — Legal Documentation

When Lehman Brothers filed for bankruptcy in September 2008, Metavante Corporation had an interest rate swap on $600 million of notional with one of its subsidiaries, and the swap had moved in the subsidiary’s favour. Metavante neither terminated nor paid: it relied on a clause of the standard master agreement that makes each payment conditional on no [event of default](#def-fm-legal-documentation-eod) having occurred with respect to the other party. A year later, in September 2009, the bankruptcy court in New York ruled from the bench that “riding the market for the period of one year, while taking no action whatsoever” was contrary to the spirit of the Bankruptcy Code, that Metavante had waived its right to terminate by not exercising it promptly, and that it had to pay. In April 2012 the Court of Appeal in London read the same clause in the Lehman European administration and held that, under English law, a non-defaulting party’s payment obligation stays suspended for as long as the default continues. A few lines of a standard document decided who owed what to whom, and two courts read them differently.

## 18.1 The master agreement and why it exists

A firm trading over the counter signs one master agreement with each counterparty, and every trade between them becomes a confirmation under it. Book 2 introduced the ISDA master agreement and the repo market’s GMRA; Book 6 the close-out netting they make possible. The design point is that all the trades under one master form a single agreement, so that on a default they are terminated together and netted to one amount, rather than cherry-picked by an administrator who performs the profitable ones and disclaims the rest.

The agreement’s printed form is standard; the negotiation is in its schedule, which elects and amends the printed terms, and in the collateral annex. What a trading firm’s legal and treasury staff negotiate is a short list: which events let each side terminate, how much collateral moves and when, what collateral is eligible, and what happens on the first day something goes wrong ([Figure 18.1](#fig-fm-legal-documentation-stack)).

![The documents of an over-the-counter relationship: the master agreement and its schedule, the confirmations that become part of it, and the collateral annex; the prime-brokerage, clearing and give-up agreements sit beside it and may be linked by cross-default. Schematic.](https://one-course.com/images/onecourse/chapters/quant-16/fm-legal-documentation/fig-7e1810d4fd3f.svg)

***Figure 18.1.** The documents of an over-the-counter relationship: the master agreement and its schedule, the confirmations that become part of it, and the collateral annex; the prime-brokerage, clearing and give-up agreements sit beside it and may be linked by cross-default. Schematic.*

## 18.2 Events of default, termination events and close-out

**Definition 18.1 (Event of default, termination event).**

An *event of default* is an event attributable to one party, such as failure to pay or deliver, breach, insolvency or default under other agreements, that allows the other party to terminate all transactions under the master agreement. A *termination event* is an event that is no party’s fault, such as illegality or a change of tax law, and that allows termination of the affected transactions.

**Definition 18.2 (Additional termination event, NAV trigger, cross-default clause).**

An *additional termination event* is a [termination event](#def-fm-legal-documentation-eod) the parties add in the schedule. A *NAV trigger* is an additional [termination event](#def-fm-legal-documentation-eod) against a fund: a fall in its net asset value by more than agreed percentages over one, three or twelve months, or below a floor. A *cross-default clause* makes a party’s default under other agreements for borrowed money, above a threshold amount, an [event of default](#def-fm-legal-documentation-eod) under this one.

The master agreement’s section 2(a)(iii), as the Court of Appeal quoted it, makes each payment obligation subject to “the condition precedent that no Event of Default or Potential Event of Default with respect to the other party has occurred and is continuing”. The clause lets the non-defaulting party stop paying while it decides whether to terminate. How long it may wait is where the two courts of the hook diverged.

**Definition 18.3 (Flawed-asset clause).**

A *flawed-asset clause* makes a party’s right to receive a payment conditional on an event that its own default removes, so that the asset it holds (the right to be paid) is flawed from the start rather than taken away on insolvency; section 2(a)(iii) is the standard example.

The English court held that the underlying debt is undisturbed and only the payment obligation is suspended, that the suspension has no end date and continues until the default is cured, and that the clause does not offend the principle against depriving an insolvent estate of its assets. The US bankruptcy court, reading the Bankruptcy Code’s safe harbours as protecting the right to terminate and net rather than the right to wait, held that waiting a year had waived the right. A firm facing a defaulting counterparty in the money to the defaulter therefore has a decision to make, promptly, whose answer depends on the governing law and the forum.

**As of September 2026 — Stays on default rights and cleared-swap collateral.**

**US stay rules.** Under 12 CFR 252.83 and 252.84, the qualified financial contracts of covered US banking entities must provide that the transfer and stay provisions of the US special resolution regimes are effective as if the contracts were governed by US law, and may not permit the exercise of default rights related to an affiliate of the direct party entering insolvency proceedings. Counterparties of such banks accept these terms in their agreements or through industry protocols. **Cleared swaps.** Under 17 CFR 22.2, a futures commission merchant must treat its customers’ cleared swaps and their collateral as belonging to the customers and segregate the collateral.

## 18.3 Collateral annexes

The collateral annex turns the master agreement’s credit exposure into daily transfers. Book 6 defined its terms: the threshold below which no collateral is due, the minimum transfer amount below which no transfer is made, and the independent amount posted regardless of exposure. The annex adds a rounding convention, a list of eligible collateral and the haircut on each.

**Example 18.4 (A call under an annex).**

An annex has a threshold of $2 million, a minimum transfer amount of $0.5 million and a rounding of $0.1 million; the secured party holds $5 million of cash. At an exposure of $10.37 million the credit support amount is $10.37-2=8.37$ and the call is $8.37-5=3.37$, rounded up to $3.4 million. At $6.8 million the difference, a return of $0.2 million, is below the minimum transfer amount: nothing moves. Under dealer A’s annex of the tutorial, with an independent amount of $5 million and a 2% haircut on bonds, an exposure of $4.2 million against $3 million of cash and $5 million of bonds calls $4.2+5-3-4.9=\$1.3$ million.

```python
@dataclass(frozen=True)
class Annex:
    threshold: float = 0.0
    mta: float = 0.0
    rounding: float = 0.0
    independent_amount: float = 0.0
    haircuts: dict = field(default_factory=lambda: {"cash": 0.0})


def held_value(annex, collateral):
    """collateral: {asset: market value} held by the secured party."""
    return sum(v * (1 - annex.haircuts.get(a, 1.0)) for a, v in collateral.items())


def call(annex, exposure, collateral):
    """Positive: the secured party calls a delivery; negative: it must return collateral; 0 below the MTA."""
    need = max(exposure + annex.independent_amount - annex.threshold, 0.0) - held_value(annex, collateral)
    if abs(need) < annex.mta or need == 0:
        return 0.0
    if annex.rounding:
        r = annex.rounding
        need = math.ceil(need / r) * r if need > 0 else -math.floor(-need / r) * r
    return need

```

***Listing 18.1.** A collateral annex as data, and its daily call: threshold, independent amount, haircut value of collateral held, minimum transfer amount and rounding. code/firm/docterms/firm_docterms.py*

## 18.4 Prime-brokerage and clearing agreements

**Definition 18.5 (Prime-brokerage agreement).**

A *prime-brokerage agreement* sets the terms on which a prime broker holds, finances and lends securities to a client: margin (chapter 14’s [house margin](https://one-course.com/books/quant/16/en/chapter/14-treasury-and-funding#def-fm-treasury-and-funding-house) and any lock-up), the broker’s rights of rehypothecation (Book 1) over the client’s assets, its rights to close out positions and set off amounts on default, and the client’s events of default and [termination events](#def-fm-legal-documentation-eod), including [NAV triggers](#def-fm-legal-documentation-ate).

[Prime-brokerage agreements](#def-fm-legal-documentation-pba) are where [NAV triggers](#def-fm-legal-documentation-ate) matter most, because they sit beside the broker’s discretion over margin: a fund in a drawdown may trip a trigger at the moment its brokers raise margin, and a trip at one counterparty can become a default at others through cross-default. Clearing agreements with a futures commission merchant (Book 1) and give-up agreements between executing and clearing brokers complete the set; their terms are shorter because the clearing house’s rulebook carries most of the weight.

## 18.5 Tutorial: the trigger

**Goal.** Load a fund’s agreement terms, run a year of NAV and exposures, compute the daily collateral calls, find the first day each [NAV trigger](#def-fm-legal-documentation-ate) trips, and close out the first counterparty to terminate. **End state:** the NAV chart with the trips ([Figure 18.2](#fig-fm-legal-documentation-nav)) and the close-out table ([Table 18.1](#tab-fm-legal-documentation-closeout)).

1. **The fund.** NAV starts at $400 million; a quiet half-year, a three-month drawdown, a partial recovery ( `fm_docs.nav_path` , synthetic).
2. **The terms.** Two prime brokers and two dealers have [NAV triggers](#def-fm-legal-documentation-ate) over 21, 63 and 252 business days, one with a floor of $280 million; three dealers have collateral annexes ( `fm_docs.TRIGGERS` , `ANNEXES` ; illustrative terms).
3. **The monitor.** `firm.docterms.first_trip` finds each trigger’s first trip; `fm_docs.calls` runs the annexes daily.
4. **The close-out.** The first dealer to trip terminates: `firm.docterms.close_out` nets its swaps, the collateral it holds and a repo, with and without set-off.

![The fund’s NAV over the year and the first trip of each counterparty’s NAV trigger: dealer B (a 12% fall in 21 days) on day 137, prime broker 1 (15% in 21 days) on day 150, prime broker 2 (30% in 63 days) on day 177 and dealer A (the $280 million floor) on day 180 (labels B, PB1, PB2, A). Data: fm_docs.nav_path, fm_docs.trips.](https://one-course.com/images/onecourse/chapters/quant-16/fm-legal-documentation/fig-470274f305d7.svg)

***Figure 18.2.** The fund’s NAV over the year and the first trip of each counterparty’s [NAV trigger](#def-fm-legal-documentation-ate): dealer B (a 12% fall in 21 days) on day 137, prime broker 1 (15% in 21 days) on day 150, prime broker 2 (30% in 63 days) on day 177 and dealer A (the $280 million floor) on day 180 (labels B, PB1, PB2, A). Data: `fm_docs.nav_path`, `fm_docs.trips`.*

The fund peaks at $447.7 million on day 45 and falls to $247.7 million on day 204, 44.7% below the peak. The triggers trip in the order of their tightness, not of the fund’s troubles: dealer B’s 12% in a month trips on day 137 when the fund is still at $369.3 million, 12.4% below its level a month earlier; the prime brokers follow within six weeks; dealer A’s floor trips last, on day 180 at $275.2 million. Four counterparties can terminate within 43 business days, which is the risk the treasurer of chapter 14 must plan for: the terms of the documents decide when the funding stops.

![Collateral the fund has posted to two dealers against their exposure to it. Dealer A’s annex adds a $5 million independent amount, so it holds more than its exposure throughout; dealer B’s $2 million threshold means it holds less. Dealer C’s $10 million threshold is never reached. Data: fm_docs.calls.](https://one-course.com/images/onecourse/chapters/quant-16/fm-legal-documentation/fig-f9a4c6659fb9.svg)

***Figure 18.3.** Collateral the fund has posted to two dealers against their exposure to it. Dealer A’s annex adds a $5 million independent amount, so it holds more than its exposure throughout; dealer B’s $2 million threshold means it holds less. Dealer C’s $10 million threshold is never reached. Data: `fm_docs.calls`.*

Over the year the annexes move collateral on 87 days for dealer A (44 calls, 43 returns) and 39 for dealer B, and never for dealer C, whose $10 million threshold is above its largest exposure. Dealer B terminates on day 137.

| dealer B, day 137 | $ million |
| --- | --- |
| swaps: exposure at mid | 2.84 |
| swaps: replacement cost added by the dealer | 3.00 |
| less collateral the dealer holds | $-$1.20 |
| swaps balance, owed by the fund | 4.64 |
| repo: excess collateral the dealer holds, owed to the fund | $-$6.00 |
| net with set-off (owed to the fund) | $-$1.36 |
| without set-off | fund pays 4.64; claims 6.00 |

***Table 18.1.** Close-out of dealer B’s agreements with the fund on its trigger date. Data: `fm_docs.close_out_first`.*

With a set-off clause across the dealer’s agreements, the fund’s debt on the swaps and the dealer’s debt on the repo net to $1.36 million owed to the fund. Without one, the fund must pay $4.64 million under the swaps and pursue $6 million under the repo separately, which is the same money only if the dealer pays; the exposure to the dealer’s credit is the gross $6 million, not the net.

## 18.6 Exchange memberships and give-ups

Exchange membership (Book 1) is itself a contract: the rulebook binds the member, its traders and its systems, and the clearing agreement with a clearing member guarantees the member’s trades to the clearing house. A firm that executes through several brokers and clears through one signs give-up agreements (Book 2’s give-up lines) that let the executing brokers pass its trades to its clearer, within limits the clearer sets. The documents are shorter than a master agreement and change less, but the limits in them are operational: a give-up line that is full stops trading.

**Method 18.6 (Negotiating a fund’s documents).**

1. List every agreement and, for each, its events of default, [termination events](#def-fm-legal-documentation-eod) and triggers, with their thresholds and cure periods.
2. Simulate the fund’s NAV in a bad year and find the order in which triggers trip; widen the tightest.
3. Align thresholds, minimum transfer amounts and eligible collateral with treasury’s forecast (chapter 14).
4. Negotiate set-off across agreements with the same counterparty group, and cross-default thresholds high enough not to cascade.
5. Keep the terms as data, and monitor them daily.

## 18.7 Build: agreement terms as data

**Purpose.** No honest build: the subject is legal documentation. The analytical tool keeps agreement terms as data and computes what they imply day by day.

**Interface.** `firm.docterms`: `Annex`, `held_value`, `call`; `Trigger`, `first_trip`; `close_out`.

**Rules.** Ineligible collateral counts for nothing; no transfer below the minimum transfer amount; calls round up and returns round down; triggers compare each day’s NAV with the NAV a window earlier and with the floor.

**Acceptance tests.** `code/firm/docterms/tests/`: annex calls on hand numbers; trigger trips by fall and by floor; close-out with and without set-off.

**Stretch.** Cure periods and notice periods; triggers on the NAV at month ends; a cross-default cascade across the fund’s counterparties.

Sources and further reading

- Lomas v JFB Firth Rixson Inc [2012] EWCA Civ 419.
- Davis Polk, “Lehman Bankruptcy Court Rules …”, client memorandum, 29 September 2009, on In re Lehman Brothers Holdings Inc. (Metavante).
- 12 CFR 252.83 and 252.84; 17 CFR 22.2.

## 18.8 Exercises

**Exercise 18.1 ★.**

Under the annex of [Example 18.4](#ex-fm-legal-documentation-call), what moves at exposures of $2.3 million and $10.37 million with no collateral held?

**Solution of Exercise 18.1.**

At $2.3 million the credit support amount is $0.3 million, below the minimum transfer amount: nothing. At $10.37 million it is $8.37 million, rounded up to a call of $8.4 million.

**Exercise 18.2 ★.**

What is the difference between an [event of default](#def-fm-legal-documentation-eod) and a [termination event](#def-fm-legal-documentation-eod)? Which is a [NAV trigger](#def-fm-legal-documentation-ate)?

**Solution of Exercise 18.2.**

An [event of default](#def-fm-legal-documentation-eod) is attributable to one party and allows termination of all transactions; a [termination event](#def-fm-legal-documentation-eod) is no one’s fault and affects the transactions it concerns. A [NAV trigger](#def-fm-legal-documentation-ate) is an [additional termination event](#def-fm-legal-documentation-ate).

**Exercise 18.3 ★.**

On which days do the tutorial’s four triggers trip, and which trips first?

**Solution of Exercise 18.3.**

Dealer B on day 137, prime broker 1 on day 150, prime broker 2 on day 177 and dealer A on day 180; dealer B first.

**Exercise 18.4 ★★.**

Why did Metavante neither pay nor terminate, and what did the New York court decide?

**Solution of Exercise 18.4.**

The swap was in its counterparty’s favour: terminating would have crystallised a payment, and withholding under section 2(a)(iii) deferred it. The court held that the safe harbours protect termination and netting, not waiting; that a year of riding the market was unacceptable; that Metavante had waived its right to terminate; and that it must perform.

**Exercise 18.5 ★★.**

What did the English Court of Appeal decide about section 2(a)(iii), and how does it differ from the New York ruling?

**Solution of Exercise 18.5.**

That the payment obligation is suspended, not extinguished, for as long as the [event of default](#def-fm-legal-documentation-eod) continues, with no time limit, and that the clause does not offend the anti-deprivation principle. Under the New York ruling, a non-defaulting party that waits too long loses the right to terminate and must pay.

**Exercise 18.6 ★★.**

Why does dealer A hold more collateral than its exposure, and dealer C none?

**Solution of Exercise 18.6.**

Dealer A’s annex adds a $5 million independent amount to the exposure; dealer C’s $10 million threshold is above its largest exposure, $0.02 million.

**Exercise 18.7 ★★★.**

*Coding.* Tighten prime broker 2’s 63-day trigger from 30% to 20% and rerun `fm_docs.trips`. Which trips first now?

**Solution of Exercise 18.7.**

Prime broker 2 now trips on day 151 on a 20% fall over 63 days, but dealer B’s trigger still trips first, on day 137.

**Exercise 18.8 ★★★.**

*Find the flaw.* “Our [NAV triggers](#def-fm-legal-documentation-ate) are generous: none trips unless we lose 30%.”

**Solution of Exercise 18.8.**

Triggers are measured over windows: a 12% fall in a month tripped dealer B’s while the fund was 17.5% below its peak, and the tightest trigger, not the average, decides when the first counterparty may terminate; cross-default can then spread it.

## 18.9 Problem: The Trigger

**Problem 18.1.**

Weekend problem — the trigger

A fund’s general counsel must review its agreements with two prime brokers and three dealers before a volatile year.

**Part I — The documents.**

1. Why is a master agreement a single agreement, and what does that give a non-defaulting party?
2. Define an [event of default](#def-fm-legal-documentation-eod) , a [termination event](#def-fm-legal-documentation-eod) , an [additional termination event](#def-fm-legal-documentation-ate) and a [NAV trigger](#def-fm-legal-documentation-ate) .
3. Define a [cross-default clause](#def-fm-legal-documentation-ate) and a [flawed-asset clause](#def-fm-legal-documentation-flawed) .
4. What does section 2(a)(iii) say, as the Court of Appeal quoted it?

**Part II — The cases.**

5. Summarise Metavante and its outcome.
6. Summarise Lomas and its holding on the suspension.
7. What should a non-defaulting party decide, and how fast, after a counterparty’s default?
8. What do the US stay rules change for counterparties of large US banks?

**Part III — The year.**

9. Give the NAV’s peak, trough and drawdown.
10. Give each trigger’s first trip and its reason.
11. Give the collateral moves under each annex, and explain dealer C.
12. Compute the call of [Example 18.4](#ex-fm-legal-documentation-call) .
13. Give dealer B’s close-out with and without set-off.

**Part IV — The review.**

14. Define a [prime-brokerage agreement](#def-fm-legal-documentation-pba) and name the terms that interact with chapter 14’s margin.
15. Which triggers would you renegotiate first, and why?
16. What does cross-default do to the order of trips?
17. Why does set-off matter more when the counterparty is weak?
18. What do give-up agreements add to the picture?
19. State the *named result* : the first day a declining NAV trips an [additional termination event](#def-fm-legal-documentation-ate) under each counterparty’s terms, and the close-out amount after set-off.
20. In two sentences, write the review’s recommendation.

**Solution of Problem 18.1.**

1. All confirmations form one agreement, so on default every transaction is terminated and netted to a single amount, which prevents cherry-picking.
2. See Definitions [18.1](#def-fm-legal-documentation-eod) and [18.2](#def-fm-legal-documentation-ate) .
3. See Definitions [18.2](#def-fm-legal-documentation-ate) and [18.3](#def-fm-legal-documentation-flawed) .
4. Each payment is subject to the condition precedent that no [event of default](#def-fm-legal-documentation-eod) or potential [event of default](#def-fm-legal-documentation-eod) with respect to the other party has occurred and is continuing.
5. See [Exercise 18.4](#exo-fm-legal-documentation-4) .
6. See [Exercise 18.5](#exo-fm-legal-documentation-5) .
7. Whether to terminate, and on what date; promptly where US bankruptcy law applies.
8. Their qualified financial contracts must accept US resolution transfers and stays, and may not allow default rights triggered by an affiliate’s insolvency.
9. $447.7 million on day 45, $247.7 million on day 204, 44.7%.
10. Dealer B day 137 (12% in 21 days), prime broker 1 day 150 (15% in 21 days), prime broker 2 day 177 (30% in 63 days), dealer A day 180 (floor of $280 million).
11. Dealer A 44 calls and 43 returns, dealer B 19 and 20, dealer C none: its threshold exceeds its exposure.
12. $3.4 million.
13. See [Table 18.1](#tab-fm-legal-documentation-closeout) : $1.36 million owed to the fund with set-off; without, the fund pays $4.64 million and claims $6 million.
14. See [Definition 18.5](#def-fm-legal-documentation-pba) ; margin terms and lock-up, rehypothecation, set-off and the [NAV triggers](#def-fm-legal-documentation-ate) .
15. Dealer B’s 12% monthly trigger, the tightest; then the prime brokers’, since their trips stop financing.
16. A trip that is an [event of default](#def-fm-legal-documentation-eod) at one counterparty can become one at others, so the first trip can terminate all of them.
17. Without it the firm pays what it owes in full and recovers what it is owed only as far as the counterparty pays.
18. Limits on the trades executing brokers may give up to the clearer; a full line stops trading.
19. Days 137, 150, 177 and 180 for dealer B, prime broker 1, prime broker 2 and dealer A; $1.36 million owed to the fund after set-off with dealer B.
20. Widen the tightest monthly triggers, add set-off across each counterparty group, and keep every term as data monitored daily; plan treasury for the case where four counterparties may terminate within two months.

## 18.10 Interview questions

**Interview question 18.1 ★ trader.**

What is a minimum transfer amount, and why does an annex have one?

**Solution of Interview question 18.1.**

The smallest amount that is transferred; it avoids daily transfers of trivial amounts, at the cost of an uncollateralised gap up to that size.

*What the interviewer is looking for: operational cost against exposure.*

**Interview question 18.2 ★ risk.**

What is a [NAV trigger](#def-fm-legal-documentation-ate), and why do counterparties ask funds for one?

**Solution of Interview question 18.2.**

An [additional termination event](#def-fm-legal-documentation-ate) on a fall in the fund’s NAV; it lets the counterparty exit before a shrinking fund cannot pay.

*What the interviewer is looking for: early exit from a deteriorating credit.*

**Interview question 18.3 ★★ developer.**

Implement a collateral call with a threshold, an independent amount, haircuts, a minimum transfer amount and rounding. What are the edge cases?

**Solution of Interview question 18.3.**

Credit support amount $\max(E+IA-\text{threshold},0)$ less the haircut value held; zero below the MTA; round calls up and returns down. Edge cases: ineligible collateral, exposure changing sign, a return that crosses the MTA only after rounding.

*What the interviewer is looking for: the order of operations and the sign conventions.*

**Interview question 18.4 ★★ risk.**

Your counterparty has defaulted and you owe it money on the swaps. What are your options?

**Solution of Interview question 18.4.**

Terminate and close out with netting and set-off, or suspend payments under section 2(a)(iii) where the governing law allows; in a US bankruptcy, decide promptly.

*What the interviewer is looking for: the Metavante and Lomas contrast.*

**Interview question 18.5 ★★ trader, risk.**

Why does close-out netting matter for the capital a bank holds against a counterparty?

**Solution of Interview question 18.5.**

With enforceable netting the exposure is the net of all trades under the agreement, not the sum of the positive ones, which lowers the exposure and the capital.

*What the interviewer is looking for: net against gross exposure.*

**Interview question 18.6 ★★★ risk, researcher.**

How would you estimate the probability that a fund trips at least one [NAV trigger](#def-fm-legal-documentation-ate) in the next year?

**Solution of Interview question 18.6.**

Simulate NAV paths from the fund’s return distribution, including fat tails and volatility clustering, and count the paths on which any window’s fall exceeds any trigger; include the effect of trips on funding.

*What the interviewer is looking for: path dependence and the tightest trigger.*
