bond_duration
Calculate Macaulay duration for bonds using cash flow timing and yield rates to measure interest rate sensitivity and manage portfolio risk.
Instructions
Calculate Macaulay duration for bond
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cashFlows | Yes | Array of [time, cashFlow] pairs | |
| yieldRate | Yes |
Input Schema (JSON Schema)
{
"properties": {
"cashFlows": {
"description": "Array of [time, cashFlow] pairs",
"items": {
"items": {
"type": "number"
},
"maxItems": 2,
"minItems": 2,
"type": "array"
},
"type": "array"
},
"yieldRate": {
"type": "number"
}
},
"required": [
"cashFlows",
"yieldRate"
],
"type": "object"
}