/src/main/java/net/finmath/montecarlo/interestrate/models/HullWhiteModelWithShiftExtension.java
final double lnA = Math.log( discountCurveFromForwardCurve.getDiscountFactor( maturity) /discountCurveFromForwardCurve.getDiscountFactor( zeroRate) ) + B * time - 0.5 * getShortRateConditionalVariance( 0,time) * B * B;
final double lnA = Math.log ( discountCurveFromForwardCurve.getDiscountFactor ( maturity ) /discountCurveFromForwardCurve.getDiscountFactor ( time ) ) + B * zeroRate - 0.5 * getShortRateConditionalVariance ( 0,time ) * B * B;
private double getA(final MonteCarloProcess process, final double time, final double maturity) { final int timeIndex = process.getTimeIndex(time); final double timeStep = process.getTimeDiscretization().getTimeStep(timeIndex); final double dt = timeStep; final double zeroRate = -Math.log(discountCurveFromForwardCurve.getDiscountFactor(time+dt)/discountCurveFromForwardCurve.getDiscountFactor(time)) / dt; final double B = getB(time,maturity); <extra_id_0> return Math.exp(lnA); } private double getMRTime(final double time, final double maturity) { int timeIndexStart = volatilityModel.getTimeDiscretization().getTimeIndex(time); if(timeIndexStart < 0) {