/** * For a future expiry date, the default adjusted forward index value is the expected (full) * value of the index plus the cash settlement of any defaults before * the expiry date, valued on the (forward) cash settlement date (usually 3 working days after * the expiry date - i.e. the expiry settlement date). * This calculation assumes an homogeneous pool that can be described by a single index curve. * * @param fwdStartingCDS A forward starting CDS to represent cash flows in the index. * The stepin date should be one day after the expiry and the cashSettlement * date (usually) 3 working days after expiry. This must contain the index recovery rate. * @param timeToExpiry the time in years between the trade date and expiry. * This should use the same DCC as the curves (ACT365F unless manually changed). * @param yieldCurve The yield curve * @param indexCoupon The coupon of the index * @param indexCurve Pseudo credit curve for the index. * @return the default adjusted forward index value */ public double defaultAdjustedForwardIndexValue( CDS fwdStartingCDS, double timeToExpiry, YieldTermStructure yieldCurve, double indexCoupon, PiecewiseconstantHazardRate indexCurve) { double defSet = expectedDefaultSettlementValue(timeToExpiry, indexCurve, fwdStartingCDS.getLGD()); return(defSet + _pricer.pv(fwdStartingCDS, yieldCurve, indexCurve, indexCoupon)); }
/** * The (default adjusted) intrinsic forward spread of an index. * This is defined as the ratio of expected value of the protection leg and default settlement to * the expected value of the annuity at expiry. This calculation assumes an homogeneous pool that * can be described by a single index curve. * * @param fwdStartingCDS forward starting CDS to represent cash flows in the index. * The stepin date should be one day after the expiry and the cashSettlement * date (usually) 3 working days after expiry * @param timeToExpiry the time in years between the trade date and expiry. * This should use the same DCC as the curves (ACT365F unless manually changed). * @param initialIndexSize The initial number of names in the index * @param yieldCurve The yield curve * @param indexCurve Pseudo credit curve for the index. * @param initialDefaultSettlement The (normalised) value of any defaults that have * already occurred (e.g. if two defaults have occurred from an index with * initially 100 entries, and the realised recovery rates are 0.2 and 0.35, the this value is (0.8 + 0.65)/100 ) * @param numDefaults The number of defaults that have already occurred * @return The normalised expected default settlement value */ public double defaultAdjustedForwardSpread( CDS fwdStartingCDS, double timeToExpiry, int initialIndexSize, YieldTermStructure yieldCurve, PiecewiseconstantHazardRate indexCurve, double initialDefaultSettlement, int numDefaults) { double f = (initialIndexSize - numDefaults) / ((double)initialIndexSize); double defSettle = expectedDefaultSettlementValue(initialIndexSize, timeToExpiry, indexCurve, fwdStartingCDS.getLGD(), initialDefaultSettlement, numDefaults); double protLeg = f * _pricer.protectionLeg(fwdStartingCDS, yieldCurve, indexCurve); double ann = f * _pricer.annuity(fwdStartingCDS, yieldCurve, indexCurve); return((protLeg + defSettle) / ann); }
/** * The (default adjusted) intrinsic forward spread of an index <b>when no defaults have yet occurred</b>. * This is defined as the ratio of expected value of the * protection leg and default settlement to the expected value of the annuity at expiry. * This calculation assumes an homogeneous pool that can be described by a single index curve. * * @param fwdStartingCDS forward starting CDS to represent cash flows in the index. * The stepin date should be one day after the expiry and the cashSettlement * date (usually) 3 working days after expiry * @param timeToExpiry the time in years between the trade date and expiry. * This should use the same DCC as the curves (ACT365F unless manually changed). * @param yieldCurve The yield curve * @param indexCurve Pseudo credit curve for the index. * @return The normalised expected default settlement value */ public double defaultAdjustedForwardSpread( CDS fwdStartingCDS, double timeToExpiry, YieldTermStructure yieldCurve, PiecewiseconstantHazardRate indexCurve) { double defSettle = expectedDefaultSettlementValue(timeToExpiry, indexCurve, fwdStartingCDS.getLGD()); double protLeg = _pricer.protectionLeg(fwdStartingCDS, yieldCurve, indexCurve); double ann = _pricer.annuity(fwdStartingCDS, yieldCurve, indexCurve); return((protLeg + defSettle) / ann); }
/** * For a future expiry date, the default adjusted forward index value is the expected (full) * value of the index plus the cash settlement of any defaults before * the expiry date, valued on the (forward) cash settlement date (usually 3 working days after * the expiry date - i.e. the expiry settlement date). * This calculation assumes an homogeneous pool that can be described by a single index curve. * * @param fwdStartingCDS A forward starting CDS to represent cash flows in the index. * The stepin date should be one day after the expiry and the cashSettlement * date (usually) 3 working days after expiry. This must contain the index recovery rate. * @param timeToExpiry the time in years between the trade date and expiry. * This should use the same DCC as the curves (ACT365F unless manually changed). * @param initialIndexSize The initial number of names in the index * @param yieldCurve The yield curve * @param indexCoupon The coupon of the index * @param indexCurve Pseudo credit curve for the index. * @param initialDefaultSettlement The (normalised) value of any defaults that have already * occurred (e.g. if two defaults have occurred from an index with * initially 100 entries, and the realised recovery rates are 0.2 and 0.35, the this value is (0.8 + 0.65)/100 ) * @param numDefaults The number of defaults that have already occurred * @return the default adjusted forward index value */ public double defaultAdjustedForwardIndexValue( CDS fwdStartingCDS, double timeToExpiry, int initialIndexSize, YieldTermStructure yieldCurve, double indexCoupon, PiecewiseconstantHazardRate indexCurve, double initialDefaultSettlement, int numDefaults) { double f = (initialIndexSize - numDefaults) / ((double)initialIndexSize); double defSet = expectedDefaultSettlementValue(initialIndexSize, timeToExpiry, indexCurve, fwdStartingCDS.getLGD(), initialDefaultSettlement, numDefaults); return(defSet + f * _pricer.pv(fwdStartingCDS, yieldCurve, indexCurve, indexCoupon)); }