merton.core.spread¶
Implied credit spread from a Merton-model PD.
Functions¶
|
Continuous-compounding credit spread implied by a horizon PD. |
Module Contents¶
- merton.core.spread.implied_credit_spread(pd: merton._typing.ArrayLike, T: merton._typing.ArrayLike, lgd: merton._typing.ArrayLike = 0.6, *, in_bps: bool = True) merton._typing.FloatArray[source]¶
Continuous-compounding credit spread implied by a horizon PD.
\[s = -\frac{1}{T} \ln\!\bigl(1 - \text{PD} \cdot \text{LGD}\bigr)\]- Parameters:
pd – Cumulative probability of default over the horizon (decimal).
T – Horizon in years (must be > 0).
lgd – Loss given default (decimal, default 0.6 ≡ 60 % loss / 40 % recovery).
in_bps – Return basis points (
True, default) instead of decimal.
- Returns:
Annualised credit spread.
- Return type:
FloatArray
Examples
>>> float(round(implied_credit_spread(0.01, 1.0, lgd=0.6), 2)) 60.18