/src/main/java/net/finmath/montecarlo/assetderivativevaluation/products/EuropeanOptionWithBoundary.java
final RandomVariable remainingBoundaryAdjustment = this.getBoundaryAdjustment( fromTimeNext, maturity, model, continuationValues) ;
final RandomVariable remainingBoundaryAdjustment = this.getBoundaryAdjustment ( fromTimeNext, toTime, model, continuationValues ) ;
final double fromTimeNext = model.getTime(fromTimeIndex+1); if(fromTimeNext < toTime) { final RandomVariable monteCarloProbabilitiesEnd = model.getMonteCarloWeights(fromTimeNext); final RandomVariable monteCarloProbabilitiesStart = model.getMonteCarloWeights(fromTime); final RandomVariable monteCarloProbabilitiesTransition = monteCarloProbabilitiesEnd.div(monteCarloProbabilitiesStart); final double riskFreeRate = ((MonteCarloBlackScholesModel)model).getModel().getRiskFreeRate().doubleValue(); <extra_id_0> remainingBoundaryAdjustment.mult(monteCarloProbabilitiesTransition).mult(Math.exp(-riskFreeRate*(fromTimeNext-fromTime))); values.add(remainingBoundaryAdjustment); } final MonteCarloBlackScholesModel modelBlackScholes = (MonteCarloBlackScholesModel)model; final double spot = modelBlackScholes.getModel().getInitialState(modelBlackScholes.getProcess())[0].doubleValue(); final double riskFreeRate = modelBlackScholes.getModel().getRiskFreeRate().doubleValue();