Solve a bond's yield from its price
yield_from_price_toolSolve for the yield to maturity implied by a bond's quoted market price. Use when you have a price and need the derived yield, with built-in checks validating the result.
Instructions
Solve for the yield to maturity implied by a market price.
Solved by bisection, which cannot converge on a value that satisfies the iteration without solving the pricing equation. The returned checks verify the ordering of coupon, current yield and yield to maturity, which alone rules out a large class of wrong answers.
This is the usual starting point: market prices are observable, yields are derived.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| day_count | No | Day-count convention used for accrual. ACT/ACT ICMA is the standard for most government and corporate bonds. | ACT/ACT ICMA |
| face_value | Yes | Redemption amount in currency units, e.g. 1000. | |
| issue_date | Yes | Issue (dated) date in ISO format, e.g. 2024-03-15. | |
| maturity_date | Yes | Redemption date in ISO format, e.g. 2029-03-15. | |
| coupon_rate_pct | Yes | Annual coupon rate as a PERCENTAGE. Pass 4.0 for a 4% coupon, not 0.04. Zero for a zero-coupon bond. | |
| settlement_date | Yes | Valuation date in ISO format. Must fall between issue and maturity, e.g. 2025-09-11. | |
| payments_per_year | Yes | Coupon payments per year: 1 annual, 2 semi-annual, 4 quarterly, 12 monthly. Most government bonds pay semi-annually. | |
| clean_price_pct_of_face | Yes | Quoted clean price as a PERCENTAGE OF FACE, excluding accrued interest. Pass 97.80 for a bond quoted at 97.80%. This is not a currency amount. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||