ThirdMomentQuantX

Chapter 16

Exposure and CVA

Contents
  1. 16.1 Notation
  2. 16.2 The credit valuation adjustment
  3. 16.3 Hull-White in linear Gauss-Markov form
  4. 16.4 Simulation
  5. 16.5 Valuing a netting set on a path
  6. 16.6 Exposure measures
  7. 16.7 Counterparty credit
  8. 16.8 CVA on the exposure dates
  9. 16.9 Calibration to swaptions and caplets
  10. 16.10 Worked example

This chapter defines how the library measures the credit exposure of a netting set of swaps to a counterparty, and the credit valuation adjustment (CVA) that prices the risk of that counterparty defaulting. The future values of the swaps are simulated under the one-factor Hull-White model, written in its linear Gauss-Markov form, and each path is valued by the same leg pricing as today (Chapter 6, Section 10.5).

The first version values uncollateralised netting sets of swaps in one currency, with rates and default independent and our own default ignored; Chapter 23 adds the bilateral CVA, the DVA and the FVA, and Chapter 24 FRAs, caps, floors and swaptions in the netting set and the collateral of a CSA.

16.1 Notation

Symbol Meaning
\(t\), \(T\) Curve times: years from the valuation date, Act/365 Fixed, as in Section 7.2
\(P(0,T)\) Today's discount factor to \(T\) on the netting set's discount curve
\(P(t,T)\) The discount factor from \(t\) to \(T\) seen at \(t\) on a path
\(P^{I}(0,T)\), \(P^{I}(t,T)\) The same on the projection curve of index \(I\)
\(T^*\) The horizon: the last payment date of the netting set
\(a\) The Hull-White mean reversion, per year, \(a \ge 0.0001\)
\(\sigma(t)\) The Hull-White normal volatility of the short rate, constant between step dates
\(z_t\) The model's state at \(t\), Gaussian with \(z_0 = 0\)
\(\zeta(t)\) The variance of \(z_t\)
\(H(t)\) The model's loading of maturity \(t\) on the state
\(N(t)\) The numeraire: \(P(t,T^*)/P(0,T^*)\)
\(r(t)\) The short rate on the discount curve
\(I(u,v)\) The integrated short rate \(\int_u^v r(s)\,ds\)
\(V(t)\) The netting set's value at \(t\), cash flows paid on or before \(t\) excluded
\(U(t)\) The deflated value \(V(t)/N(t)\)
\(\mathrm{EE}_d(t)\), \(\mathrm{ENE}_d(t)\) Discounted expected exposure and expected negative exposure
\(\mathrm{EE}(t)\), \(\mathrm{ENE}(t)\) The same as forward amounts
\(\mathrm{PFE}_q(t)\) The potential future exposure at quantile \(q\)
\(\lambda(t)\) The counterparty's hazard rate
\(S(t)\) The counterparty's survival probability to \(t\)
\(R\) The counterparty's recovery rate
\(M\) The number of independent samples (paths, or antithetic pairs); in Section 16.9, the netting set's length in whole years
\(t_e\) An option's expiry (a caplet's fixing date)
\(c_k\), \(h_k\), \(q_k\) The terms of an option's underlying at expiry divided by the numeraire
\(z^*\) An option's exercise boundary in the state
\(\sigma^{N}\) A normal (Bachelier) volatility
\(E(a)\) The second strip's root mean square volatility error at mean reversion \(a\)

16.2 The credit valuation adjustment

If the counterparty defaults at time \(\tau\) while the netting set is worth \(V(\tau) > 0\) to us, we lose that value except the share \(R\) recovered; if it is worth less than zero we still owe it in full. With rates and default independent, today's value of the loss is

\[\mathrm{CVA} = -(1-R) \int_0^{T^*} \mathrm{EE}_d(t)\, \bigl(-dS(t)\bigr),\]
(16.1)

