Quantitative Finance · Book 2 · Markets

Markets II: Rates, FX and Credit

Markets II: Rates, FX and Credit · Markets

10Swap Clearing and the Clearing-House Basis

In 2009 the leaders of the G20 agreed that every standardised over-the-counter derivative should be cleared through a central counterparty by the end of 2012. Swaps that had been bilateral promises between banks became trades with a clearing house, margined daily, and a swap’s price was supposed to depend only on its terms. It did not quite work out that way. By 2017 a thirty-year dollar swap cleared at one clearing house was being quoted several basis points away from the identical swap cleared at the other, and a data firm could show that for USD 100 million the difference paid for about 727 thousand dollars of margin funding. The swap’s cash flows are the same; what differs is who else trades at each clearing house, and so how much margin a dealer has to post to hold the other side. This chapter explains clearing, the margin that comes with it, and why the same swap can have two prices.

10.1 The clearing mandate

Definition 10.1 (Clearing mandate, client clearing and porting)

A clearing mandate is a regulatory requirement that designated classes of derivatives be cleared through a central counterparty (One Quant Book 1, chapter 5). Firms that are not members of the clearing house clear through a member, which guarantees their trades: this is client clearing. Porting is the transfer of a client’s positions and margin from a defaulting clearing member to another, so that the client’s hedges survive its broker’s failure.

The United States implemented the commitment first: the Commodity Futures Trading Commission adopted its first clearing requirement in November 2012, for four classes of interest-rate swaps and two of credit index swaps, and dealers and active funds began clearing them in March 2013. The European Union followed under its own regulation, and in 2024 added a requirement that its firms keep an active account at a clearing house inside the Union, a political choice about where euro swaps are cleared as much as a risk rule.

What clearing changes is the shape of the network (Figure 10.1). Five dealers trading bilaterally face ten counterparty relationships, each with its own collateral agreement and its own exposure; cleared, each faces one clearing house, its trades with all the others net into one position there, and a default is absorbed by the house’s margin and default fund rather than passed along the web.

Five dealers trading swaps bilaterally, each pair with its own collateral agreement, and the same dealers after clearing, each facing only the clearing house. Schematic.
Figure 10.1. Five dealers trading swaps bilaterally, each pair with its own collateral agreement, and the same dealers after clearing, each facing only the clearing house. Schematic.

As of September 2026 — Mandates and margin rules

United States: clearing required for the designated swap classes from 11 March 2013 for dealers and active funds, later for others. European Union: under EMIR 3, in force since 24 December 2024, firms subject to the clearing obligation must hold an active account at an authorised EU clearing house and clear a representative number of euro and zloty interest-rate derivatives through it, from 24 June 2025. Uncleared trades: the international margin framework reached its final phase on 1 September 2022, for firms with more than EUR 8 billion of uncleared derivatives; initial margin need not be exchanged below EUR 50 million per counterparty group.

10.2 The competing clearing houses

Dollar swaps are cleared mainly at two houses, LCH’s SwapClear and CME; other currencies have their own mix, and part of euro clearing must now take place inside the Union (Box 10.1). A dealer is a member of several and can choose where to clear a trade with another dealer. A client usually clears where its clearing broker and its own risk systems are set up, and it cannot move trades freely between houses: margin is computed on each house’s portfolio separately, and a trade at one never offsets a trade at another.

How a clearing-house basis arises. Clients at one house are mostly fixed payers; the dealers who take the other side receive fixed there and hedge by paying fixed at the other house, where other dealers receive. The dealer’s risk nets to zero across the two, but each house margins its half on its own, and the dealer funds both margins.
Figure 10.2. How a clearing-house basis arises. Clients at one house are mostly fixed payers; the dealers who take the other side receive fixed there and hedge by paying fixed at the other house, where other dealers receive. The dealer’s risk nets to zero across the two, but each house margins its half on its own, and the dealer funds both margins.

10.3 Initial margin, cleared and uncleared

A clearing house collects variation margin, the daily change in a swap’s value, and initial margin, a buffer against the loss it would suffer in closing out a defaulted member’s portfolio (One Quant Book 1, chapter 20).

Definition 10.2 (Uncleared margin rules and credit support annex)

The uncleared margin rules are the regulations requiring large users of derivatives that are not centrally cleared to exchange initial and variation margin bilaterally, with the initial margin held by a third party. A credit support annex (CSA) is the part of a bilateral derivatives agreement that governs the collateral: which assets, thresholds, minimum transfers, the rate paid on cash collateral, and the timing of calls.

Proposition 10.3 (Initial margin and its cost)

