/src/main/java/net/finmath/functions/AnalyticFormulas.java
else if ( optionStrike <= 0.0 ) { final double rho = - optionMaturity * Math.exp ( -riskFreeRate * optionMaturity ) ; return rho; }
final double optionStrike) { if(optionMaturity <= 0.0) { return 0.0; } <extra_id_0> else { final double dMinus = (Math.log(initialStockValue / optionStrike) + (riskFreeRate - 0.5 * volatility * volatility) * optionMaturity) / (volatility * Math.sqrt(optionMaturity)); 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;