Estimates the percentage change in the price of individual bonds for a change in their yield, using a second-order Taylor series expansion that combines modified duration and convexity.

Modified duration alone only captures the first-order (linear) relationship between a bond’s price and its yield, which understates the price increase for a yield decrease and overstates the price decrease for a yield increase because the true price-yield relationship is curved (convex), not linear. Adding a convexity term corrects for this and produces a substantially more accurate estimate, especially for larger yield changes.

The formula is as follows:

\[\text{Modified Duration} = \operatorname{SUM}(t \cdot \operatorname{PV}(t)) / \text{Dirty Price} / (1 + \text{YTM} / 2),\;\; \text{see get\_duration}\] \[\text{Convexity} = (\text{Dirty Price} (\text{YTM} + 0.0001) + \text{Dirty Price} (\text{YTM} - 0.0001) - 2 \cdot \text{Dirty Price}) / (\text{Dirty Price} \cdot 0.0001 ^{2})\] \[\%\Delta \;\text{Price} \approx - \text{Modified Duration} \cdot \Delta y + 0.5 \cdot \text{Convexity} \cdot \Delta y ^{2}\]

Where YTM is the bond’s yield to maturity at its market price, compounded twice a year (see get_yield_to_maturity), Δy is the yield change (0.01 by default) and %ΔPrice is the change of the full (dirty) price as a decimal. The bonds are selected as in collect_bond_statistics. For terms of your own, use bond_model.get_taylor_price_change.

Also known as: duration-convexity approximation, second-order price approximation.

Taylor Series Price Change in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_taylor_price_change as shown below.

from financetoolkit import FixedIncome

fixedincome = FixedIncome()

price_changes = fixedincome.get_taylor_price_change(yield_change=0.01, date="2026-11-05")

price_changes[["Security Type", "Coupon", "Maturity", "Price", "Price Change"]]

Or, after setting up the Finance Toolkit MCP, ask:

How much would the benchmark 2- to 30-year US Treasuries lose if yields rose by 100 basis points from 5 November 2026?

Which returns:

  Security Type Coupon Maturity Price Price Change
91282CRU7 Note 0.0462 2028-10-31 100.312 -0.0186
91282CLR0 Note 0.0412 2029-10-31 98.875 -0.0273
91282CRT0 Note 0.0475 2031-10-31 100.688 -0.0428
91282CRV5 Note 0.0488 2033-10-31 101.062 -0.0567
91282CRF0 Note 0.0462 2036-08-15 98.4375 -0.0733
912810RU4 Bond 0.0288 2046-11-15 70.0312 -0.1242
912810UW6 Bond 0.0512 2056-08-15 98.125 -0.1321

Parameters

get_taylor_price_change accepts the following parameters.

ParameterTypeDescriptionExample
yield_changefloatThe change in the yield to maturity (decimal), negative for a fall. Defaults to 0.01.0.005
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
Share