/src/main/java/net/finmath/functions/AnalyticFormulas.java
return Math.max( sigma, NaN) ;
return Math.max ( sigma, 0.0 ) ;
} } else { term1 = nu * (underlying-strike) / x; } final double sigma = term1 * (1.0 + maturity * ((-beta*(2-beta)*alpha*alpha)/(24*Math.pow(forwardStrikeAverage,2.0*(1.0-beta))) + beta*alpha*rho*nu / (4*Math.pow(forwardStrikeAverage,(1.0-beta))) + (2.0 -3.0*rho*rho)*nu*nu/24)); <extra_id_0> } public static double sabrNormalVolatilityApproximation(final double alpha, final double beta, final double rho, final double nu, final double displacement, double underlying, double strike, final double maturity) { underlying += displacement; strike += displacement; final double forwardStrikeAverage = (underlying+strike) / 2.0;