Price a bond from its yield
price_from_yield_toolCalculate a fixed-coupon bond's clean and dirty price from a given yield to maturity, including accrued interest and day-count details. Solves bond pricing when the yield is known.
Instructions
Value a fixed-coupon bond at a given yield to maturity.
Returns clean and dirty price, accrued interest with the day counts behind it, and the consistency checks the valuation satisfies.
Use this when the yield is known and the price is wanted. For the reverse, use yield_from_price_tool.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ytm_pct | Yes | Nominal annual yield to maturity as a PERCENTAGE, compounded at the coupon frequency. Pass 4.6867 for 4.6867%. | |
| 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||