Calculate the convexity of a bond - the second derivative of bond price with respect to yield. Convexity measures the curvature of the price-yield relationship and captures the error in duration-based price estimates. Positive convexity is desirable as it means price increases more when yields fall than price decreases when yields rise by the same amount. Used for second-order hedging and portfolio optimization.
API key for authentication. Get your key at https://finceptbackend.share.zrok.io/auth/register
Annual coupon rate as a decimal
0.06
Time to maturity in years
10
Yield to maturity as a decimal
0.05
Face value of the bond
100
Coupon payment frequency per year
1, 2, 4, 12 2