{"uid":"cap_nV5XPXaT1HbpON7CCDGkc","slug":"bond-price-yield-duration-calculator-3e139286","name":"Bond Price, Yield & Duration Calculator","description":"Clean price or yield-to-maturity plus current yield, Macaulay and modified duration and convexity from coupon, face, maturity and coupon frequency.","url":"https://api.24klabs.ai/api/bond-price-yield","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"ytm":{"type":"number"},"face":{"type":"number"},"frequency":{"type":"number"},"coupon_rate":{"type":"number"},"years_to_maturity":{"type":"number"}}},"responseSchema":{"type":"json","example":{"price":925.61,"current_yield":5.4,"modified_duration":7.66}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_YpC3CSYqJKJOJfJonX2Xq","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes clean bond price, yield-to-maturity, current yield, Macaulay duration, modified duration, and convexity from coupon rate, face value, maturity date, and coupon frequency.","exampleAgentPrompt":"Calculate the price, yield-to-maturity, Macaulay duration, modified duration, and convexity for a bond with a 5% annual coupon, $1000 face value, maturing in 10 years, with semi-annual coupon payments, priced at a 4.5% yield.","exampleUseCases":[{"title":"Pricing a Corporate Bond Portfolio","prompt":"I have a corporate bond with a 6% coupon, $1000 face value, 7 years to maturity, and semi-annual payments — can you calculate its clean price, YTM, and modified duration assuming a 5.8% market yield?"},{"title":"Interest Rate Sensitivity Analysis","prompt":"I want to know how sensitive my 30-year Treasury bond (3% coupon, $1000 face, annual payments) is to interest rate changes — give me the Macaulay duration, modified duration, and convexity."},{"title":"Current Yield vs YTM Comparison","prompt":"For a bond with a 4% annual coupon, $1000 face value, trading at $950 with 5 years left to maturity and annual payments, what's the current yield versus the yield-to-maturity?"}],"resultDescription":"Returns the clean bond price (or yield-to-maturity if price is provided as input), current yield, Macaulay duration, modified duration, and convexity — a complete set of fixed-income analytics for the specified bond parameters.","failureModes":["Invalid or negative coupon rate returns a validation error","Maturity date in the past or invalid date format causes a 400 error","Unsupported coupon frequency (e.g. not annual/semi-annual/quarterly/monthly) returns an error","Missing required fields (face value, maturity, coupon) cause a 422 unprocessable entity","Extreme or nonsensical yield values may cause computation failure or non-convergence"],"whenToPreferThis":"Choose this endpoint when you need a full suite of fixed-income analytics — price, yield, and duration measures — in a single call. Ideal for AI agents performing bond valuation, portfolio duration analysis, or interest rate risk assessment without maintaining financial math libraries. Particularly useful for standardized coupon bonds when you need both pricing and risk metrics simultaneously.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T19:02:13.542Z","isFirstParty":false}