Suppose a house margins a swap position at zz standard deviations of its value change over a margin period of risk of hh days, with a daily rate volatility of σ\sigma basis points: IM(t)=z σh DV01(t)\mathrm{IM}(t) = z\,\sigma\sqrt{h}\,\mathrm{DV01}(t). If posting margin costs a funding spread ss a year, the margin valuation adjustment is

MVA  =  ∫0Ts IM(t) P(0,t) dt,\mathrm{MVA} \;=\; \int_0^T s\,\mathrm{IM}(t)\,P(0,t)\,dt,

and the running spread on the swap that pays for it is MVA/DV01(0)\mathrm{MVA}/\mathrm{DV01}(0) basis points.

Proof. The first statement defines the model: value changes are normal with standard deviation σh\sigma\sqrt h basis points of rate times the DV01. The cost of holding IM(t)\mathrm{IM}(t) for dtdt is s IM(t) dts\,\mathrm{IM}(t)\,dt, discounted. A running spread of bb basis points on the swap is worth b DV01(0)b\,\mathrm{DV01}(0) today. ∎

Example 10.4 (A ten-year and a thirty-year swap)

With illustrative parameters, σ=7\sigma = 7 basis points a day, a five-day margin period and z=2.326z = 2.326, initial margin is 36.4 basis points of DV01. On USD 100 million of a ten-year swap at 4%, the DV01 is USD 81 109, initial margin starts at USD 2.95 million and declines with the swap’s remaining life (Figure 10.3); funded at 50 basis points a year it costs USD 76 442 over the swap’s life: 0.94 basis points a year of running spread. For the thirty-year swap, 2.30 basis points.

Initial margin over the life of USD 100 million of a ten-year and a thirty-year swap, in the stylised model of . Margin follows the DV01 of the remaining swap, and the area under each curve, times the funding spread, is its cost. Parameters are illustrative. Data: the chapter’s tutorial.
Figure 10.3. Initial margin over the life of USD 100 million of a ten-year and a thirty-year swap, in the stylised model of Proposition 10.3. Margin follows the DV01 of the remaining swap, and the area under each curve, times the funding spread, is its cost. Parameters are illustrative. Data: the chapter’s tutorial.

10.4 Why the same swap has two prices

Definition 10.5 (CCP basis)

The CCP basis is the difference between the par rates of economically identical swaps cleared at two different clearing houses.

If a dealer’s trades at one house net out, it posts little initial margin there. If its clients at that house all pay fixed, it is a one-way receiver there, and its hedges, paying fixed at the other house, leave it a one-way payer there: two margins, both funded, for a position that is flat. The dealer charges for this when it receives fixed at the first house, by asking a higher fixed rate there. The analysis of 2017 found the effect largest in long dollar swaps, where client payers at CME outnumbered receivers: about 3.4 basis points at thirty years, of which 1.3 was the margin cost at CME and 2.1 at LCH.

The running spread that pays for one one-way margined position, by maturity and funding spread, in the stylised model. A dealer with one-way positions at two houses needs twice as much. The basis grows with maturity, because margin is held for longer, but less than in proportion, because the margin runs off with the swap and later years are discounted. Data: the chapter’s tutorial.
Figure 10.4. The running spread that pays for one one-way margined position, by maturity and funding spread, in the stylised model. A dealer with one-way positions at two houses needs twice as much. The basis grows with maturity, because margin is held for longer, but less than in proportion, because the margin runs off with the swap and later years are discounted. Data: the chapter’s tutorial.

The basis is therefore not an arbitrage. Receiving fixed at the rich house and paying at the cheap one locks in the spread, but also creates the two one-way positions whose margin cost the spread pays for; only a firm whose existing positions at the two houses make the new trades reduce its margin can earn it, and dealers compete to be that firm. Mandates that push flows to a particular house, like the EU active account, move the basis too.

10.5 Tutorial: pricing the margin

