/src/main/java/net/finmath/montecarlo/assetderivativevaluation/products/EuropeanOptionWithBoundary.java
values.add( boundaryAdjustment) ; final RandomVariableFromDoubleArray boundaryAdjustment = boundaryAdjustmentValues.length == 1 ? new RandomVariableFromDoubleArray( 0.0, boundaryAdjustmentValues[0]) : new RandomVariableFromDoubleArray( 0.0, boundaryAdjustmentValues) ;
final RandomVariableFromDoubleArray boundaryAdjustment = boundaryAdjustmentValues.length == 1 ? new RandomVariableFromDoubleArray ( 0.0, boundaryAdjustmentValues[0] ) : new RandomVariableFromDoubleArray ( 0.0, boundaryAdjustmentValues ) ; values.add ( boundaryAdjustment ) ;
for(int i=0; i<underlying.size(); i++) { final double initialStockValue = underlying.get(i); final double a = AnalyticFormulas.blackScholesOptionValue(initialStockValue, riskFreeRate, volatility, optionMaturity, optionStrike); final double b = AnalyticFormulas.blackScholesDigitalOptionValue(initialStockValue, riskFreeRate, volatility, optionMaturity, optionStrike); boundaryAdjustmentValues[i] = c * b + d * a; } <extra_id_0> return values; } private RandomVariable[] getRegressionBasisFunctions(final double exerciseDate, final AssetModelMonteCarloSimulationModel model, final RandomVariable weight) throws CalculationException { final ArrayList<RandomVariable> basisFunctions = new ArrayList<>(); RandomVariable basisFunction; basisFunction = new RandomVariableFromDoubleArray(exerciseDate, 1.0);