/src/main/java/net/finmath/equities/models/SviVolatilitySmile.java
dwdk = ( totalVariances.get( maxNegIndex + 1) - totalVariances.get( maxNegIndex) ) / ( logStrikes.get( maxNegIndex + 1) - logStrikes.get( maxNegIndex) ) ;final var c = ( totalVariances.get( nPoints - 1) - totalVariances.get( nPoints - 2) ) / ( logStrikes.get( nPoints - 1) - logStrikes.get( nPoints - 2) ) ;
final var c = ( totalVariances.get ( nPoints - 1 ) - totalVariances.get ( nPoints - 2 ) ) / ( logStrikes.get ( nPoints - 1 ) - logStrikes.get ( nPoints - 2 ) ) ;
if(k0 == 0.0) { final var atmIndex = logStrikes.indexOf(0.0); final var w = totalVariances.get(atmIndex); final var d2wdk2 = 2 * (totalVariances.get(atmIndex + 1) * totalVariances.get(atmIndex - 1) - 2 * w) / (Math.pow(logStrikes.get(atmIndex + 1), 2) + Math.pow(logStrikes.get(atmIndex - 1), 2)); <extra_id_0> final var p = (totalVariances.get(0) - totalVariances.get(1)) / (logStrikes.get(1) - logStrikes.get(0)); final var b = 0.5 * (c + p); final var rho = 1 - 2 * p / (c + p); final var m = b * (1 - rho * rho) * Math.abs(rho) / d2wdk2; final var sigma = m * Math.sqrt(1 - rho * rho) / rho;