Goal. Compute the initial-margin profile of a swap, its funding cost and the basis that pays for it. End state: Figures 10.3 and 10.4 and the numbers of Example 10.4.

  1. The margin model: initial margin per unit of DV01.

    @dataclass(frozen=True)
    class MarginModel:
        sigma_bp_day: float = 7.0      # daily standard deviation of the swap rate, bp
        mpor_days: float = 5.0         # margin period of risk
        z: float = 2.326               # 99% one-sided
    
        def im_per_dv01(self) -> float:
            """Initial margin per unit of DV01 (i.e. in basis points of rate)."""
            return self.z * self.sigma_bp_day * math.sqrt(self.mpor_days)
    Listing 10.1. A stylised initial-margin model. code/firm/ccpbasis/firm_ccpbasis.py
  2. Margin over the life, its cost, and the basis.

    def im_path(notional: float, maturity: float, rate: float, model: MarginModel, step: float = 0.25):
        return [(t, d * model.im_per_dv01()) for t, d in dv01_path(notional, maturity, rate, step)]
    
    
    def mva(notional: float, maturity: float, rate: float, model: MarginModel, funding_spread: float,
            step: float = 0.25) -> float:
        """Present value of funding the initial margin over the swap's life."""
        return sum(funding_spread * m * step / (1.0 + rate) ** t for t, m in im_path(notional, maturity, rate, model, step))
    
    
    def basis_bp(notional: float, maturity: float, rate: float, model: MarginModel, funding_spread: float,
                 ccps: int = 1) -> float:
        """Running spread (bp a year on the swap) that pays for the MVA of `ccps` one-way positions."""
        dv01 = notional * annuity_remaining(0.0, maturity, rate) * 1e-4
        return ccps * mva(notional, maturity, rate, model, funding_spread) / dv01
    Listing 10.2. Initial-margin path, margin valuation adjustment, running basis. code/firm/ccpbasis/firm_ccpbasis.py
  3. Run ccp_demo.one_way_book() and fig_ccp.py.

What to change next. Double the margin period of risk to ten days, as for an uncleared trade, and watch initial margin rise by 2\sqrt 2; then let the funding spread fall to zero and explain why the basis disappears.

10.6 Build: the margin-funding calculator

Purpose. The miniature firm quotes swaps to clients at different clearing houses and must know what each trade costs it in margin at each house; its risk system (One Quant Book 6) extends this to the real margin models.

Interface. MarginModel(sigma_bp_day, mpor_days, z) with im_per_dv01(); annuity_remaining(t, maturity, rate); dv01_path; im_path; mva(notional, maturity, rate, model, funding_spread); basis_bp(…, ccps).

Rules. Flat curve, annual periods; margin proportional to the remaining swap’s DV01; quarterly steps for the funding integral; the basis per one-way position, multiplied by the number of houses where the dealer is one way.

Acceptance tests. code/firm/ccpbasis/tests/: the annuity’s closed form; margin proportional to DV01 and declining; MVA linear in notional and funding; basis increasing with maturity and additive across houses.

Stretch. A portfolio margin (netting across trades at one house); a historical-simulation margin on the curve of Section 9.7; the incremental margin of a new trade at each house, which is what a dealer really prices.

Sources and further reading

  • G20, Leaders’ Statement: The Pittsburgh Summit, September 2009.
  • Commodity Futures Trading Commission, press releases on the first clearing determination (November 2012) and its phases (2013).
  • Basel Committee and IOSCO, Margin requirements for non-centrally cleared derivatives, and statements on the final phases (2019, 2020).
  • Clarus Financial Technology, “CME-LCH basis for dummies”, June 2017; DLA Piper, “EMIR 3 active account requirement”, June 2025.

10.7 Exercises

Exercise 10.1 ★

In the model of Example 10.4, what initial margin does USD 100 million of a new ten-year swap require?

Solution

Solution of Exercise 10.1.

36.4×81 109=USD 2.9536.4 \times 81\,109 = \text{USD}~2.95 million: 36.4 basis points of rate, applied to the DV01.

Exercise 10.2 ★

A client receives fixed on that swap. Rates rise 3 basis points in a day. What variation margin does it pay?

Solution

Solution of Exercise 10.2.

A receiver loses when rates rise: 3×81 109=USD 243 3273 \times 81\,109 = \text{USD}~243\,327, paid in cash through its clearing broker to the house the same day or the next morning.

Exercise 10.3 ★

A client’s clearing broker defaults. What happens to the client’s swaps if porting succeeds, and if it fails?

Solution

Solution of Exercise 10.3.

If porting succeeds, the client’s swaps and its margin move to another clearing member and continue unchanged: its hedges survive. If it fails, the house closes the positions out, returning the client’s margin net of losses; the client must re-enter its hedges in whatever market prevails, having been unhedged in between.

Exercise 10.4 ★★

Give the MVA of USD 100 million of the ten-year swap at a 50-basis-point funding spread and the running basis it implies.

Solution

Solution of Exercise 10.4.

USD 76 442 over the swap’s life; divided by the DV01 of 81 109, a running basis of 0.94 basis points a year.

Exercise 10.5 ★★

Clients at one house are mostly fixed payers. At which house is the par swap rate higher, and why?

Solution

Solution of Exercise 10.5.

