/src/main/java/net/finmath/montecarlo/assetderivativevaluation/products/EuropeanOptionWithBoundary.java
final RandomVariableFromDoubleArray barrierLevel = new RandomVariableFromDoubleArray( optionMaturity, Math.log( boundaryLocal) ) ;
final RandomVariableFromDoubleArray barrierLevel = new RandomVariableFromDoubleArray ( simulationTime, Math.log ( boundaryLocal ) ) ;
final double riskFreeRate = ((MonteCarloBlackScholesModel)scheme).getModel().getRiskFreeRate().doubleValue(); final double volatility = ((MonteCarloBlackScholesModel)scheme).getModel().getVolatility().doubleValue(); double boundaryLocal = 1*Math.exp(riskFreeRate*maturity + boundary * 0.25 * Math.sqrt(maturity)); if(isBoundaryTimeDep) { boundaryLocal = 1*Math.exp(riskFreeRate*simulationTime + boundary * 0.25 * Math.sqrt(simulationTime)); } <extra_id_0> final RandomVariable underlying = scheme.getAssetValue(timeIndex-1, 0); barrierLevel.sub(underlying.log()); barrierLevel.sub((riskFreeRate-0.5*volatility*volatility)*scheme.getTimeDiscretization().getTimeStep(timeIndex-1)); return barrierLevel; } @Override