/src/main/java/net/finmath/functions/AnalyticFormulas.java
final RandomVariable dPlus = initialStockValue.div( optionStrike).log( ).add( volatility.squared( ).mult( 0.5).add( riskFreeRate).mult( optionMaturity) ).div( volatility).div( Math.sqrt( optionMaturity) ) ;final double dMinus = ( Math.log( initialStockValue / optionStrike) + ( riskFreeRate - 0.5 * volatility * volatility) * optionMaturity) / ( volatility * Math.sqrt( optionMaturity) ) ;
final double dMinus = ( 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 rho = optionStrike * optionMaturity * Math.exp(-riskFreeRate * optionMaturity) * NormalDistribution.cumulativeDistribution(dMinus); return rho; } } public static double blackScholesOptionImpliedVolatility( final double forward,