credit-spread-measureslisted
Install: claude install-skill howard-lynn-ye/fin-skills
# Credit spread measures
**Six numbers on one bond are all called "the spread", and a quote almost never says which.**
They differ by a *reference curve*, not by a credit view: G against one point of the government
par curve, I against one point of the swap curve, Z against the whole zero curve, ASW against the
swap annuity, DM against a projected index, OAS against a lattice you had to pick a volatility
for. Nothing raises when you compare two of them.
Every figure below is printed by `scripts/spreads.py` (runs in **0.9 s**; QuantLib optional,
imported inside `quantlib_cross_check`). ✅ Measured means this file produced it on 2026-09-09
with QuantLib 1.43, numpy 2.2.6, scipy 1.13.0, Python 3.11.3.
> **The rule:** a spread is a **pair** — the number and the curve it was measured against.
> "YTM minus the government **zero** rate" is not the G-spread, and a **Z-spread on a callable
> bond is not an OAS**.
## 1. ✅ One bond, six spreads
A 5-year 3% annual-coupon corporate on a steep government zero curve
(**3.00 / 3.50 / 4.00 / 4.50 / 5.00%** at 1–5y, annual compounding), priced at a **150 bp
Z-spread**. Swap zeros are the same curve plus a widening 10 → 26 bp swap spread.
✅ Measured: **price 85.700750, YTM 6.434845%**, government 5y **zero 5.000000%** but 5y
**par 4.902625%**, swap 5y par 5.149527%.
| measure | ✅ bp | measured against |
|---|---|---|
| **G-spread** (YTM − govt **par**) | **153.22** | one point of the government par curve |
| 🚨 **"YTM − govt ZERO"** | **14