# Difference of bond spread definitions

**URL:** <https://quantlab.discourse.group/t/difference-of-bond-spread-definitions/108>\
**Category:** Qlang Financial Libraries\
**Created:** [April 27, 2025, 12:50pm UTC](https://quantlab.discourse.group/t/difference-of-bond-spread-definitions/108 "2025-04-27T12:50:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![QuantBob](https://yyz1.discourse-cdn.com/flex003/user_avatar/quantlab.discourse.group/quantbob/32/9_2.png) [@QuantBob](https://quantlab.discourse.group/u/QuantBob)\
**Post date:** [April 27, 2025, 12:50pm UTC](https://quantlab.discourse.group/t/difference-of-bond-spread-definitions/108/1 "2025-04-27T12:50:16Z")

</div>

We had a question the other day which bond spread types that we support in the Qlang library. A summary of the main principles follow, with an example wsp.

1. **Y-Spread (Yield Spread)**  
In Quantlab this spread is not just a simple subtraction between two bond yields. It is the yield spread between the bonds “priced” yield in the market and the yield resulting in discounting the bonds cashflows with an alternate discount curve such as a tresury curve or a swap curve. In the literature, the term yield-spread is used in many different ways. Some have the yield spread as being identical to the g-spread but for another benchmark than a US Treasury bond.

2. **G-Spread (Government Spread)**

- **Benchmark:** The yield on an _on-the-run_ government bond with the _closest maturity_.
- **Calculation:** `G-Spread = Bond YTM - Yield of nearest-maturity on-the-run Government Bond`
- **Key Calculation Difference:** Uses nearest _actual_ on-the-run government bond yield, not necessarily interpolated to the exact maturity. Ignores curve shape and cash flow timing.

1. **I-Spread (Interpolated Spread)**

- **Benchmark:** The swap rate curve, _interpolated_ to the bond’s exact maturity.
- **Calculation:** `I-Spread = Bond YTM - Interpolated Swap Rate for the bond's maturity`
- **Key Calculation Difference:** Uses interpolation on the _swap curve_ to match maturity exactly. Ignores curve shape and cash flow timing beyond YTM.

1. **Z-Spread (Zero-Volatility Spread)**

- **Benchmark:** The _entire_ benchmark spot rate curve (government or swap).
- **Calculation:** Iterative calculation to find the _constant_ spread to add to _each_ spot rate to make the PV of the bond’s cash flows equal its market price. `Bond Dirty Price = Σ [CF_t / (SpotRate_t + Z-Spread)^t]`
- **Key Calculation Difference:** Uses the entire spot curve, accounts for all cash flow timings and the curve shape. Assumes zero interest rate volatility.

1. **Asset Swap Spread (ASW)**

- **Benchmark:** A floating money market rate (e.g., SOFR) plus the ASW itself, via an interest rate swap.
- **Calculation:** Involves valuing the bond and an associated interest rate swap to find the spread over the floating rate leg that equates the value of paying fixed (bond coupon) and receiving floating (SOFR + ASW).
- **Key Calculation Difference:** Involves swap valuation, calculates spread over a _floating_ benchmark, implicitly handles coupons by swapping them. Reflects funding relative to the swap market.
- **NOTE:** that we have two different definitions of ASW, the “Matched Maturity” and the “True” ASW versions. The former matches only maturity date of the bond, but not the size of the fixed bond coupon. The True ASW matches the bonds cashflows exactly, with option to match its dirty price, clean price, or par.

 ![image](https://canada1.discourse-cdn.com/flex003/uploads/quantlab/original/1X/3f142547ea9acd97d56229eaeff5f6161838b0d8.png)

[ASW example.qlw](https://quantlab.discourse.group/uploads/short-url/rdbji3uKATRKW9ki5CaEvcXJcau.qlw) (19.5 KB)

---

<div class="post-metadata">

**Author:** ![RutgerJ](https://avatars.discourse-cdn.com/v4/letter/r/ecb155/32.png) [@RutgerJ](https://quantlab.discourse.group/u/RutgerJ)\
**Post date:** [April 27, 2025, 3:57pm UTC](https://quantlab.discourse.group/t/difference-of-bond-spread-definitions/108/2 "2025-04-27T15:57:58Z")

</div>

Very informative. Thanks.
