public double unsafeSabrVolatility(final double strike,final double forward,final double expiryTime,final double alpha,final double beta,final double nu,final double rho){
  final double oneMinusBeta=1.0 - beta;
  final double A=Math.pow(forward * strike,oneMinusBeta);
  final double sqrtA=Math.sqrt(A);
  double logM;
  if (!isClose(forward,strike))   logM=Math.log(forward / strike);
 else {
    final double epsilon=(forward - strike) / strike;
    logM=epsilon - .5 * epsilon * epsilon;
  }
  final double z=(nu / alpha) * sqrtA * logM;
  final double B=1.0 - 2.0 * rho * z + z * z;
  final double C=oneMinusBeta * oneMinusBeta * logM* logM;
  final double tmp=(Math.sqrt(B) + z - rho) / (1.0 - rho);
  final double xx=Math.log(tmp);
  final double D=sqrtA * (1.0 + C / 24.0 + C * C / 1920.0);
  final double d=1.0 + expiryTime * (oneMinusBeta * oneMinusBeta * alpha* alpha / (24.0 * A) + 0.25 * rho * beta* nu* alpha / sqrtA + (2.0 - 3.0 * rho * rho) * (nu * nu / 24.0));
  double multiplier;
  final double m=10;
  if (Math.abs(z * z) > Constants.QL_EPSILON * m)   multiplier=z / xx;
 else {
    final double talpha=(0.5 - rho * rho) / (1.0 - rho);
    final double tbeta=alpha - .5;
    final double tgamma=rho / (1 - rho);
    multiplier=1.0 - beta * z + (tgamma - talpha + tbeta * tbeta * .5) * z * z;
  }
  return (alpha / D) * multiplier * d;
}

public double unsafeSabrVolatility ( final double strike , final double forward , final double expiryTime , final double alpha , final double beta , final double nu , final double rho ) { final double oneMinusBeta = 1.0 - beta ; final double A = Math . pow ( forward * strike , oneMinusBeta ) ; final double sqrtA = Math . sqrt ( A ) ; double logM ; if ( ! isClose ( forward , strike ) ) logM = Math . log ( forward / strike ) ; else { final double epsilon = ( forward - strike ) / strike ; logM = epsilon - .5 * epsilon * epsilon ; } final double z = ( nu / alpha ) * sqrtA * logM ; final double B = 1.0 - 2.0 * rho * z + z * z ; final double C = oneMinusBeta * oneMinusBeta * logM * logM ; final double tmp = ( Math . sqrt ( B ) + z - rho ) / ( 1.0 - rho ) ; final double xx = Math . log ( tmp ) ; final double D = sqrtA * ( 1.0 + C / 24.0 + C * C / 1920.0 ) ; final double d = 1.0 + expiryTime * ( oneMinusBeta * oneMinusBeta * alpha * alpha / ( 24.0 * A ) + 0.25 * rho * beta * nu * alpha / sqrtA + ( 2.0 - 3.0 * rho * rho ) * ( nu * nu / 24.0 ) ) ; double multiplier ; final double m = 10 ; if ( Math . abs ( z * z ) > Constants . QL_EPSILON * m ) multiplier = z / xx ; else { final double talpha = ( 0.5 - rho * rho ) / ( 1.0 - rho ) ; final double tbeta = alpha - .5 ; final double tgamma = rho / ( 1 - rho ) ; multiplier = 1.0 - beta * z + ( tgamma - talpha + tbeta * tbeta * .5 ) * z * z ; } return ( alpha / D ) * multiplier * d ; }
computes the black equivalent volatility without validating parameters
