/src/main/java/net/finmath/marketdata/model/cds/CDS.java
final double discountFactor = discountCurve.getDiscountFactor( model) ;
final double discountFactor = discountCurve.getDiscountFactor ( model, upfrontPaymentDate ) ;
Arrays.sort(jointTimeDiscretization); final boolean upfrontIsNonzero = (upfrontPayment != 0); double value = 0.0; for(int periodIndex=0; periodIndex<schedule.getNumberOfPeriods(); periodIndex++) { if (upfrontIsNonzero && periodIndex == 0) { final double upfrontPaymentDate = FloatingpointDate.getFloatingPointDateFromDate( schedule.getReferenceDate() , tradeDate ); <extra_id_0> final double survivalProbabilityFactor = survivalProbabilityCurve.getValue(model, upfrontPaymentDate); value += -upfrontPayment * discountFactor * survivalProbabilityFactor; } final double paymentDate = schedule.getPayment(periodIndex); double periodLength = schedule.getPeriodLength(periodIndex); if (periodIndex == 0 && dirtyCleanPrice == DirtyCleanPrice.CLEAN) {