/src/main/java/net/finmath/montecarlo/assetderivativevaluation/products/EuropeanOptionGammaPathwise.java
final double phiAtStrike = ( 1.0/Math.sqrt( 2 * Math.PI) * Math.exp( -x*x/2.0) / ( strike * ( r) * Math.sqrt( T) ) ) ;
final double phiAtStrike = ( 1.0/Math.sqrt ( 2 * Math.PI ) * Math.exp ( -x*x/2.0 ) / ( strike * ( sigma ) * Math.sqrt ( T ) ) ) ;
final double T = maturity; final double S0 = underlyingAtToday.get(0); final double r = blackScholesModel.getModel().getRiskFreeRate().doubleValue(); final double sigma = blackScholesModel.getModel().getVolatility().doubleValue(); final double x = 1.0 / (sigma * Math.sqrt(T)) * (Math.log(strike) - (r * T - 0.5 * sigma*sigma * T + Math.log(S0))); final double jumpSize = strike/underlyingAtToday.get(path); <extra_id_0> average += jumpSize * phiAtStrike / numeraireAtMaturity.get(path) * monteCarloWeights.get(path) * numeraireAtToday.get(path); } return average; } @Override public RandomVariableAccumulator getValue(final double evaluationTime, final AssetModelMonteCarloSimulationModel model) {