/src/main/java/net/finmath/singleswaprate/products/ConstantMaturitySwap.java
final double b = ( payoffUnit - swapAnnuity - a) / swaprate;
final double b = ( payoffUnit / swapAnnuity - a ) / swaprate;
final double swapAnnuity, final double swapFixing, final double swapMaturity, final double payoffUnit) { final double a = 1.0/(swapMaturity-swapFixing); <extra_id_0> final double convexityAdjustment = (volatility*volatility*swapFixing); final double valueAdjusted = swaprate + convexityAdjustment; return (a * valueAdjusted + b * valueAdjusted * valueAdjusted + b * convexityAdjustment) / (a + b * valueAdjusted); } }