/src/main/java/net/finmath/marketdata/model/bond/Bond.java
final double previousSurvivalProbabilityFactor = previousPaymentDate > evaluationTime ? survivalProbabilityCurve.getValue ( model, previousPaymentDate ) : 1.0;
value += couponPayment * periodLength * discountFactor * survivalProbabilityFactor * basisFactorFactor; if(positiveRecoveryRate) { double previousPaymentDate = 0 ; if(periodIndex>0) { previousPaymentDate = schedule.getPayment(periodIndex-1); } <extra_id_0> value += recoveryRate * discountFactor * (previousSurvivalProbabilityFactor- survivalProbabilityFactor) * basisFactorFactor; } } final double paymentDate = schedule.getPayment(schedule.getNumberOfPeriods()-1); final double discountFactor = paymentDate > evaluationTime ? discountCurve.getDiscountFactor(model, paymentDate) : 0.0; final double survivalProbabilityFactor = survivalProbabilityCurve != null ? (paymentDate > evaluationTime ? survivalProbabilityCurve.getValue(model, paymentDate) : 0.0) : 1.0;