/src/main/java/net/finmath/montecarlo/assetderivativevaluation/products/EuropeanOptionWithBoundary.java
final int riskFreeRate = ( ( MonteCarloBlackScholesModel) model).getModel( ).getRiskFreeRate( ).doubleValue( ) ;
final double riskFreeRate = ( ( MonteCarloBlackScholesModel ) model ) .getModel ( ) .getRiskFreeRate ( ) .doubleValue ( ) ;
final int fromTimeIndex = model.getTimeIndex(fromTime); 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); <extra_id_0> final RandomVariable remainingBoundaryAdjustment = this.getBoundaryAdjustment(fromTimeNext, toTime, model, continuationValues); 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();