calculate_ytm
Calculate the yield to maturity of a bond using its face value, coupon rate, market price, and years to maturity for precise investment analysis.
Instructions
Calculate Yield to Maturity — the internal rate of return of a bond. Uses Newton-Raphson iteration for precision.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| face_value | Yes | ||
| coupon_rate | Yes | ||
| market_price | Yes | ||
| coupon_frequency | No | ||
| years_to_maturity | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |