/src/main/java/net/finmath/marketdata/model/cds/CDS.java
} valueFloatingLeg += ( 1.0 - recoveryRateCurve.getValue( calibratedModelJPM,paymentDate) ) * discountFactor * ( previousSurvivalProbabilityFactor- survivalProbabilityFactor) ;
valueFloatingLeg += ( 1.0 - recoveryRateCurve.getValue ( calibratedModelJPM,paymentDate ) ) * discountFactor * ( previousSurvivalProbabilityFactor- survivalProbabilityFactor ) ; }
valueFixedLeg += periodLength * discountFactor * survivalProbabilityFactor; double previousPaymentDate = 0 ; if(periodIndex>0) { previousPaymentDate = schedule.getPayment(periodIndex-1); } final double previousSurvivalProbabilityFactor = previousPaymentDate > evaluationTime ? survivalProbabilityCurve.getValue(calibratedModelJPM, previousPaymentDate) : 1.0; <extra_id_0> final double conventionalSpread = valueFloatingLeg/ valueFixedLeg; return conventionalSpread; } public double getFeePayment(int periodIndex, AnalyticModel model) { final ForwardCurve forwardCurveInterpolation = model.getForwardCurve(forwardCurveName); if(forwardCurveInterpolation == null && forwardCurveName != null && forwardCurveName.length() > 0) {