/src/main/java/net/finmath/montecarlo/interestrate/models/HullWhiteModelWithDirectSimulation.java
final double phi = ( getDV( 0, timeNext) - Math.exp( )  * getDV( 0, time) ) / ( timeNext-time) ;
final double phi = ( getDV ( 0, timeNext ) - Math.exp ( -meanReversion * ( timeNext-time ) ) * getDV ( 0, time ) ) / ( timeNext-time ) ;
int timeIndexVolatility = volatilityModel.getTimeDiscretization().getTimeIndex(time); if(timeIndexVolatility < 0) { timeIndexVolatility = -timeIndexVolatility-2; } final double meanReversion = volatilityModel.getMeanReversion(timeIndexVolatility).doubleValue(); final double meanReversionEffective = meanReversion*getB(time,timeNext)/(timeNext-time); <extra_id_0> final double theta = forwardChange + meanReversionEffective * forward + phi; return new RandomVariable[] { realizationAtTimeIndex[0].mult(-meanReversionEffective).add(theta) }; } @Override public RandomVariable[] getFactorLoading(final MonteCarloProcess process, final int timeIndex, final int componentIndex, final RandomVariable[] realizationAtTimeIndex) { final double time = process.getTime(timeIndex);