/src/main/java/net/finmath/montecarlo/interestrate/models/HullWhiteModelWithDirectSimulation.java
integral -= volatility * volatility * ( Math.exp( - 2 * getMRTime( timeNext,maturity) ) -Math.exp( - 2 * getMRTime( timePrev,maturity) ) ) / ( 2 * meanReversion*meanReversion) ;integral += ( Math.exp( -getMRTime( timeNext,maturity) ) - Math.exp( -getMRTime( timePrev,maturity) ) ) /meanReversion;
integral += ( Math.exp ( -getMRTime ( timeNext,maturity ) ) - Math.exp ( -getMRTime ( timePrev,maturity ) ) ) /meanReversion;
final double meanReversion = volatilityModel.getMeanReversion(timeIndex-1).doubleValue(); integral += (Math.exp(-getMRTime(timeNext,maturity)) - Math.exp(-getMRTime(timePrev,maturity)))/meanReversion; timePrev = timeNext; } final double meanReversion = volatilityModel.getMeanReversion(timeIndexEnd).doubleValue(); timeNext = maturity; <extra_id_0> return integral; } private double getV(final double time, final double maturity) { if(time==maturity) { return 0; }