Zero Coupon Gilts Convexity Calculator#

Zero Coupon Bond Convexity#

This section describes both public and private API for fift_analytics zero coupon bond convexity calculation.

All methods and functions described within this section are used to evaluate zero coupon bond convexity.

Convexity Zero-Coupon Bond#

[DMO Yield Curve Methodologies](https://www.dmo.gov.uk/media/nozauetl/yldcrv.pdf)

fift_analytics.gilts.zero_coupon.zc_convexity.calculate_zero_coupon_bond_convexity(time_to_maturity: float, annual_yield: float, compounding_frequency: int = 2) float#

Calculate the convexity of a zero-coupon bond using DMO-aligned methodology.

Parameters:
  • time_to_maturity (float) -- Time to maturity in years.

  • annual_yield (float) -- Yield-to-maturity as a decimal (e.g., 0.05 for 5%, -0.01 for -1%).

  • compounding_frequency (int) -- Number of compounding periods per year (default is 2 for semi-annual).

Returns:

Convexity of the zero-coupon bond.

Return type:

float

Example::
>>> calculate_zero_coupon_bond_convexity(5, 0.05)
26.455026455026455