calculate_bond_price
Calculates bond price by discounting coupon payments and face value using yield to maturity. Supports annual, semi-annual, or quarterly coupons.
Instructions
Calculate bond price using DCF of coupon payments and face value. Price = Σ[C/(1+r)^t] + FV/(1+r)^n. coupon_frequency: 1=annual, 2=semi-annual, 4=quarterly.
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 |