A discount curve gives the value today of one unit of currency paid on a future date. This chapter defines the curve, how it is calibrated to the par rates of OIS swaps (the first curve: USD SOFR, from OIS swaps only), and how a trade's sensitivities to the market quotes are computed exactly through the implicit function theorem. OIS pricing is defined in Chapter 6; AAD and Brent's method in Chapter 5.
7.1 Notation
| Symbol | Meaning |
|---|---|
| \(v\) | The valuation date: time zero |
| \(t(d)\) | The curve time of date \(d\) |
| \(D_1 < \dots < D_n\) | Node dates, with times \(t_1 < \dots < t_n\) |
| \(z_k\) | Continuously compounded zero rate at node \(k\): the curve's parameters \(z\) |
| \(\ell_k\) | Log discount factor at node \(k\): \(\ell_k = -z_k t_k\), with \(\ell_0 = 0\) at \(t_0 = 0\) |
| \(P(d)\) | Discount factor for date \(d\) |
| \(q_i\) | Market quote (par rate) of calibration instrument \(i\) |
| \(R_i(z)\) | Par rate of instrument \(i\) on the curve with parameters \(z\) (Equation (6.7)) |
| \(A\) | Jacobian \(\partial R / \partial z\) at the calibrated curve |
| \(V\) | Value of a trade |
7.2 The curve
Time is measured from the valuation date with Actual/365 (Fixed):
Nodes. The curve is defined by node values \(y_k\) at node dates \(D_k\), all after the valuation date, together with a curve style that says what the values are and how they are joined. The style has four parts, chosen separately when the curve is built:
- the trait, the quantity the nodes hold and the interpolation acts on: the log discount factor \(\ell = \ln P\) (nodes stored as the continuously compounded zero rate \(z_k\), with \(\ell_k = -z_k t_k\)), the zero rate \(z\) itself, or a simple Act/360 zero rate (Section 7.7);
- the interpolation method on that quantity, one of the family of Section 5.6: linear, cubic Hermite with the natural, parabolic, Kruger or Fritsch–Butland slopes and an optional monotonicity filter, or monotone convex (Section 7.8), which is allowed on the log discount trait only, since it integrates a rate;
- the extrapolation policy of the interpolator (flat, linear, or none);
- the node placement of a calibration instrument, at its last payment date or at its maturity date (Section 7.3, Section 7.7).
Whatever the trait, the curve answers the discount factor \(P(d) = \exp \ell(t(d))\), with \(\ell = -z\,t\) for a zero rate trait, and the zero rate \(-\ln P(d)/t(d)\). The default style, log-linear discount, is the log discount trait with linear interpolation and linear extrapolation, and the rest of this section states it; \(\ell_0 = 0\) at \(t_0 = 0\), since \(P(v) = 1\).
Interpolation. Under the default style the log discount factor is linear between nodes (Equation (5.4)), so the discount factor is log-linear and the forward rate is constant between nodes:
Extrapolation. Beyond the last node, the last forward rate continues:
with \(\ell_{n-1} = 0\) and \(t_{n-1} = 0\) when there is a single node. A date before the valuation date is an error.
The curve is generic over the number type, so its node values can be recorded on an AAD tape. A curve whose interpolation is local (linear, nodes at the last payment date) is bootstrapped node by node; any other style is solved on every node at once (Section 7.3).
7.3 Calibration: the bootstrap
The curve is calibrated to the quoted par rates \(q_1, \dots, q_n\) of spot-starting OIS of increasing tenors, traded on the valuation date under one convention (Section 6.4): it must satisfy
One node per instrument, at the instrument's last payment date: that is the furthest date its value depends on. With the local interpolation of Equation (7.2), instrument \(i\) then depends only on \(z_1, \dots, z_i\), so the equations are solved one after another in maturity order: \(z_i\) is the root of \(R_i(z_1, \dots, z_{i-1}, z_i) - q_i\), found by Brent's method (Section 5.5) in \([-100\%, 100\%]\) to a tolerance of \(10^{-14}\). The instruments' last payment dates must be strictly increasing. Calibration instruments start at spot, so they need no fixings.
7.4 Market-quote risk by the implicit function theorem
At the calibrated parameters \(z^*\), the Jacobian
is computed exactly by AAD: the par rates of all instruments are recorded once on a tape, and one adjoint sweep per instrument gives a row of \(A\). It is lower triangular here, because instrument \(i\) depends only on the first \(i\) nodes. By the implicit function theorem applied to Equation (7.4), the sensitivities of the parameters to the quotes are
computed once at calibration (Section 7.5) and stored with the curve. For any trade, the sensitivities to the zero rates, \(\partial V/\partial z\), come from one AAD recording and one sweep, and the market-quote risk is
AAD never runs through the solver's iterations, and the Jacobian is evaluated at the converged solution. A calibration instrument priced on the curve has a par-rate sensitivity of exactly 1 to its own quote and 0 to the others, which the tests check.
7.5 Linear systems
\(A^{-1}\) is computed from the LU decomposition with partial pivoting \(\Pi A = L U\): \(L\) is lower triangular with a unit diagonal, \(U\) upper triangular, and \(\Pi\) a row permutation chosen so that each pivot is the largest remaining entry of its column. \(A x = b\) is solved by forward substitution in \(L\) and back substitution in \(U\); the inverse is solved column by column. A matrix whose pivot is below \(10^{-14}\) times its largest entry is treated as singular, which is an error.
7.6 Worked examples
Curve. Nodes at 1 and 2 years (365 and 730 days) with zero rates 4% and 5%: \(P = e^{-0.04}\) at one year and \(e^{-0.10}\) at two; at 547 days, \(\ln P = -0.04 - 0.06 \times 182/365\) (forward rate 6% between the nodes); at three years, \(\ln P = -0.10 - 0.06 = -0.16\) by Equation (7.3).
Bootstrap. USD-SOFR-OIS on Wednesday 14-Oct-2026 with par rates 1Y 3.90%, 2Y 3.70%, 5Y 3.50%:
| Tenor | Node (last payment) | \(t\) | Zero rate | Discount factor |
|---|---|---|---|---|
| 1Y | 20-Oct-2027 | 1.016438 | 3.877584% | 0.961353 |
| 2Y | 18-Oct-2028 | 2.013699 | 3.678942% | 0.928595 |
| 5Y | 20-Oct-2031 | 5.019178 | 3.478704% | 0.839791 |
with
A 5Y swap receiving 3.50% on 10 million is at par on this curve (value 0), and its market-quote risk is about \(-4{,}562\) per basis point on the 5Y quote and zero on the others.
7.7 Simple-rate reconciliation method
For reconciliation with an independent reference system only, the curve can also be built with the piecewise linear interpolation of simple zero rates that such systems offer. The library's own method above remains the default.
Curve. The nodes are at the instruments' maturities (adjusted end dates), and the node parameters are simple Act/360 zero rates \(r_k\), interpolated linearly in Act/360 time \(s(d) = (d - v)/360\) and held flat before the first node and after the last:
with \(w = (s - s_k)/(s_{k+1} - s_k)\). Zero rates are still reported continuously compounded on Act/365 (Fixed), \(-\ln P(d)/t(d)\).
Calibration. With the payment lag, an instrument's last payment falls after its own node, where the curve depends on the next node. The equations Equation (7.4) are therefore solved together, by Newton's method: starting from \(r^{(0)} = q\), each step records the par rates and their Jacobian \(A^{(m)} = \partial R / \partial r\) at the current nodes by AAD (Equation (7.5)) and solves the linear system
by LU decomposition (Section 7.5), until every repriced par rate is within \(10^{-12}\) of its quote, or no node moves by more than \(10^{-13}\) (at most 50 steps; in practice 3 to 5). A failure reports the instrument furthest from its quote. In words: the system is replaced by its linear approximation at the current nodes, solved exactly, and the approximation is refreshed. Market-quote risk follows Section 7.4 unchanged; the Jacobian is then not triangular.
Reconciliation. On a USD SOFR curve snapshot from an independent reference system (mid, settle 11-Oct-2026, 32 instruments from 1W to 50Y), the library matches the reference zero rates to within 0.003 basis points and the discount factors to 6 decimals at all 32 tenors. The 18M maturity, Good Friday 14-Apr-2028, is a Federal Reserve business day, so it matched only once dates followed the New York Fed calendar (Section 2.10).
7.8 Monotone-convex interpolation
The log-linear curve of Section 7.2 has piecewise-flat forward rates, which jump at every node. The monotone-convex method of Hagan and West (Interpolation Methods for Curve Construction, Applied Mathematical Finance 13(2), 2006) keeps the same node parameters \(z_k\) but draws a continuous instantaneous forward curve \(f(t)\) through them. It has three properties:
- Exact. The average of \(f\) over each interval \([t_{k-1}, t_k]\) is that interval's discrete forward rate, so every node's zero rate is reproduced.
- Continuous. \(f\) has no jumps at the nodes.
- Monotone. Where the discrete forwards increase (or decrease), \(f\) increases (or decreases) too; it adds no spurious wiggles.
Discrete and node forwards. With \(\tau_k = t_k - t_{k-1}\) (\(t_0 = 0\)), the discrete forward rate of interval \(k\), and the forward \(f_k\) placed at each node, are
with \(z_0 t_0 = 0\). In words: an interior node takes a weighted average of the two neighbouring discrete forwards, the nearer interval weighing less. The two ends are extended so that the end interval's average is preserved: \(f_0 = f^d_1 - \tfrac12 (f_1 - f^d_1)\) and \(f_n = f^d_n - \tfrac12 (f_{n-1} - f^d_n)\). With a single node, \(f_0 = f_1 = f^d_1\) and the curve is flat.
Shape of each interval. On interval \(k\) write \(x = (t - t_{k-1})/\tau_k \in [0, 1]\) and \(f(t) = f^d_k + g(x)\), where \(g\) is the deviation from the discrete forward, with end values \(g_0 = f_{k-1} - f^d_k\) and \(g_1 = f_k - f^d_k\). Exactness requires \(\int_0^1 g(x)\,dx = 0\). Depending on \((g_0, g_1)\), \(g\) is one of four shapes:
with, in (iv), \(\eta = g_1/(g_0 + g_1)\) and \(A = -g_0 g_1/(g_0 + g_1)\). In words: (i) is a quadratic when the end values balance; (ii) and (iii) hold the forward flat on part of the interval and bend it on the rest, so that it does not overshoot; (iv) is the interval of a local peak or trough, where \(f\) dips to \(A\) and comes back.
Discount factors. Integrating, with \(G(x) = \int_0^x g(u)\,du\) in closed form for each shape,
Beyond the last node the node forward \(f_n\) continues, so \(f\) stays continuous there too.
Generic form. The method does not depend on rates: given node values \(y_k\) that are the integrals of some rate (here \(y_k = \ell_k = -z_k t_k\)), it interpolates \(y\) with a continuous derivative whose average over each interval is the interval's secant slope. The library implements it in that form in Section 5.6, with the derivative exposed; the curve reads \(\ln P = y\) and \(f = -y'\), and the linear extrapolation policy is the second line of Equation (7.12).
Choices and edge cases.
- Shapes chosen from values. Kernel code generic over the number type must not branch on values (Section 7.2). Which shape applies, and whether \(x\) is before \(\eta\), are therefore decided from the plain values when the curve is built and frozen; the formulas inside the chosen shape are then evaluated in the number type. Derivatives (AAD, the implicit function theorem) are those of the frozen shape. They are exact except exactly on a shape boundary, where \(g\) is still continuous but the derivative of the shape choice is ignored; a bump that crosses a boundary sees the other shape.
- No positivity adjustment. Hagan and West add an optional collar that keeps forwards positive. It is not applied: negative rates are legitimate.
- Calibration. A node's forward \(f_k\) depends on both neighbouring intervals, so swap \(i\) depends on node \(i+1\) as well. The calibration is solved by Newton's method (Equation (7.9)), starting from \(z_k = q_k\), with nodes at the last payment dates as in Section 7.3. The shapes are chosen afresh at each step.
Worked example. Nodes at \(t = 1, 2, 3\) with zero rates 3%, 4% and 4.5%. The discrete forwards are 3%, 5% and 5.5%, the node forwards \(f_0 = 2.5\%\), \(f_1 = 4\%\), \(f_2 = 5.25\%\) and \(f_3 = 5.625\%\). On the second interval \(g_0 = -1\%\) and \(g_1 = 0.25\%\), shape (iii) with \(\eta = 0.6\). At \(t = 1.5\) (\(x = 0.5\)), \(G(0.5) = -0.0012384259\), so \(\ln P(1.5) = -(0.03 + 0.025 - 0.0012384259) = -0.0537615741\): a zero rate of 3.584105%, against 3.666667% on the log-linear curve. The forward there is 5.215278%.
7.9 Zero spread and total delta
A zero spread \(s\) adds the same continuously compounded rate to the zero
rate of every date, whatever the interpolation (the equivalent of QuantLib's
ZeroSpreadedTermStructure):
with \(t(d)\) the curve time of Equation (7.1) and \(z(d) = -\ln P(d)/t(d)\). In words: every discount factor is multiplied by the discount factor of a flat curve at rate \(s\). On the log-linear and monotone-convex curves this is exactly the same as adding \(s\) to every node's zero rate \(z_k\), because both are built from \(\ln P\) at the nodes and a constant shift of the forward rates passes through unchanged. On the simple-rate curve (Section 7.7) the nodes are simple rates, so the spread is not a node shift there.
The total delta of a trade is its first-order value change for a 1 basis point zero spread,
computed by AAD with \(s\) recorded as an input. It differs from the sum of the market-quote deltas (Equation (7.7) times \(10^{-4}\)), which shifts the par quotes rather than the zero rates; the two are close but not equal.
7.10 Forward rates
The simple forward rate between two dates \(s < e\) for the accrual fraction \(\delta(s, e)\) of a day count (Chapter 3) is the rate that, applied simply over the period, reproduces the ratio of discount factors:
In words: investing \(P(e)/P(s)\) at \(s\) returns 1 at \(e\), so the simple rate earned is the excess of \(P(s)/P(e)\) over 1 per unit of accrual. With the Act/360 day count this is the forward rate quoted for a money-market period, and the one-day forward rate of the rate cut-off (Section 6.6).