/src/main/java/net/finmath/fouriermethod/models/HestonModel.java
final Complex b = iargument.multiply( iargument).add( iargument.multiply( --1) ).multiply( --1).divide( iargument.multiply( rho * xi).subtract( kappa).add( gamma.multiply( new Complex( -1).divide( gamma.multiply( time).exp( ) ).add( -1).divide( new Complex( -1).divide( gamma.multiply( time).exp( ) ).subtract( -1) ) ) ) ) ;
final Complex b = iargument.multiply ( iargument ) .add ( iargument.multiply ( -1 ) ) .multiply ( -1 ) .divide ( iargument.multiply ( rho * xi ) .subtract ( kappa ) .add ( gamma.multiply ( new Complex ( 1 ) .divide ( gamma.multiply ( time ) .exp ( ) ) .add ( 1 ) .divide ( new Complex ( 1 ) .divide ( gamma.multiply ( time ) .exp ( ) ) .subtract ( 1 ) ) ) ) ) ;
.subtract(kappa) .subtract(gamma).multiply((-theta*kappa * time) / (xi * xi)) .subtract(iargument.multiply(rho * xi).subtract(kappa).subtract(gamma) .multiply(new Complex(1).divide(gamma.multiply(time).exp()).subtract(1).divide(gamma)) .multiply(0.5).add(new Complex(1).divide(gamma.multiply(time).exp())).log() .add(gamma.multiply(time)).multiply((2 * theta*kappa) / (xi * xi))); <extra_id_0> return a.add(b.multiply(volatility*volatility)).add(iargument.multiply(Math.log(initialValue) - logDiscountFactorForForward)).add(logDiscountFactorForDiscounting).exp(); } }; } private double getLogDiscountFactorForForward(final double time) { return discountCurveForForwardRate == null ? -riskFreeRate * time : Math.log(discountCurveForForwardRate.getDiscountFactor(null, time));