bond_duration
Calculate Macaulay duration to measure bond price sensitivity to interest rate changes using cash flows and yield rate inputs.
Instructions
Calculate Macaulay duration for bond
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": {
"cashFlows": "<cashFlows>",
"yieldRate": "<yieldRate>"
},
"name": "bond_duration"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cashFlows | Yes | Array of [time, cashFlow] pairs | |
| yieldRate | Yes |