fixed-income_bond
Compute bond price, yield, duration, convexity, and accrued interest. Input face value, coupon rate, maturity, and yield or price to get key fixed-income risk metrics.
Instructions
Bond price, Macaulay/modified duration, convexity, DV01.
Use when pricing a bond or computing yield, duration, and convexity. Provide face value, coupon rate, maturity, and yield or price. Returns: bond price (or yield), Macaulay duration, modified duration, convexity, and accrued interest.
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": {
"coupon_rate": "<coupon_rate>",
"ytm": "<ytm>",
"years": "<years>"
},
"name": "fixed-income_bond"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ytm | Yes | Yield to maturity (annualized) | |
| face | No | Face/par value of the bond | |
| years | Yes | Years to maturity | |
| frequency | No | Coupon payments per year | |
| coupon_rate | Yes | Annual coupon rate (e.g. 0.05 = 5%) |