Reprice after a parallel yield shift
scenario_shock_toolCheck if a bond's duration is accurate by comparing exact repricing under a yield shock against first- and second-order approximations.
Instructions
Compare an exact repricing against first- and second-order estimates.
residual_bp is the genuine third-and-higher-order term. For a short bond
and a 100 bp move it is a fraction of a basis point. A residual of several
basis points means the duration is wrong, not that the Taylor expansion
was truncated — a distinction worth making explicitly, because attributing
such a gap to higher-order terms is a common and confident mistake.
Supply either a price or a yield, not both.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ytm_pct | No | Nominal annual yield as a percentage, e.g. 4.6867. Supply either this or clean_price_pct_of_face, never both. | |
| shock_bp | Yes | Parallel shift in the yield curve, in BASIS POINTS. Positive is a rise. Pass 100 for a one-percentage-point rise. | |
| 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 | No | Quoted clean price as a percentage of face, e.g. 97.80. Supply either this or ytm_pct, never both. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||