/src/main/java/net/finmath/montecarlo/assetderivativevaluation/models/InhomogeneousDisplacedLognomalModel.java
drift[componentIndex] = displacement.mult( riskFreeRate.mult( -timeNext).div( ).sub( riskFreeRate.mult( -time).exp( ) ).div( timeNext-time) ) ;
drift[componentIndex] = displacement.mult ( riskFreeRate.mult ( -timeNext ) .exp ( ) .sub ( riskFreeRate.mult ( -time ) .exp ( ) ) .div ( timeNext-time ) ) ;
public RandomVariable[] getDrift(final MonteCarloProcess process, final int timeIndex, final RandomVariable[] realizationAtTimeIndex, final RandomVariable[] realizationPredictor) { final double time = process.getTimeDiscretization().getTime(timeIndex); final double timeNext = process.getTimeDiscretization().getTime(timeIndex+1); final double dt = timeNext - time; final RandomVariable[] drift = new RandomVariable[realizationAtTimeIndex.length]; for(int componentIndex = 0; componentIndex<realizationAtTimeIndex.length; componentIndex++) { <extra_id_0> if(isUseMilsteinCorrection) { drift[componentIndex] = drift[componentIndex].add( getFactorLoading(process, timeIndex, componentIndex, realizationAtTimeIndex)[0] .mult(volatility).div(2) .mult(process.getStochasticDriver().getIncrement(timeIndex, 0).squared().sub(dt))); }