---
title: "Bond Macaulay / Modified Duration"
method: POST
path: "/v1/tools/compute_bond_duration"
tags: ["TODO_TAGS_REVIEW"]
---

# Bond Macaulay / Modified Duration

`POST /v1/tools/compute_bond_duration`

## Request

- Base URL: `https://ainumbers.co`
- URL: `https://ainumbers.co/v1/tools/compute_bond_duration`
- Auth: none declared

Macaulay and modified duration for a standard even-period bullet bond, given face value, coupon rate, yield to maturity, years to maturity, and compounding frequency. Prices the schedule and reports the PV-weighted average time to cash flows in years. Feeds compute_dv01 and compute_convexity for full fixed-income risk analytics.

**Tool URL:** https://ainumbers.co/chaingraph/art-329-tvm-bond-duration.html
**AP2/Policy Mandate export:** yes

## Request body

- object
  - `coupon_rate_pct` number: Percentage value
  - `day_count_convention` unknown, required
  - `face_value` number
  - `periods_per_year` number
  - `years_to_maturity` number
  - `ytm_pct` number: Percentage value

## Response `200`

Successful tool execution result

- object
  - `coupon_rate_pct` integer
  - `day_count_convention` string
  - `face_value` integer
  - `macaulay_duration_years` number
  - `modified_duration_years` number
  - `note` string
  - `num_periods` integer
  - `periods_per_year` integer
  - `price` number
  - `regulatory_basis` string
  - `years_to_maturity` integer
  - `ytm_pct` integer

---

[API](https://skmtc.dev/ainumbers/apis/ainumbers-co-fintech-intelligence-suite.md) · [All operations](https://skmtc.dev/ainumbers/apis/ainumbers-co-fintech-intelligence-suite/llms.txt) · [OpenAPI document](https://skmtc.dev/ainumbers/apis/ainumbers-co-fintech-intelligence-suite/revisions/b462e4f5bb28?raw)
