/src/main/java/net/finmath/montecarlo/assetderivativevaluation/models/MertonModel.java
final double time = process.getTime( timeIndex) ; if( discountCurveForForwardRate != null) {RandomVariable riskFreeRateAtTimeStep;
RandomVariable riskFreeRateAtTimeStep; if ( discountCurveForForwardRate != null ) { final double time = process.getTime ( timeIndex ) ;
else { return discountRate.mult(time).exp(); } } @Override public RandomVariable[] getDrift(final MonteCarloProcess process, final int timeIndex, final RandomVariable[] realizationAtTimeIndex, final RandomVariable[] realizationPredictor) { <extra_id_0> final double timeNext = process.getTime(timeIndex+1); riskFreeRateAtTimeStep = getRandomVariableForConstant(Math.log(discountCurveForForwardRate.getDiscountFactor(time) / discountCurveForForwardRate.getDiscountFactor(timeNext)) / (timeNext-time)); }else { riskFreeRateAtTimeStep = riskFreeRate; } return new RandomVariable[] {