At the house where clients pay fixed. Dealers who receive there end up one way and must hedge elsewhere, posting margin twice; they ask a higher fixed rate to receive, so the par rate there is higher. The analysis of 2017 found swaps at CME quoted above the same swaps at LCH for exactly this reason.

Exercise 10.6 ★★

A fund has EUR 9 billion of uncleared derivatives outstanding and a margin model that gives EUR 70 million of initial margin against one dealer. Is it subject to the uncleared margin rules? How much initial margin is exchanged?

Solution

Solution of Exercise 10.6.

Yes: EUR 9 billion is above the EUR 8 billion threshold of the final phase. Initial margin is exchanged only above the EUR 50 million threshold per counterparty group: EUR 20 million, if nothing else in the group uses the threshold.

Exercise 10.7 ★★★

Coding. With basis_bp, give the thirty-year basis per one-way position at funding spreads of 25, 50 and 75 basis points. Compare the total for two houses at 50 with the 3.4 basis points found in 2017.

Solution

Solution of Exercise 10.7.

1.15, 2.30 and 3.45 basis points per one-way position. At 50, two houses need 4.60, against the 3.4 of the 2017 example: the same order of magnitude, the difference coming from the illustrative volatility, margin period and funding spread, and from real margin models that net across a dealer’s portfolio.

Exercise 10.8 ★★★

Find the flaw. “The thirty-year swap is 3 basis points higher at one house than at the other: receive there, pay at the other, and pocket 3 basis points a year risk-free.” Correct it.

Solution

Solution of Exercise 10.8.

The two swaps offset in risk but not in margin: each house margins its side on its own, so the “arbitrage” posts two initial margins for thirty years. At the market’s funding costs that is what the 3 basis points pay for. Only a firm whose existing positions make each new trade reduce its margin at both houses earns the spread, and that is the business dealers compete for.

10.8 Problem: The One-Way Book

Problem 10.1

Weekend problem — what a dealer charges for a lopsided house

A dealer has received fixed on USD 2 billion of ten-year swaps from clients at house A, where clients almost never receive. It hedges by paying fixed on USD 2 billion at house B. Use the stylised model of Proposition 10.3: 7 basis points a day, five days, z=2.326z = 2.326, a flat 4% curve, a funding spread of 50 basis points.

Part I — House A.

  1. Give the position’s DV01 at house A.
  2. Give its initial margin.
  3. Give the variation margin for a 5-basis-point rise in rates, and who pays.
  4. Why does the house not care that the dealer is hedged elsewhere?
  5. How would the margin change if the dealer’s position at A were netted by receivers from other dealers?

Part II — Both houses.

  1. Give the initial margin at house B.
  2. Give the MVA of each position and of both.
  3. Give the running basis that pays for one position, and for both.
  4. What would it be for thirty-year swaps?
  5. What would initial margin be with a ten-day margin period?

Part III — The choice.

  1. The dealer could instead hedge at house A, if another dealer would receive fixed there. What margin would it then post?
  2. What is the most the dealer should pay another dealer, in basis points of rate, to receive fixed from it at A rather than hedge at B?
  3. Why might no dealer take that trade?
  4. How do the clients end up paying?
  5. What would change the imbalance at house A?

Part IV — Judgement.

  1. Why is margin posted in cash costly at all?
  2. Why do real houses’ margins differ from this model?
  3. How does a rule requiring an account at a given house move the basis?
  4. State the named result: the basis at which hedging at house B and netting at house A cost the same, for ten-year swaps.
  5. In one sentence: why do identical swaps have two prices?
Solution

Solution of Problem 10.1.

1. 2×109×8.111×10−4=USD 1.622 \times 10^9 \times 8.111 \times 10^{-4} = \text{USD}~1.62 million per basis point. 2. 36.4×1.622≈USD 59.136.4 \times 1.622 \approx \text{USD}~59.1 million. 3. 5×1.622=USD 8.115 \times 1.622 = \text{USD}~8.11 million, paid by the dealer, who receives fixed at A; at B, where it pays fixed, it is paid the same amount. 4. Each house guarantees only its own trades and must be able to close out a defaulter’s portfolio there; a hedge at another house does not reduce its loss. 5. It would fall towards zero: a flat position at A has no market risk there, and only a small margin for basis and liquidity. 6. The same USD 59.1 million. 7. USD 1.53 million each, USD 3.06 million for both. 8. 0.94 basis points for one, 1.88 for both. 9. 4.60 basis points for both. 10. 2\sqrt 2 times as much: USD 83.5 million at each house. 11. By paying fixed at A to a dealer who receives there, its position at A is flat: no significant initial margin at A, and none at B, where it no longer needs a hedge. 12. Up to 1.88 basis points of rate: what the two one-way margins would cost over the ten years. 13. Because every dealer at A faces the same clients: all are receivers there, and none wants to add to the imbalance by receiving more. 14. In the fixed rate they pay at A, higher than at B by about the cost of the dealers’ two margins. 15. Clients who receive fixed at A (pension funds, insurers), a rule moving flows between houses, or a change in either house’s margin model or cross-margining with the other. 16. Because it must be funded: the house pays on cash collateral less than the firm pays to borrow it, and securities posted must be financed in repo; the gap is the funding spread. 17. They use historical simulation of whole portfolios, add-ons for liquidity and concentration, and floors; netting within a portfolio makes the incremental margin of a trade depend on everything else the member holds. 18. It forces flows to a house regardless of its portfolio, creating one-way books where there were none, and so creating or widening a basis between that house and the others. 19. Named result: the break-even basis for ten-year swaps is 1.88 basis points: the running cost of margining one-way positions at both houses, which a dealer should be willing to pay to net at house A instead. 20. Because margin is computed at each clearing house separately, and what it costs to hold a swap depends on who else trades there.

