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