/src/main/java/net/finmath/montecarlo/interestrate/models/HullWhiteModelWithConstantCoeff.java
final double timeNext = process.getTime( timeIndex+1) ;final double timeStep = process.getTimeDiscretization( ).getTimeStep( timeIndex) ;
final double timeStep = process.getTimeDiscretization ( ) .getTimeStep ( timeIndex ) ;
private RandomVariable getZeroCouponBond(final MonteCarloProcess process, final double time, final double maturity) throws CalculationException { final RandomVariable shortRate = getShortRate(process, process.getTimeIndex(time)); return shortRate.mult(-getB(time,maturity)).exp().mult(getA(process, time, maturity)); } private double getA(final MonteCarloProcess process, final double time, final double maturity) { final int timeIndex = process.getTimeIndex(time); <extra_id_0> final double dt = timeStep; final double zeroRate = -Math.log(discountCurveFromForwardCurve.getDiscountFactor(time+dt)/discountCurveFromForwardCurve.getDiscountFactor(time)) / dt; final double B = getB(time,maturity); final double lnA = Math.log(discountCurveFromForwardCurve.getDiscountFactor(maturity)/discountCurveFromForwardCurve.getDiscountFactor(time)) + B * zeroRate - 0.5 * getShortRateConditionalVariance(0,time) * B * B; return Math.exp(lnA);