Taylor Series Price Change
Estimates the percentage change in a bond’s price for a given change in 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.
This method calls get_modified_duration and get_convexity from bond_model.py directly rather than recomputing them.
The Taylor approximation is calculated using the following formula:
\[\%\Delta \text{Price} \approx - \text{Modified Duration} \cdot \Delta y + 0.5 \cdot \text{Convexity} \cdot \Delta y ^{2}\]Also known as: duration-convexity approximation, second-order price approximation.
No programming experience? With the Finance Toolkit MCP server, AI assistants such as Claude and ChatGPT can calculate the Taylor Series Price Change for you. Just ask in plain English.
Calculate the Taylor Series Price Change in Python
The Taylor Series Price Change is available in the Fixed Income module of the open-source Finance Toolkit. Install it with:
pip install financetoolkit -U
Then call get_taylor_price_change as shown below.
from financetoolkit import FixedIncome
fixedincome = FixedIncome()
fixedincome.get_taylor_price_change(
coupon_rate=[0.03, 0.05, 0.07],
years_to_maturity=[5, 10, 15],
yield_to_maturity=0.08,
yield_change=0.01,
show_input_info=False,
)
Which returns:
| Coupon Rate | 5 | 10 | 15 |
|---|---|---|---|
| 0.03 | -0.0421 | -0.0744 | -0.097 |
| 0.05 | -0.0407 | -0.0693 | -0.088 |
| 0.07 | -0.0394 | -0.0656 | -0.0824 |
Parameters
get_taylor_price_change accepts the following parameters:
- par_value (float, optional): The par value (face value) of the bond. Defaults to 100.
- coupon_rate (float, optional): The coupon rate of the bond. If not provided, a range of coupon rates will be used.
- years_to_maturity (float, optional): The years to maturity of the bond in years. If not provided, a range of years to maturity will be used.
- yield_to_maturity (float, optional): The current yield to maturity of the bond. Defaults to 0.08.
- frequency (int, optional): The number of coupon payments per year. Defaults to 1.
- yield_change (float, optional): The hypothetical change in yield to maturity, e.g. 0.01 for a 100 basis point increase. Defaults to 0.01.
- show_input_info (bool, optional): Whether to display input information. Defaults to True.
Related Bond Valuations
The Fixed Income module page introduces the module, and the sidebar lists all of its functions.