---
title: "Treasury and Funding"
book: "The Desk and the Firm"
subject: quant
language: en
chapter: 14
exercises: 8
source: https://one-course.com/books/quant/16/en/chapter/14-treasury-and-funding
---

# Chapter 14 — Treasury and Funding

In March 2020 initial margin requirements at the world’s clearing houses rose by roughly $300 billion in a month, and the variation margin called in both cleared and bilateral markets was far larger than in February. Every firm with cleared or margined positions had to find the cash the morning each call came, from wherever its treasury had left it: at a broker that would release it, in a money market fund that could be sold that day, or in a credit line that the bank would honour. A firm that had kept its cash where it could not reach it learned its [survival horizon](#def-fm-treasury-and-funding-horizon) the hard way.

## 14.1 What treasury does in a trading firm

A trading firm’s treasury holds and moves its cash and collateral. It keeps enough at each prime broker, clearing broker and clearing house to meet their requirements; it finances long positions and borrows securities for short ones at the lowest cost; it forecasts what the next days will demand; and it keeps a reserve for the days when the forecast is wrong. It is the function whose failure is fastest: a firm with good positions and no cash for a margin call is in default by the evening.

**Definition 14.1 (Unencumbered cash, liquidity buffer).**

*Unencumbered cash* is cash, and assets convertible to cash the same day, that the firm holds free of any pledge, margin requirement or restriction and can use at once. A *liquidity buffer* is the part of it held against stressed outflows (margin calls, collateral returns, redemptions, loss of financing) over a defined horizon, and not used to fund positions.

![A trading firm’s treasury: the accounts that hold its collateral and call or release margin daily, and the sources it can turn into cash the same day. Each arrow has its own terms, cut-off times and notice periods. Schematic.](https://one-course.com/images/onecourse/chapters/quant-16/fm-treasury-and-funding/fig-b385a463298b.svg)

***Figure 14.1.** A trading firm’s treasury: the accounts that hold its collateral and call or release margin daily, and the sources it can turn into cash the same day. Each arrow has its own terms, cut-off times and notice periods. Schematic.*

The bank version of the idea is Book 6’s liquidity coverage ratio, and the internal price of using the balance sheet is its funds-transfer pricing. A proprietary firm or a fund has no regulatory ratio to meet in most places; it has its brokers’ terms, its own positions and the market’s moves.

## 14.2 Prime-broker relationships and margin terms

A prime broker (Book 1) finances the firm’s longs, lends it the securities it shorts, holds its positions and collateral, and sets the margin it requires on them. The regulatory minimum for US customer accounts is only the floor ([Box 14.1](#dat-fm-treasury-and-funding-rules)); what binds a professional client is the broker’s own rule.

**Definition 14.2 (House margin).**

*House margin* is the margin a broker requires of a client under its own rules, above any regulatory or clearing-house minimum: typically a rate on gross exposure, a rate on the net, add-ons for concentration, liquidity and correlation, and a methodology the broker may change at its discretion unless the agreement says otherwise.

**Definition 14.3 (Margin lock-up).**

A *margin lock-up* is a broker’s contractual commitment not to change its margin terms (rates, methodology, eligible collateral) or withdraw its financing for a client without a notice period, commonly thirty to ninety days, except on defined events such as a large fall in the client’s net asset value.

**As of September 2026 — Regulatory margin floors for US customer accounts.**

Regulation T (12 CFR 220.12) sets the initial margin on a margin equity security at 50% of its current market value, and on a short sale of a non-exempt security at 150% of its value. FINRA Rule 4210 sets a maintenance margin of 25% of the current market value of long margin securities, and lets member firms apply risk-based portfolio margin instead of the strategy-based rules. Brokers’ [house margins](#def-fm-treasury-and-funding-house) sit above these floors; offshore and institutional arrangements are set by contract.

Three brokers with different rules price the same book very differently. The chapter’s book is long $390 million and short $330 million in ten equity positions, hedged with a $60 million short index future at a clearing broker (illustrative). Broker A charges 4% of gross plus 25% of the absolute net, with a 15% add-on on any position above $60 million; broker B charges a flat 10% of gross; broker C charges 5% of gross plus 15% of net, with a 30% add-on above $40 million. A single $120 million long costs $43.8 million of margin at A, $12.0 million at B and $48.0 million at C: A and C reward a balanced book and punish concentration, B charges for size alone.

```python
@dataclass(frozen=True)
class Broker:
    name: str
    gross: float            # margin per unit of gross exposure
    net: float              # margin per unit of absolute net exposure
    conc_cap: float         # position size above which the add-on applies
    conc_rate: float        # add-on per unit above the cap
    fin_long_bp: float      # financing spread on longs, bp a year
    fin_short_bp: float     # borrow and financing fee on shorts, bp a year


def margin(b, pos):
    pos = np.asarray(pos, float)
    conc = np.maximum(np.abs(pos) - b.conc_cap, 0.0).sum()
    return float(b.gross * np.abs(pos).sum() + b.net * abs(pos.sum()) + b.conc_rate * conc)


def financing(b, pos):
    pos = np.asarray(pos, float)
    return float((b.fin_long_bp * pos[pos > 0].sum() - b.fin_short_bp * pos[pos < 0].sum()) * 1e-4)

```

***Listing 14.1.** House-margin rules as data: gross, net and concentration terms, and the financing spreads on longs and shorts. code/firm/treasury/firm_treasury.py*

## 14.3 Margin optimisation

**Definition 14.4 (Margin optimisation).**

*Margin optimisation* is the choice of where to hold each position, and how to pair positions within each account, so that the total margin and financing cost across a firm’s brokers and clearing houses is least for the same book.

**Proposition 14.5 (Optimising never costs more than one broker).**

If each broker’s margin is a sum of rates times gross exposure, absolute net exposure and excesses of positions over caps, and financing is linear in the positions, the annual cost is a convex, piecewise-linear function of the fractions $x_{ib}\ge0$ of each position $i$ held at broker $b$, $\sum_bx_{ib}=1$. Its minimum is the solution of a linear programme, and it is no larger than the cost of holding the whole book at any single broker.

**Proof.** Gross exposure is linear in $x$; the absolute value of a linear function and the positive part of an affine one are convex; sums of convex functions with non-negative weights are convex. Replacing each absolute value by a variable $t_b\ge\pm\sum_ip_ix_{ib}$ and each positive part by $u_{ib}\ge|p_i|x_{ib}-\text{cap}_b$, $u_{ib}\ge0$, gives a linear programme with the same minimum. Holding everything at one broker is a feasible point, so the minimum is no larger than its cost. ∎

| allocation | margin A | margin B | margin C | total margin | annual cost |
| --- | --- | --- | --- | --- | --- |
| all at A | 71.55 | – | – | 71.55 | 6.88 |
| all at B | – | 72.00 | – | 72.00 | 5.99 |
| all at C | – | – | 144.00 | 144.00 | 10.92 |
| pro rata | 14.60 | 24.00 | 15.00 | 53.60 | 5.82 |
| optimised | 20.40 | 6.00 | 7.50 | 33.90 | 4.98 |

***Table 14.1.** [House margin](#def-fm-treasury-and-funding-house) and annual cost (margin at a 5% cost of cash plus financing) of the chapter’s book under five allocations across three prime brokers, $ million. Data: `fm_treasury.summary`.*

The optimiser holds each broker’s slice balanced, so that broker A’s net charge and C’s concentration add-ons almost vanish, and sends B only what its flat gross rate prices cheaply ([Table 14.1](#tab-fm-treasury-and-funding-alloc), [Figure 14.2](#fig-fm-treasury-and-funding-margins)). Margin falls from $72.0 million at the cheapest single broker to $33.9 million, 53% less, and the annual cost from $5.99 million to $4.98 million. Splitting the book equally goes about half the way, to $53.6 million.

![House margin on the same book under five allocations across three prime brokers. The linear programme of keeps each broker’s slice balanced and cuts margin by 53% against the cheapest single broker. Data: fm_treasury.summary.](https://one-course.com/images/onecourse/chapters/quant-16/fm-treasury-and-funding/fig-0d55f1e43554.svg)

***Figure 14.2.** [House margin](#def-fm-treasury-and-funding-house) on the same book under five allocations across three prime brokers. The linear programme of [Proposition 14.5](#prop-fm-treasury-and-funding-lp) keeps each broker’s slice balanced and cuts margin by 53% against the cheapest single broker. Data: `fm_treasury.summary`.*

**Remark 14.6 (What the optimiser does not see).**

Brokers price relationships, not slices: a broker that sees only the balanced remainder of a book may reprice it, and one that holds little of it has little reason to support the firm in stress. Moving positions between brokers costs money and time, and in stress may not be possible. The optimiser gives the cheapest allocation for today’s terms; the treasurer chooses one that remains acceptable when the terms change.

## 14.4 Forecasting cash and collateral

A cash forecast follows each account through the days ahead. Each account holds collateral; each day it gains or loses the P&L of the positions it holds and faces a requirement; a shortfall is a call paid from [unencumbered cash](#def-fm-treasury-and-funding-cash) the same day, and an excess is returned to cash if the broker releases it ([Listing 14.2](#lst-fm-treasury-and-funding-forecast)). The clearing broker’s requirement on the future comes from firm.initmargin’s filtered historical simulation (Book 6), and the prime brokers’ from their house rules times a multiplier they may raise in stress.

```python
def forecast(cash0, equity0, pnl, req, retained, daily_cost=0.0):
    """cash0: unencumbered cash; equity0[b]; pnl[t, b] and req[t, b] per day and account; retained[b] True if the
    broker keeps the account's excess. Returns (cash path, calls path, retained excess path)."""
    e = np.array(equity0, float)
    pnl, req = np.asarray(pnl, float), np.asarray(req, float)
    cash, calls, stuck = [], [], []
    c = float(cash0)
    for t in range(pnl.shape[0]):
        e += pnl[t]
        short = np.maximum(req[t] - e, 0.0)
        excess = np.maximum(e - req[t], 0.0)
        free = np.where(retained, 0.0, excess)
        c += free.sum() - short.sum() - daily_cost
        e += short - free
        cash.append(c)
        calls.append(short.sum())
        stuck.append(float(np.where(retained, excess, 0.0).sum()))
    return np.array(cash), np.array(calls), np.array(stuck)


def survival_horizon(cash):
    """Days until unencumbered cash first goes negative (len(cash) + 1 if it never does)."""
    neg = np.nonzero(np.asarray(cash) < 0)[0]
    return int(neg[0]) + 1 if len(neg) else len(cash) + 1
```

***Listing 14.2.** The cash forecast: each account’s P&L, requirement, call or release each day, and the survival horizon. code/firm/treasury/firm_treasury.py*

**Definition 14.7 (Survival horizon).**

The *survival horizon* of a firm under a scenario is the number of days until its [unencumbered cash](#def-fm-treasury-and-funding-cash), after meeting every margin call and contractual outflow the scenario generates, first falls below zero, with no new funding.

## 14.5 Tutorial: three brokers and a bad week

**Goal.** Allocate the book across three brokers, then forecast thirty days of cash under a base case and a stressed week, with and without a [margin lock-up](#def-fm-treasury-and-funding-lockup). **End state:** [Table 14.1](#tab-fm-treasury-and-funding-alloc) and the runway chart ([Figure 14.3](#fig-fm-treasury-and-funding-runway)).

1. **The allocation.** `fm_treasury.allocations()` builds the five allocations; `firm.treasury.optimise` solves the linear programme with scipy’s HiGHS solver.
2. **The accounts.** Each prime-broker account starts with its margin plus a 10% cushion; the firm has $40 million of [unencumbered cash](#def-fm-treasury-and-funding-cash) .
3. **The stress.** For five days the longs fall 2% a day, the shorts 1% and the index 2%; then five flat days and a slow recovery. The brokers raise their [house margin](#def-fm-treasury-and-funding-house) by a fifth a day, to double by day 5, hold it to day 15, then ease to one and a half times.
4. **The runway.** `fm_treasury.run(stress, notice)` forecasts the cash with a lock-up of `notice` days (0 for none).

![Thirty days of unencumbered cash. Without a lock-up the optimised book runs out of cash on day 5, and the same book at a single broker on day 3; with a thirty-day lock-up it keeps $26.7 million at the worst. Data: fm_treasury.run.](https://one-course.com/images/onecourse/chapters/quant-16/fm-treasury-and-funding/fig-450c3027bbda.svg)

***Figure 14.3.** Thirty days of [unencumbered cash](#def-fm-treasury-and-funding-cash). Without a lock-up the optimised book runs out of cash on day 5, and the same book at a single broker on day 3; with a thirty-day lock-up it keeps $26.7 million at the worst. Data: `fm_treasury.run`.*

The stressed week costs the book $15.5 million of P&L; the brokers’ margin increases cost more. Without a lock-up the total requirement rises from $43.0 million on day 1 to $71.8 million on day 5 ([Figure 14.4](#fig-fm-treasury-and-funding-req)), the firm pays $57.9 million of calls over the month, and its $40 million runs out on day 5: it needed a buffer $8.1 million larger. The same book at broker B alone runs out on day 3 and needed $29.8 million more. With a thirty-day lock-up the requirement stays near $37 million, the calls total $23.0 million, and the firm ends the worst day with $26.7 million. A lock-up shorter than the stress only postpones the day: five days of notice move it to day 6, ten days to day 11. The clearing broker’s margin on the future hardly moves, from $2.02 million to $2.13 million, because its model responds to volatility with a lag; the large term is the brokers’ discretion.

![The total margin requirement across the four accounts in the stressed month. The gap between the lines is the brokers’ increase in house margin, which a lock-up defers. Data: fm_treasury.paths.](https://one-course.com/images/onecourse/chapters/quant-16/fm-treasury-and-funding/fig-6272a498e3f5.svg)

***Figure 14.4.** The total margin requirement across the four accounts in the stressed month. The gap between the lines is the brokers’ increase in [house margin](#def-fm-treasury-and-funding-house), which a lock-up defers. Data: `fm_treasury.paths`.*

## 14.6 Funding in stress

Stress turns every lever of the forecast at once: positions lose money, requirements rise, brokers stop releasing excess, and funding sources that were cheap become unavailable. The margin spiral of Book 3 is the market-wide version: forced sales to meet calls move prices, which raise calls elsewhere. The firm’s defences are the buffer, the terms and the diversity of its funding.

Diversity has three parts. Several brokers, so that one broker’s decision moves only part of the requirement; several sources of cash, so that a money market fund that gates or a bank that declines to lend is not the only route; and assets whose value does not fall with the book’s, since the collateral the firm posts in stress is worth what it will fetch that day. A committed credit line is the most expensive of the three in calm markets, since the firm pays a fee on money it does not use, and the one whose value is highest on the day a call arrives that nothing else can meet ([Figure 14.1](#fig-fm-treasury-and-funding-map)).

**As of September 2026 — International guidance on margin preparedness.**

After the March 2020 episode, the BCBS, CPMI and IOSCO reviewed margining practices (final report, September 2022), and the Financial Stability Board published eight recommendations for non-bank market participants on liquidity preparedness for margin and collateral calls (final report, 10 December 2024): include the liquidity risk of margin and collateral calls in their risk management and governance, with contingency funding plans; stress test their liquidity for such calls under extreme but plausible scenarios; and hold sufficient cash and readily available, diverse liquid assets, with appropriate collateral arrangements and regular contact with their counterparties.

**Method 14.8 (Setting the liquidity buffer).**

1. Map every account: what it holds, its requirement rule, whether excess is released, and the notice before its terms can change.
2. Build stress scenarios that move P&L and requirements together, including brokers’ discretionary increases and a counterparty that stops releasing excess.
3. Forecast cash daily over the horizon of the longest notice period; the buffer is the largest cumulative shortfall.
4. Negotiate lock-ups for the terms that move most in the scenarios, and spread financing so that no single broker’s decision exhausts the buffer.
5. Report the [survival horizon](#def-fm-treasury-and-funding-horizon) under each scenario to the [risk committee](https://one-course.com/books/quant/16/en/chapter/12-the-risk-management-function#def-fm-the-risk-management-function-cro) monthly and after every material change in terms or positions.

Book 1 tells how a family office’s margin terms at several banks, and the banks’ different reactions when its positions fell, turned into large losses for some of them. For the borrower the lesson is this chapter’s: the terms that matter are the ones that can change in a week.

## 14.7 Build: the treasury engine

**Purpose.** [House margin](#def-fm-treasury-and-funding-house) as data, the allocation of a book across brokers, and the daily cash and collateral forecast with its [survival horizon](#def-fm-treasury-and-funding-horizon).

**Interface.** `firm.treasury`: `Broker`, `margin`, `financing`, `annual_cost`, `optimise`; `fcm_margin` (on `firm.initmargin`), `house_path`, `forecast`, `survival_horizon`, `buffer_needed`.

**Rules.** Allocations are fractions that sum to one per position; the optimiser’s cost never exceeds any single broker’s; a call is paid the day it arises; a lock-up holds the house multiplier at one for its notice period.

**Acceptance tests.** `code/firm/treasury/tests/`: margin and financing on hand numbers; the optimiser against every single broker; a three-day forecast with a retained excess; the clearing margin’s scaling.

**Stretch.** Collateral eligibility and haircuts; a revolving credit line with a commitment fee; the stress generated by firm.margin’s scenario engine for the clearing broker.

Sources and further reading

- BCBS, CPMI and IOSCO, *Review of margining practices* , September 2022, and press release of 29 September 2022.
- Financial Stability Board, *Liquidity Preparedness for Margin and Collateral Calls: Final report* , 10 December 2024.
- 12 CFR 220.12; FINRA Rule 4210.

## 14.8 Exercises

**Exercise 14.1 ★.**

Compute the [house margin](#def-fm-treasury-and-funding-house) of a single $120 million long at each of the chapter’s three brokers.

**Solution of Exercise 14.1.**

A: $0.04\times120+0.25\times120+0.15\times60=43.8$; B: $0.10\times120=12.0$; C: $0.05\times120+0.15\times120+0.30\times80=48.0$ ($ million).

**Exercise 14.2 ★.**

What is the Regulation T initial margin on a $10 million long in a margin equity security, and on a $10 million short sale?

**Solution of Exercise 14.2.**

$5 million (50%) on the long; 150% of the short’s value, $15 million, including the $10 million proceeds of the sale.

**Exercise 14.3 ★.**

The book’s margin falls from $72.0 million to $33.9 million. At a 5% cost of cash, what is that worth a year before financing?

**Solution of Exercise 14.3.**

$38.1\times5\%=\$1.91$ million a year.

**Exercise 14.4 ★★.**

Show that holding the whole book at one broker is a feasible point of the linear programme, and explain why the optimised cost cannot exceed it.

**Solution of Exercise 14.4.**

Setting $x_{ib}=1$ for one broker and 0 elsewhere satisfies $\sum_bx_{ib}=1$ and the bounds, with the auxiliary variables at their smallest feasible values; the programme minimises over a set containing that point, so its minimum cannot exceed that point’s cost.

**Exercise 14.5 ★★.**

Why does broker B’s rule make it the cheapest single broker for this book, although its margin is not the lowest?

**Solution of Exercise 14.5.**

Its margin, $72.0 million, is almost A’s $71.55 million, but its financing spreads are the lowest: $2.39 million a year against A’s $3.30 million.

**Exercise 14.6 ★★.**

A lock-up of ten days is offered against one of thirty. On the chapter’s stress, what does each buy?

**Solution of Exercise 14.6.**

Ten days postpone the day the cash runs out from day 5 to day 11, just beyond the brokers’ increases in the scenario’s first week, but the increases then arrive; thirty days cover the whole stress and the firm never runs out.

**Exercise 14.7 ★★★.**

*Coding.* Rerun the stress with starting cash of $50 and $60 million, for the optimised book and for the book at broker B. When does each run out?

**Solution of Exercise 14.7.**

With $50 or $60 million the optimised book lasts the month; the book at broker B runs out on day 4 with $50 million and on day 5 with $60 million.

**Exercise 14.8 ★★★.**

*Find the flaw.* “We moved everything to the broker with the lowest margin; that frees cash, so our liquidity is better.”

**Solution of Exercise 14.8.**

Lower margin today is not more liquidity in stress: a single broker can raise its [house margin](#def-fm-treasury-and-funding-house) at will, and with no second broker and no lock-up the whole book’s requirement moves at once. In the chapter the book at one broker runs out two days earlier than the diversified book and needs $29.8 million more of buffer.

## 14.9 Problem: Three Brokers and a Bad Week

**Problem 14.1.**

Weekend problem — three brokers and a bad week

A new treasurer must decide where the firm holds its book and how much cash it keeps free.

**Part I — The function.**

1. Define [unencumbered cash](#def-fm-treasury-and-funding-cash) and a [liquidity buffer](#def-fm-treasury-and-funding-cash) .
2. What happened to margin in March 2020?
3. Define [house margin](#def-fm-treasury-and-funding-house) and a [margin lock-up](#def-fm-treasury-and-funding-lockup) .
4. State the US regulatory floors for customer margin.

**Part II — The allocation.**

5. Define [margin optimisation](#def-fm-treasury-and-funding-optim) .
6. State and prove [Proposition 14.5](#prop-fm-treasury-and-funding-lp) .
7. Give the margin and annual cost of the five allocations.
8. How does the optimiser use each broker’s rule?
9. What does the optimiser not see?

**Part III — The forecast.**

10. Define the [survival horizon](#def-fm-treasury-and-funding-horizon) .
11. Describe the stress scenario and the P&L it causes.
12. Give the total requirement on days 1 and 5, with and without lock-up, and the clearing broker’s margin.
13. Give the [survival horizons](#def-fm-treasury-and-funding-horizon) and the buffers needed, for the optimised book and for the book at one broker.
14. What does a lock-up shorter than the stress buy?

**Part IV — The decision.**

15. What do the international recommendations of 2024 ask of non-bank firms?
16. How would you set the buffer?
17. Which is worth more on this stress: the optimisation or the lock-up?
18. What would you change in the brokers’ agreements?
19. State the *named result* : the margin saved by optimising across three brokers against using one, and the [survival horizon](#def-fm-treasury-and-funding-horizon) in the stress week with and without [margin lock-up](#def-fm-treasury-and-funding-lockup) .
20. In two sentences, write the treasury policy.

**Solution of Problem 14.1.**

1. See [Definition 14.1](#def-fm-treasury-and-funding-cash) .
2. Initial margin at clearing houses rose by roughly $300 billion over the month, and variation margin calls were far above February’s.
3. See Definitions [14.2](#def-fm-treasury-and-funding-house) and [14.3](#def-fm-treasury-and-funding-lockup) .
4. Regulation T: 50% initial margin on margin equity securities, 150% on short sales; FINRA 4210: 25% maintenance on longs, or portfolio margin.
5. See [Definition 14.4](#def-fm-treasury-and-funding-optim) .
6. See [Proposition 14.5](#prop-fm-treasury-and-funding-lp) .
7. See [Table 14.1](#tab-fm-treasury-and-funding-alloc) : from $33.9 million and $4.98 million a year optimised to $144.0 million and $10.92 million all at C.
8. It balances each broker’s slice to avoid A’s net charge and C’s add-ons, and sends B the positions its flat gross rate prices cheaply.
9. Relationships, repricing, the cost of moving, and the value of a broker that supports the firm in stress.
10. See [Definition 14.7](#def-fm-treasury-and-funding-horizon) .
11. Five days of longs $-2\%$ , shorts $-1\%$ , index $-2\%$ ; brokers double [house margin](#def-fm-treasury-and-funding-house) by day 5. The week loses $15.5 million.
12. $43.0 and $71.8 million without lock-up; about $36 and $37 million with; the clearing broker’s margin $2.02 and $2.13 million.
13. Optimised: day 5, buffer $8.1 million more; one broker: day 3, $29.8 million more; with a thirty-day lock-up, no shortfall.
14. It postpones the shortfall to the end of the notice period (day 6 for five days, day 11 for ten).
15. See [Box 14.2](#dat-fm-treasury-and-funding-fsb) .
16. By [Method 14.8](#met-fm-treasury-and-funding-buffer) : the largest cumulative shortfall over the stress scenarios, over the longest notice period.
17. The lock-up: the optimisation saves $1 million a year and shortens nothing; without a lock-up the optimised book still runs out on day 5.
18. Lock-ups of at least the length of the stress for the house terms that move most; release of excess on demand; notice before any change of eligible collateral.
19. $38.1 million (53%) of margin saved against the cheapest single broker; without a lock-up the cash lasts to day 5 (day 3 at one broker), with a thirty-day lock-up the whole month.
20. Hold the book across several brokers at the least cost that remains acceptable when terms change, with lock-ups covering the stress horizon; keep a buffer equal to the largest shortfall of the stress forecast, reported monthly with the [survival horizon](#def-fm-treasury-and-funding-horizon) .

## 14.10 Interview questions

**Interview question 14.1 ★ trader.**

What is [house margin](#def-fm-treasury-and-funding-house), and why is it usually above the regulatory minimum?

**Solution of Interview question 14.1.**

The margin a broker requires under its own rules; it prices the broker’s risk on the client (concentration, liquidity, the client’s credit) beyond what the regulatory floor assumes.

*What the interviewer is looking for: the broker’s own risk and discretion.*

**Interview question 14.2 ★ risk.**

What is a [survival horizon](#def-fm-treasury-and-funding-horizon), and how would you compute it?

**Solution of Interview question 14.2.**

The days until [unencumbered cash](#def-fm-treasury-and-funding-cash), after all calls and outflows in a stress, first goes negative; from a daily forecast of every account’s P&L and requirement.

*What the interviewer is looking for: a daily forecast, not a ratio.*

**Interview question 14.3 ★★ researcher, developer.**

Formulate the allocation of positions across brokers with gross, net and concentration margin terms as an optimisation problem.

**Solution of Interview question 14.3.**

Minimise the cost of margin plus financing over fractions $x_{ib}$ with $\sum_bx_{ib}=1$; linearise the absolute net and the concentration excesses with auxiliary variables; a linear programme.

*What the interviewer is looking for: convexity and the linearisation.*

**Interview question 14.4 ★★ risk.**

Your prime broker doubles its margin overnight. What do you check, and what do you do?

**Solution of Interview question 14.4.**

Whether the agreement allows it without notice, the new requirement against [unencumbered cash](#def-fm-treasury-and-funding-cash), what can move to other brokers, and which positions to reduce; then pay, reduce or move, and report the [survival horizon](#def-fm-treasury-and-funding-horizon).

*What the interviewer is looking for: terms, cash and options, in that order.*

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

Why might a firm pay more margin than it needs to?

**Solution of Interview question 14.5.**

To keep several brokers engaged, to buy a lock-up or committed financing, and to keep positions where they can be moved or financed in stress.

*What the interviewer is looking for: the price of resilience.*

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

Design a liquidity stress test for a hedge fund with three prime brokers and a futures account.

**Solution of Interview question 14.6.**

Map the accounts and their terms; build scenarios of P&L, house-margin increases, withheld excess and clearing-margin moves; forecast cash daily; report the [survival horizon](#def-fm-treasury-and-funding-horizon) and the buffer needed, and the terms that drive them.

*What the interviewer is looking for: joint scenarios and a daily forecast.*
