QuantLib Schedules and Discount Margins for Amortizing Floaters
Summary
The document addresses two implementation questions for an amortizing floating-rate bond in QuantLib: whether its payment schedule begins at issuance or settlement, and how to relate discount margin to price. The guidance is to build the schedule from the bond’s issue date; the bond handles cash flows according to the evaluation date and settlement settings.
For pricing with a discount margin, the response describes applying a spread to a yield curve and repricing the bond as the spread changes. To solve for the margin implied by a target price, define a function of the spread that returns the price difference and use a one-dimensional root solver. An important refinement distinguishes forecasting floating coupons from discounting them: forecast from the original LIBOR curve, and use a spreaded curve in the bond’s discounting engine. The document offers an implementation outline rather than a complete working example. Correct results still depend on consistent curve, index, calendar, and bond conventions.
Key ideas
- An amortizing floater’s schedule should begin on its issue date, even when the bond is already seasoned.
- The bond’s evaluation date and settlement settings determine which cash flows are relevant for pricing.
- A discount margin can be applied by spreading a yield curve and repricing the bond.
- The margin implied by a target price can be found with a one-dimensional solver on the price difference.
- Forecast floating coupons on the original reference curve and discount cash flows using the spreaded curve.
Tags
Full text
# Value (price) of defaultable zero coupon bond with credit risk involved
# Value (price) of defaultable zero coupon bond with credit risk involved
I'm trying to derivate the Value (price) of defaultable zero coupon bond, but there some steps (math) in between I can't figure out.
From the default process modelling, we have:
$$P(t ≤ \tau < t+dt | \tau > t ) ≈ h_tdt$$
and:
$$P( \tau > t ) = \exp\left(-\int_0^t h_s ds\right) $$
Hence combining both, the unconditional probability:
$$P(t ≤ \tau < t+dt ) = h_t\exp\left(-\int_0^t h_s ds\right)dt$$
Next proceed with the derivation of the value of a defaultable bond
\begin{align} &B(0,T) \\ =& \color{fuchsia}{\text{EV[non-default scenario]}} + \color{blue}{\text{EV[default scenario]}} \\ =& E\left[\color{fuchsia}{\exp\left(-\int_0^T r_t dt\right)·\mathbf{1}_{\{T<\tau\}}} + \color{blue}{\int_0^T RR · \exp\left(-\int_0^t r_s ds\right) · P(t ≤ \tau < t+dt )} \right]\\ =& E\left[\color{fuchsia}{\exp\left(-\int_0^T r_t dt\right)·\exp\left(-\int_0^T h_t dt\right)} + \color{blue}{\int_0^T RR · \exp\left(-\int_0^t r_s ds\right) · h_t\exp\left(-\int_0^t h_s ds\right)dt} \right] \\ =& E\left[\color{fuchsia}{\exp\left(-\int_0^T (r_t+h_t) dt\right)} + \color{blue}{\int_0^T RR · h_t· \exp\left(-\int_0^\color{red}{t} (r_s+h_s) ds\right) \color{red}{dt}} \right] \end{align}
I have derived up to here and come to the problem that I do not know how to integrate the blue part, with the upper bound of the inner integral as the integration variable of the outer integral (which I have colored red for clarity).
The textbook do provide the final result as the following, but i'm not sure how those are derived from my steps above
## Answer by Gordon (score 7, accepted)
https://quant.stackexchange.com/a/55157
There are a few recovery mechanisms, for example, recovery of par (i.e., the notional), recovery of treasury (i.e., the recovery value is a constant fraction of the equivalent default-free bond), and recovery of market value (i.e., a fraction of its pre-default market value). Here, your formula, which is also called the Lando formula, assumes the recovery of market value mechanism.
Let $V_t$ be the pre-default value at time $t$ of the zero-coupon bond with maturity $T$ and unit face value (note that $V_T=1$). Moreover, let $R$ be the recovery rate, of the pre-default value $V_{\tau}$. Furthermore, let $\tau$ be the default time, $H_t=\pmb{1}_{\{\tau \leq t\}}$. Let $\mathscr{F}_t$ be the market information set at time $t$ (which roughly speaking includes all information other than the fact of default or survival). Moreover, let $\mathscr{H}_t = \sigma(H_u,\, u \leq t)$ and $\mathscr{G}_t = \mathscr{F}_t \vee \mathscr{H}_t$ be the enlarged information set. Here, we can assume that the default time $\tau$ is defined as the first jump time of an in-homogeneous Poisson process, where the intensity process $\{h_t,\, t \ge 0\}$ is deterministic, or a Cox process, where the intensity is stochastic (see Bielecki and Rutkowski for more details).
Generally, we assume that the $\mathscr{H}$-condition is satisfied, that is, $\mathscr{H}_t$ and $\mathscr{F}_{\infty}$ are independent conditioned on $\mathscr{F}_t$; in other words, for any $\mathscr{H}_t$-measurable random variable $X$ and $\mathscr{F}_{\infty}$ measurable random variable $Y$, \begin{align*} E(XY\,|\,\mathscr{F}_t) = E(X\,|\,\mathscr{F}_t)E(Y\,|\,\mathscr{F}_t). \end{align*}
The other key formula to use is the filtration switching formula (see the book Interest Rate Models - Theory and Practice): For any $\mathscr{G}_{\infty}$ measurable random variable $Y$, \begin{align*} E\left(\pmb{1}_{\{\tau > t\}}Y\,|\,\mathscr{G}_t\right) = \pmb{1}_{\{\tau > t\}}\frac{E\left(\pmb{1}_{\{\tau > t\}}Y\,|\,\mathscr{F}_t\right)}{E\left(\pmb{1}_{\{\tau > t\}}\,|\,\mathscr{F}_t\right)}.\tag 1 \end{align*}
Then, for $0 \leq t < T$, \begin{align*} \pmb{1}_{\{\tau > t\}}V_{t} &= E\bigg(\pmb{1}_{\{\tau > T\}}e^{-\int_{t}^{T} r_s ds} + \pmb{1}_{\{t< \tau \le T\}} R\, V_{\tau}e^{-\int_{t}^{\tau} r_s ds} \, \big|\, \mathscr{G}_{t}\bigg) \\ &=\pmb{1}_{\{\tau > t\}} E\bigg(e^{-\int_{t}^{T} (r_s+h_s) ds} + \int_{t}^{T}R\, V_{u}h_u e^{-\int_{t}^{u} (r_s+h_s) ds} du \, \big|\, \mathscr{F}_{t}\bigg) \tag 2 \\ &=\pmb{1}_{\{\tau > t\}} e^{\int_0^{t} (r_s+h_s) ds} E\bigg(e^{-\int_0^{T} (r_s+h_s) ds} + \int_{t}^{T}R\, V_{u} h_u e^{-\int_0^{u} (r_s+h_s) ds} du \, \big|\, \mathscr{F}_{t}\bigg). \nonumber \end{align*} Here, the $\mathscr{H}$-condition and the filtration switching formula are employed in the derivation of $(2)$.
Let \begin{align*} M_t = E\bigg(e^{-\int_0^{T} (r_s+h_s) ds} + \int_0^{T}R\, V_{u}h_u e^{-\int_0^{u} (r_s+h_s) ds} du \, \big|\, \mathscr{F}_t\bigg). \end{align*} Then, $M_t$ is a martingale. Moreover, \begin{align*} V_t = e^{\int_0^t (r_s+h_s) ds}\bigg(M_t - \int_0^{t} R\,V_{u}h_u e^{-\int_0^{u} (r_s+h_s) ds} du \bigg). \end{align*} By Ito's lemma, \begin{align*} d\Big(e^{-\int_0^t (r_s+(1-R)h_s) ds} V_t \Big) = e^{\int_0^t R\, h_s ds} dM_t. \end{align*} Since $M_t$ is a martingale, $e^{-\int_0^t (r_s+(1-R)h_s) ds} V_t$ is also a martingale over $[0, T]$. Then, for any $0\le t \le u\le T$, \begin{align*} e^{-\int_0^t (r_s+(1-R)h_s) ds} V_t = E\Big(e^{-\int_0^u (r_s+(1-R)h_s) ds} V_u \, \big|\, \mathscr{F}_t \Big). \end{align*} In particular, \begin{align*} V_0 = E\left(e^{-\int_0^{T} (r_s+(1-R)h_s) ds}\right). \end{align*}
## Answer by R. Rayl (score 1)
https://quant.stackexchange.com/a/55144
It's hard for me to understand exactly what you are asking, but I will try to answer. If my answer misses the mark please clarify exactly it is what you don't understand and I will try again.
We have \begin{aligned} P(\tau \leq t + dt \vert \tau > t) &= \frac{P(t < \tau \leq t+dt)}{P(\tau > t)} \\ &= 1 - \exp \bigg(\int_t^{t+dt} h_u du \bigg) \\ &\approx h_tdt \end{aligned}
Where the approxomation comes from Taylor expansion of $e$ (the hint provided).
Furthermore (from the definition of the hazard rate), $$ P(\tau > t) = \exp\bigg( -\int_0^t h_u du \bigg) $$
Is that enough? Maybe you can work it out from here.Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.