Rate Shift Ladder

Calculates the parallel shift ladder of individual bonds on the Treasury zero-coupon curve: the profit or loss, per 100 of par, when the whole curve shifts up or down by each of a range of amounts, with the bond’s delta and gamma to the shift. Where duration and convexity extrapolate from today’s curve, the ladder reprices the bond at every shift, so it shows the full, asymmetric response to large moves.

The formula is as follows:

\[\operatorname{PV}(\Delta) = \sum(\operatorname{CF}(t) \cdot (1 + \text{Zero Rate}(t) + \Delta)^{- t})\] \[\operatorname{P\&L}(\Delta) = \operatorname{PV}(\Delta) - \operatorname{PV}(0)\] \[\Delta = \frac{\operatorname{PV}(+ h) - \operatorname{PV}(- h)}{2h}\] \[\Gamma = \frac{\operatorname{PV}(+ h) - 2 \cdot \operatorname{PV}(0) + \operatorname{PV}(- h)}{h^{2}}\]

Where CF(t) are the bond’s coupons (100 * Coupon / 2) and principal on its actual coupon dates, Zero Rate(t) is the Treasury zero-coupon curve of the price date (annually compounded, see get_zero_coupon_curve, interpolated linearly), so Δ shifts annually compounded zero rates, and h is 1 basis point. Delta and Gamma are per unit of rate, so P&L(Δ) ≈ Delta * Δ + \(0.5 \cdot \text{Gamma} \cdot \Delta^{2}\) with Δ as a decimal: a Delta of -700 loses 0.07 for a 1 basis point rise. The bonds are discounted on the Treasury curve without a spread and selected as in collect_bond_statistics; TIPS have no ladder on the nominal curve. For cash flows or a curve of your own, and the delta and gamma at every shift, use curve_risk_model.get_parallel_shift_ladder.

Also known as: parallel shift report, scenario ladder, PV ladder, dollar gamma.

Example

Install the Finance Toolkit with pip install financetoolkit -U, then call get_rate_shift_ladder:

from financetoolkit import FixedIncome

fixedincome = FixedIncome()

ladder = fixedincome.get_rate_shift_ladder(date="2026-11-05")

ladder[["Maturity", "-200bp", "-50bp", "+50bp", "+200bp", "Delta", "Gamma"]]

Or, with the Finance Toolkit MCP set up, ask an AI assistant such as Claude or ChatGPT:

How much would the benchmark 2- to 30-year US Treasuries gain or lose if yields moved by 50 or 200 basis points from 5 November 2026?

Which returns:

Parameters

get_rate_shift_ladder accepts the following parameters.

ParameterTypeDescriptionExample
shiftslist[float] | str | NoneThe parallel shifts (decimals), e.g. [-0.01, 0.01]; a shift of 0 (today’s curve, the P&L of which is 0) and repeated shifts are left out. Defaults to None, -200, -100, -50, -25, 25, 50, 100 and 200 basis points.None, -200, -100, -50, -25, 25, 50, 100 and 200 basis points
bondslist[str] | str | NoneCUSIPs or ISINs, see collect_bond_statistics. Defaults to None.None
issuerlist[str] | str | NonePart of an issuer’s name, such as “Apple”. Defaults to None.None
etfslist[str] | str | NoneThe bond ETFs to select bonds from, see get_bond_universe. Defaults to None.None
maturity_startstr | NoneThe earliest maturity (YYYY-MM-DD). Defaults to None.None
maturity_endstr | NoneThe latest maturity (YYYY-MM-DD). Defaults to None.None
datestr | NoneThe day of the Treasury prices (YYYY-MM-DD). Defaults to None, the latest day with prices."2025-03-31"
roundingint | NoneThe number of decimals to round the results to. Defaults to None, which uses the rounding of the class.2
show_columnsstr | list[str] | NoneThe columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column.None, which keeps every column

References

Share