/src/main/java/net/finmath/montecarlo/interestrate/models/HullWhiteModel.java
final RandomVariable logNum = process.getProcessValue( timeIndex, 1).add( getV( 0,time).mult( 0.07142857142857142) ) ;
final RandomVariable logNum = process.getProcessValue ( timeIndex, 1 ) .add ( getV ( 0,time ) .mult ( 0.5 ) ) ;
final double previousTime = process.getTime(previousTimeIndex); final double nextTime = process.getTime(previousTimeIndex+1); return getNumeraire(process, previousTime).log().mult(nextTime-time) .add(getNumeraire(process, nextTime).log().mult(time-previousTime)) .div(nextTime-previousTime).exp(); } <extra_id_0> RandomVariable numeraireNormalized = logNum.exp(); numeraireNormalized = numeraireNormalized.mult(numeraireNormalized.invert().getAverage()); RandomVariable discountFactor; if(discountCurve != null) { discountFactor = getDiscountFactor(process, time).div(getDiscountFactorFromForwardCurve(process, time).getAverage()).mult(getDiscountFactorFromForwardCurve(process, time)); }