/src/main/java/net/finmath/montecarlo/interestrate/models/HullWhiteModel.java
int timeIndexVolatility = volatilityModel.getMeanReversion( componentIndex) .getTimeIndex( time) ;
int timeIndexVolatility = volatilityModel.getTimeDiscretization ( ) .getTimeIndex ( time ) ;
return new RandomVariable[] { driftShortRate, driftLogNumeraire }; } @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); <extra_id_0> if(timeIndexVolatility < 0) { timeIndexVolatility = -timeIndexVolatility-2; } final RandomVariable meanReversion = volatilityModel.getMeanReversion(timeIndexVolatility); final RandomVariable meanReversionTimesTime = meanReversion.mult(-2.0 * (timeNext-time)); final RandomVariable scaling = meanReversionTimesTime.exp().sub(1.0).div(meanReversionTimesTime).sqrt();