in words: the discounted expected positive value at each time, weighted by the probability of a default at that time, times the loss given default. It is negative because it is a cost to us (the sign convention of Chapter 8). Assumptions: no wrong-way risk (exposure and default independent), no collateral (Section 24.10 adds it), our own default ignored (the bilateral CVA of Chapter 23 adds it), and the exposure lost at default is the value without any close-out costs.

16.3 Hull-White in linear Gauss-Markov form

The one-factor Hull-White model gives the short rate a Gaussian dynamics with mean reversion \(a\) and normal volatility \(\sigma(t)\), fitted exactly to today's curve. It has an equivalent form in which a single Gaussian state \(z_t\) with no drift drives every discount factor. Let

\[H(t) = \frac{e^{-aT^*} - e^{-at}}{a},\]
(16.2)
\[\zeta(t) = \int_0^t e^{2as} \sigma(s)^2\, ds = \sum_k \sigma_k^2 \frac{e^{2a t_{k+1}} - e^{2a t_k}}{2a},\]
(16.3)

where the sum runs over the intervals \([t_k, t_{k+1}]\) of constant volatility \(\sigma_k\) up to \(t\) (the last one cut at \(t\)). Under the measure whose numeraire is \(N(t) = P(t,T^*)/P(0,T^*)\), the zero bond to \(T \ge t\) divided by the numeraire is

\[\frac{P(t,T)}{N(t)} = P(0,T)\, \exp\!\Bigl(-H(T)\, z_t - \tfrac12 H(T)^2 \zeta(t)\Bigr),\]
(16.4)

and the numeraire itself follows from \(P(t,t) = 1\):

\[\frac{1}{N(t)} = P(0,t)\, \exp\!\Bigl(-H(t)\, z_t - \tfrac12 H(t)^2 \zeta(t)\Bigr).\]
(16.5)

In words: every zero bond is today's discount factor times a lognormal factor whose mean is one, so the ratio in Equation (16.4) has expectation \(P(0,T)\) (it is a martingale) and today's curve is reproduced exactly at \(t = 0\). Dividing two such ratios gives the discount factor seen on a path, \(P(t,T) = \frac{P(0,T)}{P(0,t)} \exp(-(H(T)-H(t)) z_t - \frac12 (H(T)^2 - H(t)^2)\zeta(t))\).

Why this numeraire. Shifting \(H\) by a constant leaves every price unchanged but changes the numeraire; the shift that makes \(H(T^*) = 0\) makes the numeraire the zero bond to the horizon. The variance of a deflated value late in the simulation is then small, because \(H(T)\) is close to zero for every \(T\) near \(T^*\). Under the bank-account measure the numeraire's variance grows with time instead, and Monte Carlo errors with it.

Edge cases. \(a\) must be at least \(0.0001\): the Ho-Lee limit \(a = 0\) has \(H(t) = t - T^*\) and is not supported. Volatilities must be positive. Volatility step dates must be after the valuation date.

16.4 Simulation

The state has independent Gaussian increments, so it is drawn exactly from one grid time \(u\) to the next \(v\):

\[z_v = z_u + \sqrt{\zeta(v) - \zeta(u)}\ \varepsilon_1, \qquad \varepsilon_1 \sim N(0,1).\]
(16.6)

Overnight compounding on a path needs the integrated short rate. Differentiating \(-\ln P(t,T)\) at \(T = t\) gives \(r(t) = f(0,t) + e^{-at}\bigl(z_t + H(t)\zeta(t)\bigr)\) with \(f(0,t)\) today's instantaneous forward rate. Integrating over \([u, v]\) and by parts,

\[I(u,v) = \ln\frac{P(0,u)}{P(0,v)} + z_u\bigl(H(v) - H(u)\bigr) + Y + D(u,v), \qquad Y = \int_u^v \bigl(H(v) - H(w)\bigr)\, dz_w ,\]
(16.7)

where \(Y\) is Gaussian with mean zero and \(D(u,v) = \int_u^v e^{-as} H(s) \zeta(s)\,ds\) is deterministic. \(Y\) and the increment \(z_v - z_u\) are jointly Gaussian with

