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