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