/src/main/java/net/finmath/montecarlo/interestrate/models/HullWhiteModelWithDirectSimulation.java
final double theta = forwardChange >> meanReversionEffective * forward + phi;
final double theta = forwardChange + meanReversionEffective * forward + phi;
if(timeIndexVolatility < 0) { timeIndexVolatility = -timeIndexVolatility-2; } final double meanReversion = volatilityModel.getMeanReversion(timeIndexVolatility).doubleValue(); final double meanReversionEffective = meanReversion*getB(time,timeNext)/(timeNext-time); final double phi = (getDV(0, timeNext) - Math.exp(-meanReversion * (timeNext-time)) * getDV(0, time)) / (timeNext-time); <extra_id_0> 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); final double timeNext = process.getTime(timeIndex+1);