Rates, Credit, XVA and Risk · Rates, credit & risk
19Funding, Margin and Capital Adjustments
In 2012 John Hull and Alan White asked in print whether funding is a cost for derivatives desks, and argued that it should not enter a derivative’s price. A practitioner’s reply appeared the same year under the title “Yes, FVA is a cost for derivatives desks”. In January 2014 JPMorgan reported a 1.5 billion dollar loss from implementing a funding valuation adjustment, describing an industry migration towards pricing the cost of funding. Both sides were right about something: the debate turned on whose value is being measured, the firm’s as a whole or its shareholders’, and on what an uncollateralised trade forces a bank to borrow. This chapter builds the adjustments that followed CVA and DVA: the cost of funding uncollateralised positions, of posting initial margin, and of holding capital against counterparty and CVA risk, and stacks them into the price a bank quotes.
19.1 Funding a derivative: the debate
A bank that trades an uncollateralised swap with a client hedges it with an opposite swap under a CSA with the market. When the client’s swap is in the bank’s favour, the hedge is against it: the bank posts variation margin on the hedge and receives nothing from the client. It must borrow that cash at its own funding rate, above the overnight rate paid on collateral. When the client’s swap is against the bank, the bank receives margin on the hedge and can lend it or reduce its borrowing (Figure 19.1).
Definition 19.1 (Funding valuation adjustment)
The funding valuation adjustment (FVA) is the value of the cost of funding the collateral that uncollateralised trades and their hedges require, less the benefit of the collateral they release: .
Definition 19.2 (Funding cost and benefit adjustments)
The funding cost adjustment is , the funding spread paid on the discounted expected positive exposure while both parties survive; the funding benefit adjustment FBA is the same integral on the discounted expected negative exposure, at the rate the bank saves.
The FBA overlaps with DVA: both are value the bank captures from its own credit spread on what it owes. Firm-value arguments (Hull and White) say FVA should not affect prices; shareholder-value arguments (Andersen, Duffie and Song) say funding costs transfer value to creditors and a desk must charge them. Conventions differ between banks: some count FCA and FBA symmetrically, some only the cost, some remove the overlap with DVA.
19.2 Funding cost and benefit adjustments
Example 19.3 (FVA of the ten-year swap)
Take chapter 17’s ten-year USD 100 million swap on which the bank receives the par rate of 3.80% from the BBB counterparty of chapter 18, and a bank funding at 80 basis points over the overnight rate. With the survival of both parties, the FCA is USD 127 400 and the FBA USD 185 797: the swap is expected to be a liability more than an asset, so the net FVA is a benefit of USD 58 397. The FCA alone, a charge many banks book, is 1.5 basis points a year on the swap. Under a CSA with daily margin the funding exposure almost disappears: the FCA falls to USD 3 102.
def fca(dee: np.ndarray, times: np.ndarray, spread: float, survival: np.ndarray | None = None) -> float:
"""Funding cost of the discounted positive exposure (trapezoid on the grid)."""
s = np.ones_like(dee) if survival is None else survival
f = dee * s
return float(spread * np.sum(0.5 * (f[1:] + f[:-1]) * np.diff(times)))
def fba(dne: np.ndarray, times: np.ndarray, spread: float, survival: np.ndarray | None = None) -> float:
return fca(dne, times, spread, survival)
19.3 Initial margin and MVA
Uncleared margin rules (One Quant Book 2, chapter 10) and clearing houses require initial margin, posted by both sides and segregated: it cannot be reused, and the poster earns little on it while funding it at its own rate.
Definition 19.4 (Margin valuation adjustment)
The margin valuation adjustment (MVA) is the value of the cost of funding the initial margin a position requires over its life: .
Example 19.5 (MVA of the swap)
With Book 2’s sensitivity model, initial margin is 2.326 standard deviations of the swap’s value over ten days at a rate volatility of 7 basis points a day: USD 4.22 million today, falling as the swap’s DV01 runs off (Figure 19.2). Funding it at 80 basis points costs USD 175 217 over the swap’s life.
19.4 Capital: counterparty and CVA capital, and KVA
A bank holds capital against the default of its counterparties and against the volatility of its CVA. Regulatory formulas turn netting sets into exposures and exposures into capital.
Definition 19.6 (Exposure at default, SA-CCR)
The exposure at default (EAD) of a netting set is the exposure a capital rule charges for its counterparty’s default. The standardised approach for counterparty credit risk (SA-CCR) sets : a replacement cost (, or under margin) plus supervisory add-ons per asset class (for interest rates, 0.5% of the notional times a supervisory duration and a maturity factor), scaled down for excess collateral.
def ir_addon(trades: list[IrTrade], mpor_days: float | None = None) -> float:
total = 0.0
for ccy in sorted({t.currency for t in trades}):
D = {1: 0.0, 2: 0.0, 3: 0.0}
for t in trades:
if t.currency == ccy:
D[t.bucket()] += (t.delta * t.notional * supervisory_duration(t.start, t.end)
* maturity_factor(t.maturity, mpor_days))
en2 = (D[1] ** 2 + D[2] ** 2 + D[3] ** 2 + 1.4 * D[1] * D[2] + 1.4 * D[2] * D[3] + 0.6 * D[1] * D[3])
total += SF_IR * math.sqrt(max(en2, 0.0))
return total
def fx_addon(pairs: dict[str, float], maturity: float = 1.0, mpor_days: float | None = None) -> float:
"""pairs: net notional (domestic currency, signed) per currency pair; one maturity factor for simplicity."""
return SF_FX * sum(abs(v) for v in pairs.values()) * maturity_factor(maturity, mpor_days)
def multiplier(v_minus_c: float, addon: float) -> float:
if addon <= 0:
return 1.0
return min(1.0, FLOOR + (1 - FLOOR) * math.exp(v_minus_c / (2 * (1 - FLOOR) * addon)))
def sa_ccr_ead(v: float, addon: float, collateral: float = 0.0, th: float | None = None, mta: float = 0.0,
nica: float = 0.0) -> float:
"""EAD = alpha (RC + multiplier AddOn); RC unmargined max(V - C, 0), margined max(V - C, TH + MTA - NICA, 0)."""
rc = max(v - collateral, 0.0) if th is None else max(v - collateral, th + mta - nica, 0.0)
return ALPHA * (rc + multiplier(v - collateral, addon) * addon)
Example 19.7 (The swap’s EAD)
Today the swap has no replacement cost; its supervisory duration is 7.87 years and its add-on 0.5% of USD 100 million times 7.87, USD 3.93 million, so its EAD is USD 5.51 million. Under a CSA with a ten-day margin period of risk the maturity factor is and the replacement cost floor the MTA of USD 0.5 million: EAD USD 2.35 million. The implementation reproduces the Basel Committee’s worked example (an EAD of 569 thousand on three trades).
Definition 19.8 (CVA risk capital)
CVA risk capital is the capital a bank holds against losses from changes in CVA. In the reduced basic approach it is with and, per counterparty, : a risk weight by sector and credit quality (3% for an investment-grade industrial), the effective maturity and a supervisory discount factor.
Definition 19.9 (Capital valuation adjustment, hurdle rate)
The capital valuation adjustment (KVA) is the value of the return shareholders require on the capital a trade consumes over its life, , where is the hurdle rate: the return on capital, above the risk-free rate, that the bank requires of its activities.
Example 19.10 (KVA of the swap)
With an illustrative 100% risk weight and 8% capital ratio, counterparty capital today is USD 440 686; CVA capital, at a 3% risk weight and an effective maturity of 5.5 years (the average time of the swap’s payments), is USD 368 944. Projected along the swap’s life with the replacement cost set to the expected exposure, the capital peaks at USD 1.18 million after 1.25 years (Figure 19.3). At a 10% hurdle rate the KVA is USD 558 718, the largest adjustment of all.
As of September 2026 — Counterparty and CVA capital
The Basel Committee’s standardised approach for counterparty credit risk dates from March 2014; its revised CVA framework, with the basic and standardised approaches, from July 2020, as part of the Basel III standards finalised in December 2017. The Basel Framework’s credit risk standard carries an effective date of 1 January 2023 and a next version from 1 January 2028. The US agencies made the standardised approach mandatory for advanced-approaches banks from 1 January 2022; in the European Union it applies since 28 June 2021 and the revised CVA framework since 1 January 2025. Chapter 23 tracks the market-risk dates.
19.5 The whole stack
Example 19.11 (Pricing the swap)
Uncollateralised, the swap’s adjustments are: CVA USD 272 251 (on first-to-default), DVA 210 351, FCA 127 400, FBA 185 797, no MVA, KVA 558 718; in total USD 562 220, or 6.8 basis points a year on the swap’s fixed rate. Under a CSA with bilateral initial margin: CVA 33 814, DVA 17 745, FCA 3 102, FBA 3 367, MVA 175 217, KVA 156 573; in total USD 347 595, 4.2 basis points (Figure 19.4). Collateral replaces credit and funding costs with margin costs, and cuts capital.
The adjustments overlap and interact: DVA and FBA both monetise the bank’s own spread; capital depends on CVA hedges, which reduce CVA capital but need funding; margin reduces CVA and FVA but creates MVA. A desk computes them on common scenarios and quotes their sum, the subject of chapter 20.
19.6 Tutorial: the adjustment stack
Goal. Compute FCA, FBA, MVA and KVA for the ten-year swap, with and without a CSA, and the whole stack. End state: the numbers of Examples 19.3, 19.5, 19.7, 19.10 and 19.11 and the charts.
- Exposure: chapter 17’s swap values; lag 1 for default, lag 0 for funding.
- Funding and margin:
fca,fba,mva. - Capital:
ir_addon,sa_ccr_ead,scva,ba_cva_capital;capital_profile();kva. - Stack:
stack_table();fig_rc_xvafund.pywrites the charts.
What to change next. Buy CVA hedges and recompute CVA capital with the full basic approach; raise the hurdle rate to 12% and see how the price moves.
19.7 Build: funding, margin and capital
Purpose. The firm’s funding, margin and capital adjustments and the regulatory exposure and CVA capital they use; the inputs of chapter 20’s quotes.
Interface. fca, fba; mva, im_profile (over Book 2’s firm_ccpbasis); IrTrade, supervisory_duration, maturity_factor, ir_addon, fx_addon, multiplier, sa_ccr_ead; scva, ba_cva_capital; kva.
Rules. SA-CCR for interest rate and FX hedging sets only; reduced basic CVA approach; risk weights and hurdle as inputs; profiles on chapter 17’s grid.
Acceptance tests. code/firm/xvafund/tests/: the Basel Committee’s example 1 (EAD 569); the margined maturity factor; multiplier bounds; single-counterparty CVA capital; FCA of a flat profile.
Stretch. Credit, equity and commodity add-ons; the standardised approach to CVA capital from CVA sensitivities; capital projected on each path; a funding curve instead of a flat spread.
Sources and further reading
- C. Burgard and M. Kjaer, “Partial differential equation representations of derivatives with bilateral counterparty risk and funding costs”, Journal of Credit Risk 7(3), 2011, 75–93.
- A. Castagna, “Yes, FVA is a cost for derivatives desks”, SSRN, 2012 (a reply to Hull and White).
- L. Andersen, D. Duffie and Y. Song, “Funding value adjustments”, Journal of Finance 74(1), 2019, 145–192.
- A. Green, C. Kenyon and C. Dennis, “KVA: capital valuation adjustment”, SSRN, 2014.
- Basel Committee on Banking Supervision, The standardised approach for measuring counterparty credit risk exposures, 2014; Targeted revisions to the credit valuation adjustment risk framework, 2020.
19.8 Exercises
Exercise 19.1 ★
A netting set has a flat discounted EE of USD 5 million for four years and the bank funds at 60 basis points. Ignoring survival, what is the FCA?
Solution
Solution of Exercise 19.1.
.
Exercise 19.2 ★
Compute the SA-CCR add-on and EAD of a new unmargined five-year USD 50 million swap.
Solution
Solution of Exercise 19.2.
Supervisory duration ; add-on million; with no replacement cost, EAD million.
Exercise 19.3 ★
Why does the net FVA of the chapter’s swap come out as a benefit?
Solution
Solution of Exercise 19.3.
The bank’s expected negative exposure exceeds its positive one: on the chapter’s upward-sloping curve, the receiver of fixed is expected to owe more than it is owed over the swap’s life. The collateral it receives on the hedge in those states is worth more (FBA) than the collateral it posts in the others costs (FCA).
Exercise 19.4 ★★
Why do FBA and DVA overlap, and how do banks avoid counting both?
Solution
Solution of Exercise 19.4.
Both value the bank’s own credit spread applied to what it owes: DVA through the chance of not paying at default, FBA through funding at a rate that contains that spread. Counting both double-counts the spread; banks either drop DVA from pricing, compute FBA on the funding spread net of the credit spread, or use one symmetric FVA with DVA removed.
Exercise 19.5 ★★
Why is the KVA larger than the CVA for the uncollateralised swap?
Solution
Solution of Exercise 19.5.
CVA charges the expected loss; KVA charges a 10% return on capital sized for losses far out in the tail (counterparty capital and CVA capital), held for the swap’s whole life. For a BBB name, capital is several times the expected loss.
Exercise 19.6 ★★
Under the CSA the MVA is the largest item. Why can’t the bank avoid it?
Solution
Solution of Exercise 19.6.
Initial margin is required by regulation (uncleared margin rules) or by the clearing house, must be segregated and cannot be reused; it earns less than the bank pays to fund it. It can be reduced by netting margin across trades (portfolio models), by clearing, or by compression.
Exercise 19.7 ★★★
Coding. Compute the FCA of the swap at funding spreads of 40 and 120 basis points, with and without the CSA.
Solution
Solution of Exercise 19.7.
Without CSA USD 63 700 at 40 basis points and 191 101 at 120; with the CSA USD 1 551 and 4 654. The FCA is linear in the spread for a flat spread.
Exercise 19.8 ★★★
Find the flaw. “FVA is our treasury’s problem, not the trading desk’s; we price at the overnight rate and let treasury worry about funding.”
Solution
Solution of Exercise 19.8.
The desk’s hedge creates the funding need, so the cost belongs to the trade; if the desk prices at the overnight rate, treasury subsidises uncollateralised trades and the bank overtrades them. A funds transfer price that charges each trade its funding use, net of what it releases, puts the cost where the decision is taken.
19.9 Problem: The Funding Charge
Problem 19.1
Weekend problem — what a CSA is worth to the bank
The bank of the chapter funds at 80 basis points over the overnight rate. A treasurer at the client asks what the bank would give, in running basis points, for the client to sign a CSA on its ten-year swap.
Part I — Funding.
- Give the FCA and FBA without a CSA, and the net FVA.
- Give the FCA alone as a running spread.
- Give the FCA under the CSA and the share of it removed.
- Why does the funding need depend on the hedge rather than on the client trade?
- Which of FCA and FBA would a bank that books only funding costs report?
Part II — Credit and capital.
- Give CVA and DVA with and without the CSA.
- Give the EAD today with and without the CSA.
- Give the KVA with and without the CSA.
- Why does the CSA cut KVA by less than CVA?
- What does initial margin add?
Part III — The offer.
- Give the total adjustment without and with CSA and initial margin.
- Convert both into running basis points.
- How much could the bank give the client for signing, in running basis points?
- What would the client need to post, and what would it cost it?
- Would a CSA without initial margin be better for both?
Part IV — Judgement.
- Who wins the FVA debate for the pricing of this swap?
- Why would a bank still charge KVA if capital is not a cash cost?
- How does the bank’s own credit quality enter each adjustment?
- State the named result: the FCA of the uncollateralised swap at 80 basis points and the share the CSA removes.
- In one sentence: what does collateral buy a bank?
Solution
Solution of Problem 19.1.
1. FCA USD 127 400, FBA 185 797; net FVA a benefit of 58 397. 2. 1.5 basis points a year. 3. USD 3 102, 98% removed. 4. The client posts nothing; the hedge is collateralised, so the bank’s cash needs follow the hedge’s margin, which mirrors the client trade’s value. 5. FCA only: USD 127 400. 6. CVA USD 272 251 and DVA 210 351 without the CSA; 33 814 and 17 745 with it. 7. USD 5.51 million without, 2.35 million with. 8. USD 558 718 without, 156 573 with. 9. Capital keeps a floor under margin: the add-on scaled by the margin period of risk and the threshold-plus-MTA replacement cost, and CVA capital is charged on that EAD. The CSA cuts KVA by 72% against 88% for CVA. 10. MVA of USD 175 217, the funding of USD 4.22 million of initial margin falling over the life. 11. USD 562 220 without; 347 595 with CSA and initial margin. 12. 6.8 and 4.2 basis points a year. 13. Up to the difference, 2.6 basis points a year (4.7 if no initial margin were required, with a total of USD 172 378, 2.1 basis points). 14. Daily variation margin in cash or eligible bonds, and possibly initial margin; the cost is its own funding of that collateral and the operations to meet calls. 15. For this pair yes: a CSA without initial margin removes most credit, funding and capital costs without MVA. Rules requiring initial margin apply to large financial counterparties, generally not to corporates. 16. The shareholder view for the desk’s quote (it pays the funding), the firm-value view for the fair value the accounts report; hence the conventions of chapter 20. 17. Because capital is expensive equity that must earn its hurdle rate; a trade that does not pay for its capital destroys value for shareholders even if it is profitable before capital. 18. Through the funding spread (FCA, FBA, MVA), the bank’s survival in first-to-default weights, and DVA. 19. Named result: the funding charge: FCA of USD 127 400 on the uncollateralised ten-year swap at 80 basis points, of which the CSA removes 98%. 20. Lower credit, funding and capital charges, paid for with operations, liquidity and margin costs.
19.10 Interview questions
Interview question 19.1 ★ trader, bank
Explain FVA with the hedge of an uncollateralised swap.
Solution
Solution of Interview question 19.1.
The bank hedges the client’s uncollateralised swap with a collateralised one. When the client owes the bank, the bank posts margin on the hedge and borrows it at its funding rate; when the bank owes the client, it receives margin on the hedge. FVA is the expected cost of the first less the benefit of the second.
What the interviewer is looking for: the hedge’s margin as the source of funding.
Interview question 19.2 ★★ researcher
Summarise the FVA debate. Where do you stand?
Solution
Solution of Interview question 19.2.
Firm-value view: funding costs reflect the bank’s default risk, a transfer to creditors, so the value of the firm does not change and prices should not include FVA. Shareholder view: that transfer is a cost to shareholders, so a desk maximising shareholder value must charge it. A defensible answer separates fair value from the desk’s pricing.
What the interviewer is looking for: both views and a clear position.
Interview question 19.3 ★★ risk, bank
Walk through SA-CCR for a single interest rate swap.
Solution
Solution of Interview question 19.3.
Replacement cost ; add-on notional supervisory duration maturity factor delta, aggregated across the maturity buckets of its currency; multiplier 1 unless over-collateralised or out of the money; EAD .
What the interviewer is looking for: RC, add-on ingredients and alpha.
Interview question 19.4 ★★ trader
What is MVA and how would you reduce it?
Solution
Solution of Interview question 19.4.
The cost of funding segregated initial margin over the trade’s life, at the funding spread over what margin earns. Reduce it by portfolio margining, trading with counterparties whose risk offsets, clearing, compression, and posting securities cheaper to fund than cash.
What the interviewer is looking for: the definition and the levers.
Interview question 19.5 ★★★ researcher, bank
Why is KVA controversial, and how would you compute it for a new trade?
Solution
Solution of Interview question 19.5.
It depends on regulation that may change, on the hurdle rate (a management choice), and on projecting capital decades ahead; it can double-count with other charges. For a new trade: project counterparty, CVA and market-risk capital with and without it along scenarios, take the difference, and charge the hurdle rate on its discounted path.
What the interviewer is looking for: the doubts and the incremental method.
Interview question 19.6 ★★★ developer
How would you compute all XVAs of a large book consistently and fast?
Solution
Solution of Interview question 19.6.
Common scenarios and one exposure engine for all netting sets; profiles stored once and reused by CVA, DVA, FCA, FBA and KVA; regulatory capital computed from the same trade representation; algorithmic differentiation for sensitivities; parallel over paths and netting sets; incremental runs for new trades.
What the interviewer is looking for: shared scenarios, reuse and AAD.