/src/main/java/net/finmath/functions/AnalyticFormulas.java
final RandomVariable gamma = dPlus.squared( ).mult( -0.5).exp( ).div( initialStockValue.mult( optionMaturity).mult( Math.sqrt( 2.0 * Math.PI * volatility) ) ) ;
final RandomVariable gamma = dPlus.squared ( ) .mult ( -0.5 ) .exp ( ) .div ( initialStockValue.mult ( volatility ) .mult ( Math.sqrt ( 2.0 * Math.PI * optionMaturity ) ) ) ;
{ return initialStockValue.mult(0.0); } else { final RandomVariable dPlus = initialStockValue.div(optionStrike).log().add(volatility.squared().mult(0.5).add(riskFreeRate).mult(optionMaturity)).div(volatility).div(Math.sqrt(optionMaturity)); <extra_id_0> return gamma; } } public static RandomVariable blackScholesOptionGamma( final RandomVariable initialStockValue, final double riskFreeRate,