Bond Price
workflow.run_bond_pricePrice of a plain fixed-rate bond on a coupon date, with Macaulay duration, modified duration, convexity and DV01. Price = sum of the coupons and the face value discounted at the yield per period (yield / frequency), clean price, no accrued interest, so years x frequency must be a whole number of coupon periods. The yield is the nominal yearly yield to maturity compounded frequency times a year (the bond-market convention). Durations are in years, convexity in years squared. DV01 is the price fall for one basis point of yield, a positive number, the slope at the current yield and not a repricing. It does not include credit risk, call features, taxes or the day-count of a real settlement date. Edge cases: faceValue above zero and at most 1e12 (default 1000); couponRate 0 to 1 as a fraction; yieldRate -1 to 100 with the rate per period above -100%; years above zero and at most 100; frequency a whole number 1 to 12 (default 2); years times frequency must be a whole number of coupon periods. Not covered: accrued interest and a settlement date between coupons, credit risk, call and put features, floating coupons, taxes, and the day-count convention. Use when user asks "what is a 5-year 5% coupon bond worth at a 6% yield?" or "what is the duration and DV01 of this bond?". Returns: price, pricePctOfFace, status (premium, par, discount), pvOfCoupons, pvOfFace, couponPerPeriod, periods, yieldPerPeriod, currentYield, macaulayDuration, modifiedDuration, convexity, dv01.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"couponRate": "<couponRate>",
"yieldRate": "<yieldRate>",
"years": "<years>"
},
"name": "workflow.run_bond_price"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| years | Yes | Years to maturity, above 0 and at most 100; years x frequency must be a whole number (5 years semiannual is 10 coupons) | |
| faceValue | No | Face (par) value repaid at maturity, above 0 (default 1000) | |
| frequency | No | Coupon payments a year, 1 to 12 (default 2: semiannual; 1 annual, 4 quarterly, 12 monthly) | |
| yieldRate | Yes | Nominal yearly yield to maturity as a fraction (0.06 = 6%), compounded frequency times a year; yield / frequency must be above -1 | |
| couponRate | Yes | Annual coupon rate as a fraction of face value (0.05 = 5%), 0 to 1; 0 is a zero-coupon bond |