calculate_ytm
Calculate the yield to maturity of a bond using its face value, coupon rate, market price, and years to maturity for precise investment analysis.
Instructions
Calculate Yield to Maturity — the internal rate of return of a bond. Uses Newton-Raphson iteration for precision.
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": {
"face_value": "<face_value>",
"coupon_rate": "<coupon_rate>",
"market_price": "<market_price>",
"years_to_maturity": "<years_to_maturity>"
},
"name": "calculate_ytm"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| face_value | Yes | ||
| coupon_rate | Yes | ||
| market_price | Yes | ||
| coupon_frequency | No | ||
| years_to_maturity | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |