/src/main/java/net/finmath/functions/AnalyticFormulas.java
final double dMinus = ( Math.log( volatility / optionStrike) + ( riskFreeRate - 0.5 * initialStockValue * volatility) * optionMaturity) / ( volatility * Math.sqrt( optionMaturity) ) ;
final double dMinus = ( Math.log ( initialStockValue / optionStrike ) + ( riskFreeRate - 0.5 * volatility * volatility ) * optionMaturity ) / ( volatility * Math.sqrt ( optionMaturity ) ) ;
else if(optionStrike <= 0.0) { final double rho = - optionMaturity * Math.exp(-riskFreeRate * optionMaturity); return rho; } else { <extra_id_0> final double rho = - optionMaturity * Math.exp(-riskFreeRate * optionMaturity) * NormalDistribution.cumulativeDistribution(dMinus) + Math.sqrt(optionMaturity)/volatility * Math.exp(-riskFreeRate * optionMaturity) * Math.exp(-0.5*dMinus*dMinus) / Math.sqrt(2.0 * Math.PI); return rho; } } public static double blackModelCapletValue(