\[\operatorname{Var}(z_v - z_u) = \int_u^v \alpha^2, \quad \operatorname{Cov}(z_v - z_u, Y) = \int_u^v g\,\alpha^2, \quad \operatorname{Var}(Y) = \int_u^v g^2 \alpha^2,\]
(16.8)

with \(\alpha(w)^2 = e^{2aw}\sigma(w)^2\) and \(g(w) = H(v) - H(w) = (e^{-aw} - e^{-av})/a\). On a piece \([p, q]\) of constant volatility \(\sigma\) these integrals are \(\sigma^2 (e^{2aq} - e^{2ap})/(2a)\), \(\frac{\sigma^2}{a}\bigl[(e^{aq} - e^{ap})/a - e^{-av}(e^{2aq} - e^{2ap})/(2a)\bigr]\) and \(\frac{\sigma^2}{a^2}\bigl[(q - p) - 2e^{-av}(e^{aq} - e^{ap})/a + e^{-2av}(e^{2aq} - e^{2ap})/(2a)\bigr]\), and, writing \(\zeta(s) = c_0 + c_1 e^{2as}\) on the piece (\(c_1 = \sigma^2/(2a)\), \(c_0 = \zeta(p) - c_1 e^{2ap}\)),

\[D = \frac1a\Bigl[e^{-aT^*} c_0 \frac{e^{-ap} - e^{-aq}}{a} - c_0 \frac{e^{-2ap} - e^{-2aq}}{2a} + e^{-aT^*} c_1 \frac{e^{aq} - e^{ap}}{a} - c_1 (q - p)\Bigr].\]
(16.9)

A step that crosses a volatility step date is split there and the pieces are added. Each step then draws two independent normals: \(\varepsilon_1\) for the state and \(Y = \frac{\operatorname{Cov}}{\sqrt{\operatorname{Var}(z_v - z_u)}}\varepsilon_1 + \sqrt{\operatorname{Var}(Y) - \frac{\operatorname{Cov}^2}{\operatorname{Var}(z_v - z_u)}}\ \varepsilon_2\). Both the state and the integrated rate are therefore exact on any grid. As a check, the bank account \(e^{I(0,t)}\) is a traded asset, so \(E[e^{I(0,t)}/N(t)] = 1\); over one step from today this is the identity \(D(0,t) = H(t)\operatorname{Cov} - \frac12 \operatorname{Var}(Y)\), which the tests verify.

Random numbers. Uniform numbers come from the xoshiro256** generator (Blackman and Vigna, 2021), whose 256-bit state is filled by the SplitMix64 sequence from the seed and a stream number; each uniform \(u \in (0,1)\) is the top 53 bits of an output, centred in its interval of width \(2^{-53}\), and each normal is \(\Phi^{-1}(u)\) (Section 5.9). Samples come in blocks of 1,024; block \(b\) draws from stream \(b\), so the numbers are a function of the seed, the block size, the number of paths and the grid only. With antithetic pairs (the default) a sample is two paths, the second drawn with the opposite normals; the pair's average is one independent sample. Each stream is a separate SplitMix64 seed, not a jump ahead in one sequence: with a period of \(2^{256}-1\), two streams overlap with negligible probability, but not by construction.

Grid. The grid holds today, every exposure date, the fixing date of every term period fixed in the future, and the first and last day of the compounding of every overnight period on a path (Section 16.5).

16.5 Valuing a netting set on a path

On a path at exposure date \(t\), each leg is valued by its pricing view of Chapter 6 and Section 10.5, built with \(t\) as valuation date and today as the simulation start, on the following curves.

Path curves. The discount curve is the model's; a projection curve of index \(I\) keeps today's ratio to the discount curve (a deterministic basis):

\[P^{I}(t,T) = P(t,T)\, \frac{P^{I}(0,T)/P(0,T)}{P^{I}(0,t)/P(0,t)},\]
(16.10)

with \(P(t,T)\) the path's discount factor of Section 16.3.

