calculate_bond_duration
Calculate Macaulay Duration and Modified Duration to measure bond interest rate sensitivity and price change per yield change.
Instructions
Calculate Macaulay Duration and Modified Duration. Duration measures interest rate sensitivity of a bond. Modified Duration shows % price change per 1% yield change.
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>",
"ytm": "<ytm>",
"years_to_maturity": "<years_to_maturity>"
},
"name": "calculate_bond_duration"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ytm | Yes | ||
| face_value | Yes | ||
| coupon_rate | Yes | ||
| coupon_frequency | No | ||
| years_to_maturity | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |