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