Term rates fixed on the path. A period fixed on or after today and before \(t\) has the rate of its deposit \([s', e']\) with accrual \(\tau'\) seen on the path at its fixing date \(t_f\):

\[L = \frac{1}{\tau'}\left(\frac{P^{I}(t_f, s')}{P^{I}(t_f, e')} - 1\right).\]
(16.11)

A period fixed before today uses its published fixing; one fixed on \(t\) is projected on the path curve at \(t\), as the pricer projects a period fixed today.

Overnight compounding on the path. A period \([s, e]\) whose compounding runs between today and \(t\) compounds its published days before today (the factor \(K\)), then the path's realised compounding from its first unpublished day \(u\) to \(\min(e, t)\), then, if it is still running, the telescoping ratio to its end:

\[C = K\ \exp\!\bigl(I(u, \min(e,t))\bigr)\, \frac{P^{I}(0,u)/P(0,u)}{P^{I}(0,\min(e,t))/P(0,\min(e,t))}\ \frac{1}{P^{I}(t, e)}\Big|_{t < e}.\]
(16.12)

The exponential of the integrated short rate is continuous compounding of the simulated rate, against daily compounding in the contract; the difference is of the order of the square of a daily rate and is neglected. The Rate Cut-off Date (Section 6.6) is not applied to such a period. The period's value is then \(N\,(C - 1 + s\delta)\,P(t, p)\) as in Section 6.6, with payment date \(p\).

The netting set's value \(V(t)\) is the sum of the signed leg values (paid negative, received positive), and its deflated value is \(U(t) = V(t)/N(t)\) with \(1/N(t)\) from Equation (16.5). Cash flows paid on or before \(t\) are excluded, so a payment date shows the exposure after the payment. At \(t = 0\) the path curves are today's curves and nothing is fixed on the path, so \(V(0)\) is the pricer's value exactly.

16.6 Exposure measures

With \(U_m(t)\) the deflated value on path \(m\) of \(2M\) paths (antithetic) or \(M\) paths, the discounted expected exposure and expected negative exposure are the path averages

\[\mathrm{EE}_d(t) = E\bigl[\max(U(t), 0)\bigr], \qquad \mathrm{ENE}_d(t) = E\bigl[\min(U(t), 0)\bigr],\]
(16.13)

today's values of the positive and negative parts of \(V(t)\); their forward amounts are \(\mathrm{EE}(t) = \mathrm{EE}_d(t)/P(0,t)\) and \(\mathrm{ENE}(t) = \mathrm{ENE}_d(t)/P(0,t)\). Under the sign convention, \(\mathrm{EE} \ge 0\) is what the counterparty would owe us and \(\mathrm{ENE} \le 0\) what we would owe. As a check of the whole simulation,

\[E\bigl[U(t)\bigr] = \sum_{\text{cash flows paid after } t} \text{today's value},\]
(16.14)

because every deflated price is a martingale. The potential future exposure is a quantile of the exposure itself over all paths:

\[\mathrm{PFE}_q(t) = \text{the } q\text{-quantile of } \max(V_m(t), 0),\ V_m(t) = U_m(t)\,N_m(t),\]
(16.15)

with linear interpolation between order statistics and \(q = 97.5\%\) by default. It is taken under the simulation measure.

16.7 Counterparty credit

The counterparty's survival probability comes from a hazard rate that is constant between node dates \(T_1 < \dots < T_n\), the last rate continuing after \(T_n\):

\[S(t) = \exp\!\Bigl(-\int_0^t \lambda(s)\, ds\Bigr) = \exp\!\Bigl(-\sum_i \lambda_i \bigl(\min(t, T_i) - T_{i-1}\bigr)^+\Bigr),\]
(16.16)

with \(T_0 = 0\). The probability of a default in \((t_1, t_2]\) is \(S(t_1) - S(t_2)\). The hazard rates are bootstrapped from the counterparty's CDS quotes (Section 18.9). For a quick start, a flat hazard rate can also be implied from a flat credit spread \(s\) by the credit triangle

\[\lambda = \frac{s}{1 - R},\]
(16.17)

exact for a CDS paying its premium continuously. The recovery rate is the counterparty's, 40% by default.

16.8 CVA on the exposure dates

On the exposure dates \(0 = t_0 < t_1 < \dots < t_n\), Equation (16.1) is integrated by the trapezoid rule on the discounted expected exposure:

\[\mathrm{CVA} = \sum_{i=1}^{n} -(1 - R)\ \frac{\mathrm{EE}_d(t_{i-1}) + \mathrm{EE}_d(t_i)}{2}\ \bigl(S(t_{i-1}) - S(t_i)\bigr),\]
(16.18)

each term being the contribution of interval \(i\). The standard error applies the same weights to each independent sample's exposures \(e_{m}(t_i)\) (a path, or the average of an antithetic pair), giving sample CVAs \(c_m\) with mean \(\bar c\):

\[\mathrm{SE} = \sqrt{\frac{1}{M(M-1)} \sum_{m=1}^{M} (c_m - \bar c)^2},\]
(16.19)

and the same formula on \(e_m(t)\) gives the standard error of \(\mathrm{EE}_d(t)\). Averaging antithetic pairs before taking the error is what makes the samples independent.

Sensitivities to CDS quotes and recovery

When the survival curve is bootstrapped from the counterparty's CDS quotes \(q_1, \dots, q_K\) (Section 18.9), the CVA depends on them only through the weights of Equation (16.18), \(w_i = -\tfrac12 (1 - R)\bigl(S(t_{i-1}) - S(t_i)\bigr)\), because the exposures do not depend on the counterparty's credit (no wrong-way risk). Each weight's derivatives to the hazard rates come from one adjoint sweep, and the bootstrap's sensitivities (Equation (18.14), Equation (18.15)) carry them to the quotes and to the recovery rate, which moves in the loss given default and in the bootstrap alike, the quotes held:

\[\frac{\partial w_i}{\partial q_j} = \sum_k \frac{\partial w_i}{\partial \lambda_k}\,\frac{\partial \lambda_k}{\partial q_j}, \qquad \frac{d w_i}{d R} = \frac{\partial w_i}{\partial R} + \sum_k \frac{\partial w_i}{\partial \lambda_k}\,\frac{\partial \lambda_k}{\partial R}.\]
(16.20)

The sensitivities are then the CVA's sum with the weights replaced by their derivatives,

\[\frac{d\,\mathrm{CVA}}{dq_j} = \sum_{i=1}^{n} \frac{\partial w_i}{\partial q_j}\,\bigl(\mathrm{EE}_d(t_{i-1}) + \mathrm{EE}_d(t_i)\bigr), \qquad \mathrm{CS01}_j = 10^{-4}\,\frac{d\,\mathrm{CVA}}{dq_j},\]
(16.21)

and likewise for the recovery rate; the parallel CS01 uses \(\sum_j \partial w_i/\partial q_j\). Each is a weighted sum of the same exposures, so its standard error is Equation (16.19) with these weights. These are the exact derivatives of the simulated CVA, on the same paths: no bump, no second simulation. As spreads widen the CVA becomes a larger cost, so the parallel CS01 is negative; a single short quote can show a positive CS01, because raising it with the longer quotes held lowers the later hazard rates.

16.9 Calibration to swaptions and caplets

The model's mean reversion \(a\) and volatilities \(\sigma(t)\) are calibrated to the market, never typed in, for each netting set. The volatilities reprice at-the-money options one expiry at a time; the mean reversion is fitted to a second strip of options that the volatilities alone cannot explain.

Options in closed form

At an option's expiry \(t_e\) every cash flow of the underlying is a payment \(A\) at \(p\), known at \(t_e\), or a floating coupon on index \(I\) over \([s, e]\) with \(s \ge t_e\). With today's basis between the projection and discount curves held, as on the paths (Equation (16.10)), and Equation (16.4), the underlying divided by the numeraire is a sum of exponentials of the state:

\[U(z) = \sum_k c_k\, e^{-h_k z - q_k \zeta}, \qquad \zeta = \zeta(t_e),\]
(16.22)

where \(z = z_{t_e}\) is normal with mean 0 and variance \(\zeta\) under the model's measure, and each cash flow gives one or two terms:

\[\begin{aligned} \text{payment } A \text{ at } p:&\quad c = A\,P(0,p),\quad h = H(p),\quad q = \tfrac12 H(p)^2,\\ w\,\frac{P^{I}(t_e,s)}{P^{I}(t_e,e)} \text{ paid at } p:&\quad c = w\,\frac{P^{I}(0,s)}{P^{I}(0,e)}\,P(0,p),\quad h = H(s) + H(p) - H(e),\\ &\quad q = \tfrac12\bigl(H(s)^2 + H(p)^2 - H(e)^2\bigr). \end{aligned}\]
(16.23)

A term-rate coupon \(N\delta(L + m)\) with \(L = (P^{I}(t_e,s)/P^{I}(t_e,e) - 1)/\delta^{I}\) is the ratio term with \(w = N\delta/\delta^{I}\) plus the payment \(N\delta m - w\); a compounded overnight coupon is the ratio term with \(w = N\) plus the payment \(N\delta m - N\) (the rate cut-off ignored, as on the paths). A payer swaption is the floating terms less the fixed payments \(N\delta K\); a receiver the opposite. A caplet on a term rate fixing at \(t_e\) and paid at \(p\) is

\[N\delta\,(L + m - K)^{+} = \Bigl(w\,\frac{P^{I}(t_e,s)}{P^{I}(t_e,e)} + N\delta(m - K) - w\Bigr)^{+},\]
(16.24)

and a floorlet the negative inside the bracket. In plain words: every cash flow, seen at expiry, is today's value of that cash flow times a lognormal factor in the state.

\(U\) changes sign once, at the exercise boundary \(z^*\), found by Brent's method (Section 5.5) within 12 standard deviations of \(z\). Since \(E\bigl[e^{-hz}\mathbf{1}\{z > z^*\}\bigr] = e^{h^2\zeta/2}\,\Phi\bigl(-(z^* + h\zeta)/\sqrt{\zeta}\bigr)\), the option, bought, is worth

\[V = E\bigl[\max(U(z), 0)\bigr] = \sum_k c_k\, e^{(h_k^2/2 - q_k)\zeta}\, \Phi\bigl(\mp (z^* + h_k\zeta)/\sqrt{\zeta}\bigr),\]
(16.25)

with \(-\) when \(U\) is positive above \(z^*\) and \(+\) when it is positive below. With \(H\) increasing in \(t\), \(P(t,s)/P(t,e) \propto e^{(H(e) - H(s))z}\) grows with \(z\) for \(s < e\), so forward rates rise with \(z\) and a payer or a cap is exercised above the boundary; the code does not rely on this and reads the side from the sign of \(U\) at the ends of the search. The method assumes \(U\) changes sign at most once: true for a vanilla swap or caplet, whose cash flows all move together under one factor, and checked at the centre of the search when the ends agree. With no sign change within the search the option is exercised everywhere (\(V = E[U]\), the sum with \(\Phi = 1\)) or nowhere (\(V = 0\)). The boundary is held constant when the value is differentiated: \(U(z^*) = 0\), so moving it changes the integral only at second order (the envelope argument). The value is therefore generic over the number type, and AAD gives its derivatives to the curves and the model's parameters.

The payment terms have \(h^2/2 = q\), so their expectation is today's value of the payment. A ratio term's expectation differs from its forward value by the factor \(e^{(H(s) - H(e))(H(p) - H(e))\zeta}\), the convexity of a coupon paid at \(p\) rather than at its index end \(e\); it vanishes when \(p = e\) and is of the order of \(10^{-7}\) for a payment lag of two days. The exposure simulation values coupons in the same way, so the calibrated model is consistent with the paths it drives.

Volatilities: one expiry at a time

Let \(M\) be the netting set's last payment date in whole years from today (rounded to whole months first, at least 2). The calibration instruments are the co-terminal at-the-money payer swaptions \(k\mathrm{Y} \times (M-k)\mathrm{Y}\), \(k = 1, \dots, M-1\), of the index of the swap paying last, with expiries \(t_1 < \dots < t_{M-1}\) and strikes at their forward swap rates; their market prices come from the market's own swaption volatilities (Chapter 13), so a SABR cube prices them at its at-the-money point. The volatility is constant on \([t_{k-1}, t_k]\) (\(t_0 = 0\)), the last one also after \(t_{M-1}\), so an option expiring at \(t_k\) depends on \(\sigma\) only through \(\zeta(t_k)\). For a given \(a\), in turn for \(k = 1, \dots, M-1\), \(\zeta(t_k)\) is the root of \(V_k(\zeta) = V_k^{\text{market}}\) above \(\zeta(t_{k-1})\) (Brent; \(V_k\) rises with \(\zeta\)), and by Equation (16.3)

\[\sigma_k^2 = \frac{2a\,\bigl(\zeta(t_k) - \zeta(t_{k-1})\bigr)}{e^{2a t_k} - e^{2a t_{k-1}}}.\]
(16.26)

An option cheaper than the model at \(\zeta(t_{k-1})\) would need a negative variance: its step takes the minimum volatility \(10^{-8}\) (0.0001 bp), the model overprices it, and the calibration flags it.

When the market has no swaption volatilities for the index (SAR today), the instruments are the at-the-money caplets of a cap traded today ending \(M\) years later, all but the first, already fixed one; each step ends at a caplet's fixing date, and the mean reversion is the default.

Mean reversion: the second strip

The co-terminal strip is repriced exactly for any \(a\), so it says nothing about \(a\). The second strip, the one-year swaptions \(k\mathrm{Y} \times 1\mathrm{Y}\), \(k = 1, \dots, M-2\), expire on the same dates and so share \(\zeta(t_k)\), but their underlyings are shorter: the ratio of their volatilities to the co-terminal ones is what \(a\) governs. The mean reversion minimises the root mean square difference of normal volatilities over the second strip,

\[E(a) = \Bigl(\frac{1}{M-2} \sum_{k=1}^{M-2} \bigl(\sigma^{N,\text{model}}_k(a) - \sigma^{N,\text{market}}_k\bigr)^2\Bigr)^{1/2},\]
(16.27)

with the volatilities bootstrapped at each \(a\) tried: first on the grid 0.001, 0.0025, 0.005, 0.01, 0.02, 0.03, 0.05, 0.075, 0.1, 0.15, 0.2 and 0.3, then by golden-section search (Section 5.13) between the best grid point's neighbours. The default \(a = 3\%\) is kept when the second strip has fewer than two swaptions, or when \(E(0.03) - E(a) < 0.5\) bp: a gain that small is not evidence for another mean reversion, and the default is easier to compare. A mean reversion below 0.001 is not tried. The rule makes \(a\) jump between the default and the fitted value on a day the gain crosses 0.5 bp, and every volatility and the CVA with it, so a CVA is reported together with whether \(a\) was fitted. For vega, the mean reversion is held at its calibrated value and only the volatilities move.

Normal volatilities are the at-the-money Bachelier volatilities of the model's and the market's prices (Section 5.11). Every option is discounted on the default discount curve of the currency, as the paths are.

16.10 Worked example

A 5Y USD SOFR OIS traded on 2026-10-14, receiving 3.95% fixed on 10,000,000 (positive notional: receive fixed), on a SOFR curve with continuously compounded zero rates 3.8% (1Y), 4.0% (5Y) and 4.1% (10Y). Hull-White \(a = 3\%\), \(\sigma = 1\%\); 10,000 paths (5,000 antithetic pairs), seed 1. The counterparty has a flat hazard rate of 2% and recovers 40%. Exposure dates: today and each anniversary.

Date \(\mathrm{EE}_d\) SE \(\mathrm{EE}\) \(\mathrm{ENE}_d\) \(\mathrm{PFE}_{97.5\%}\) \(S\) Contribution
2026-10-14 0 0 0 -32,230 0 1.000000
2027-10-14 136,758 1,545 142,055 -168,690 782,284 0.980199 -812
2028-10-13 158,154 1,809 171,069 -202,720 937,749 0.960789 -1,717
2029-10-14 147,610 1,664 166,281 -180,449 897,009 0.941713 -1,750
2030-10-14 112,737 1,269 132,246 -134,216 699,429 0.923066 -1,456
2031-10-14 60,761 687 74,221 -71,274 380,821 0.904788 -951

The swap is worth \(-32{,}230\) today (the fixed rate is below par), so the exposure starts at zero; it peaks after two years and falls as cash flows are paid. The CVA is \(-6{,}687\) with a standard error of 59: for the first interval, \(-0.6 \times \frac{0 + 136{,}758}{2} \times (1 - 0.980199) = -812\). On the default grid (monthly plus every payment and fixing date, 71 dates) the CVA is \(-6{,}213\) (standard error 52): the annual grid misses the drops of exposure after each payment and the trapezoid rule over a year overstates the loss. The run takes about half a second on one core. These numbers come from the library itself.

On the dummy bank's survival curve instead (Section 18.13, bootstrapped here on this SOFR curve), the CVA on the annual grid is \(-5{,}844\) (standard error 53). Its CS01s per CDS quote (Equation (16.21)) are:

Quote 6M 1Y 2Y 3Y 4Y 5Y 7Y 10Y Parallel
CS01 2.17 6.90 1.95 -6.36 -20.45 -38.57 0 0 -54.37

with a standard error of 0.42 on the 5Y and 0.48 on the parallel CS01. The 7Y and 10Y quotes move no default probability before the swap's last payment on 2031-10-14, which is before the 5Y node on 2031-12-20. One percentage point more recovery, the quotes held, changes the CVA by \(+3.21\): the higher hazard rates nearly offset the smaller loss given default.

Calibration

A cube of normal swaption volatilities generated by the model itself, so the answer is known: the USD SOFR curve with zero rates 4.0% (1Y), 4.1% (5Y), 4.3% (10Y) and 4.5% (20Y) on 2026-10-15, \(a = 5\%\), and \(\sigma = 1.1\%\) to the 3Y expiry then \(0.8\%\); every 1Y to 9Y expiry and tenor at the money. The netting set ends 10 years out, so \(M = 10\).

Swaption Expiry Market \(\sigma^N\) \(\sigma_k\) at \(a = 5\%\) \(\sigma_k\) at \(a = 3\%\)
1Y x 9Y 2027-10-15 0.8980% 1.1000% 1.0062%
2Y x 8Y 2028-10-16 0.8950% 1.1000% 1.0026%
3Y x 7Y 2029-10-15 0.8934% 1.1000% 1.0007%
4Y x 6Y 2030-10-15 0.8300% 0.8000% 0.7067%
5Y x 5Y 2031-10-15 0.7911% 0.8000% 0.7095%
9Y x 1Y 2035-10-15 0.7197% 0.8000% 0.7284%

Both mean reversions reprice the co-terminal strip exactly. On the second strip the 1Y x 1Y market volatility is 1.0751%: \(a = 5\%\) gives 1.0751%, \(a = 3\%\) gives 1.0034%. \(E(0.03) = 4.37\) bp, so the fit is used; it lands on \(a = 5.00\%\) with \(E < 10^{-12}\) and the volatilities above, in about 0.1 s.

Reconnecting Connection paused Could not reconnect Could not resume Session expired

The connection to the server was lost. Trying to restore it. Next attempt in 0s. The connection was paused. It will resume on its own. The server did not answer. Your work is still here. The paused session could not be resumed. The server could not restore this session. Reloading will start a new one.

An unhandled error has occurred. Reload 🗙