|
QuantLib: a free/open-source library for quantitative finance
Reference manual - version 1.40
|
Risky pricing engine for bonds. More...
#include <ql/pricingengines/bond/riskybondengine.hpp>
Public Member Functions | |
| RiskyBondEngine (Handle< DefaultProbabilityTermStructure > defaultTS, Real recoveryRate, Handle< YieldTermStructure > yieldTS) | |
| void | calculate () const override |
| Handle< DefaultProbabilityTermStructure > | defaultTS () const |
| Real | recoveryRate () const |
| Handle< YieldTermStructure > | yieldTS () const |
Risky pricing engine for bonds.
The value of each cashflow is contingent to survival, i.e., the knockout probability is considered.
In each of the \(n\) coupon periods, we can calculate the value in the case of survival and default, assuming that the issuer can only default in the middle of a coupon period. We denote this time \(T_{i}^{mid}=\frac{T_{i-1}+T_{i}}{2}\).
Given survival we receive the full cash flow (both coupons and notional). The time \(t\) value of these payments are given by
\[ \sum_{i=1}^{n}CF_{i}P(t,T_{i})Q(T_{i}<\tau) \]
where \(P(t,T)\) is the time \(T\) discount bond and \(Q(T<\tau)\) is the time \(T\) survival probability. \(n\) is the number of coupon periods. This takes care of the payments in the case of survival.
Given default we receive only a fraction of the notional at default.
\[ \sum_{i=1}^{n}Rec N(T_{i}^{mid}) P(t,T_{i}^{mid})Q(T_{i-1}<\tau\leq T_{i}) \]
where \(Rec\) is the recovery rate and \(N(T)\) is the time T notional. The default probability can be rewritten as
\[ Q(T_{i-1}<\tau\leq T_{i})=Q(T_{i}<\tau)-Q(T_{i-1}<\tau)=(1-Q(T_{i}\geq\tau))-(1-Q(T_{i-1}\geq\tau))=Q(T_{i-1}\geq\tau)-Q(T_{i}\geq\tau) \]
|
overridevirtual |
Implements PricingEngine.