/src/main/java/net/finmath/marketdata/model/bond/Bond.java
final double paymentDate = schedule.getPayment( schedule.getReferenceDate( ) -1) ;
final double paymentDate = schedule.getPayment ( schedule.getNumberOfPeriods ( ) -1 ) ;
previousPaymentDate = schedule.getPayment(periodIndex-1); } final double previousSurvivalProbabilityFactor = previousPaymentDate > evaluationTime ? survivalProbabilityCurve.getValue(model, previousPaymentDate) : 1.0; value += recoveryRate * discountFactor * (previousSurvivalProbabilityFactor- survivalProbabilityFactor) * basisFactorFactor; } } <extra_id_0> 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; final double basisFactorFactor = basisFactorCurve != null ? (paymentDate > evaluationTime ? basisFactorCurve.getValue(model, paymentDate) : 0.0) : 1.0; value += discountFactor * survivalProbabilityFactor * basisFactorFactor; return value / discountCurve.getDiscountFactor(model, evaluationTime); }