bond_yield
Compute bond yield to maturity and current yield using face value, price, coupon rate, and years to maturity.
Instructions
Calculate bond yield to maturity and current yield.
Parameters:
face_value — Bond face/par value.
price — Current market price.
coupon_rate — Annual coupon rate (e.g. 5.0 for 5%).
years_to_maturity — Years until bond matures.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| face_value | Yes | ||
| price | Yes | ||
| coupon_rate | Yes | ||
| years_to_maturity | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |