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:
| Item | Maturity | -200bp | -50bp | +50bp | +200bp | Delta | Gamma |
|---|---|---|---|---|---|---|---|
| 91282CRU7 | 2028-10-31 | 3.7943 | 0.9284 | -0.9153 | -3.5854 | -184.360 | 521.782 |
| 91282CLR0 | 2029-10-31 | 5.5767 | 1.3548 | -1.3296 | -5.1732 | -268.428 | 1,007.800 |
| 91282CRT0 | 2031-10-31 | 9.1613 | 2.1953 | -2.1354 | -8.2008 | -433.002 | 2,397.280 |
| 91282CRV5 | 2033-10-31 | 12.4756 | 2.9498 | -2.8448 | -10.7910 | -579.318 | 4,200.650 |
| 91282CRF0 | 2036-08-15 | 16.4436 | 3.8178 | -3.6394 | -13.5790 | -745.400 | 7,130.760 |
| 912810RU4 | 2046-11-15 | 22.4745 | 4.8882 | -4.4764 | -15.7994 | -935.114 | 16,459.800 |
| 912810UW6 | 2056-08-15 | 35.7437 | 7.4714 | -6.6913 | -22.9696 | -1,412.900 | 31,157.500 |
7 rows
Parameters
get_rate_shift_ladder accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
shifts | list[float] | str | None | The 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 |
bonds | list[str] | str | None | CUSIPs or ISINs, see collect_bond_statistics. Defaults to None. | None |
issuer | list[str] | str | None | Part of an issuer’s name, such as “Apple”. Defaults to None. | None |
etfs | list[str] | str | None | The bond ETFs to select bonds from, see get_bond_universe. Defaults to None. | None |
maturity_start | str | None | The earliest maturity (YYYY-MM-DD). Defaults to None. | None |
maturity_end | str | None | The latest maturity (YYYY-MM-DD). Defaults to None. | None |
date | str | None | The day of the Treasury prices (YYYY-MM-DD). Defaults to None, the latest day with prices. | "2025-03-31" |
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the rounding of the class. | 2 |
show_columns | str | list[str] | None | The 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
- Library Shares similar logic as FinancePy’s parallel_shift_ladder_report