10.9 Interview questions

Interview question 10.1 ★ bank, trader

Why were swaps moved into central clearing after 2008, and what did it change for a dealer?

Solution

Solution of Interview question 10.1.

Bilateral swaps had created a web of exposures between large banks, opaque to regulators and to each other, which in 2008 amplified the fear of any one default. The G20 required standard swaps to be cleared, reported and, where possible, traded on platforms. For a dealer: its counterparty on most swaps is a clearing house; it posts initial and variation margin daily; its balance sheet benefits from netting; its costs now include margin funding and default-fund contributions.

What the interviewer is looking for: the counterparty web as the problem and margin as the new cost.

Interview question 10.2 ★ bank, developer

What is the difference between initial and variation margin?

Solution

Solution of Interview question 10.2.

Variation margin settles the daily change in a position’s value, so that neither side accumulates an unpaid gain or loss. Initial margin is collateral posted up front, and kept, to cover the loss the house or counterparty could suffer while closing out a defaulter’s positions over the margin period of risk; it is returned when the position is closed.

What the interviewer is looking for: settlement of past moves versus buffer for future ones.

Interview question 10.3 ★★ trader, bank

Explain the CME–LCH basis. Is it an arbitrage?

Solution

Solution of Interview question 10.3.

The difference in par rate between identical swaps cleared at CME and at LCH. Client flows at one house are one-directional, dealers end up one way at each house and post two margins; the basis prices that funding cost. It is not an arbitrage: capturing it recreates the two margins it pays for, unless your existing positions make the trades margin-reducing.

What the interviewer is looking for: the flow imbalance and margin mechanism, and why it is not free money.

Interview question 10.4 ★★ researcher, bank

What is MVA, and how would you estimate it for a new swap?

Solution

Solution of Interview question 10.4.

Margin valuation adjustment: the present value of funding the initial margin a trade requires over its life. Estimate it by projecting the trade’s incremental initial margin through time (from its future DV01 profile, or by simulating the portfolio margin), multiplying by the funding spread and discounting; express it as a running spread by dividing by the trade’s DV01.

What the interviewer is looking for: incremental, not standalone, margin, and a projection through time.

Interview question 10.5 ★★ bank

A client trades a swap bilaterally under a CSA instead of clearing it. What differs in its costs and risks?

Solution

Solution of Interview question 10.5.

Bilateral: the dealer is the counterparty, so credit risk is managed through the CSA’s collateral terms; if both parties are above the thresholds, initial margin is exchanged and segregated, usually larger than at a clearing house because the margin period is longer (ten days rather than five) and netting narrower; the dealer charges for credit and funding (the valuation adjustments of One Quant Book 6). The client gains flexibility in terms and avoids clearing fees and default-fund exposure through its broker.

What the interviewer is looking for: credit and margin differences, and their pricing.

Interview question 10.6 ★★★ developer, researcher

How would you compute the incremental initial margin of a new trade at a clearing house, quickly enough to quote a client?

Solution

Solution of Interview question 10.6.

Replicate the house’s published margin methodology: historical scenarios applied to the member’s portfolio, with its liquidity and concentration add-ons. Precompute the portfolio’s scenario P&L vector each morning; for a new trade compute its scenario P&L vector (linear in sensitivities for speed, full revaluation for large trades), add it, and read the new quantile; the difference is the incremental margin. Keep the vectors in memory, update them on each trade, and test against the house’s own margin calculator.

What the interviewer is looking for: scenario vectors, incremental quantiles, and validation against the house.

Terms defined in this chapter

See all 2333 terms in the glossary