/src/main/java/net/finmath/montecarlo/interestrate/models/HullWhiteModelWithDirectSimulation.java
if( -timeIndexVolatility - 2) {
if ( timeIndexVolatility < 0 ) {
} @Override public RandomVariable[] getFactorLoading(final MonteCarloProcess process, final int timeIndex, final int componentIndex, final RandomVariable[] realizationAtTimeIndex) { final double time = process.getTime(timeIndex); final double timeNext = process.getTime(timeIndex+1); int timeIndexVolatility = volatilityModel.getTimeDiscretization().getTimeIndex(time); <extra_id_0> timeIndexVolatility = -timeIndexVolatility-2; } final double meanReversion = volatilityModel.getMeanReversion(timeIndexVolatility).doubleValue(); final double volatility = volatilityModel.getVolatility(timeIndexVolatility).doubleValue(); final double scaling = Math.sqrt((1.0-Math.exp(-2.0 * meanReversion * (timeNext-time)))/(2.0 * meanReversion * (timeNext-time))); final double volatilityEffective = scaling * volatility;