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