* @param g2Data The G2++ parameters and the curves.
* @return The present value.
*/
public MultipleCurrencyAmount presentValue(final SwaptionPhysicalFixedIbor swaption, final AnnuityPaymentFixed cfe, final G2ppProviderInterface g2Data) {
final Currency ccy = swaption.getCurrency();
final MulticurveProviderInterface multicurves = g2Data.getMulticurveProvider();
final int nbCf = cfe.getNumberOfPayments();
final double[] cfa = new double[nbCf];
final double[] t = new double[nbCf];
for (int loopcf = 0; loopcf < nbCf; loopcf++) {
cfa[loopcf] = -Math.signum(cfe.getNthPayment(0).getAmount()) * cfe.getNthPayment(loopcf).getAmount();
t[loopcf] = cfe.getNthPayment(loopcf).getPaymentTime();
}
final double rhog2pp = g2Data.getG2ppParameters().getCorrelation();
final double[][] ht0 = MODEL_G2PP.volatilityMaturityPart(g2Data.getG2ppParameters(), t[0], t);
final double[] dfswap = new double[nbCf];
final double[] p0 = new double[nbCf];
final double[] cP = new double[nbCf];
for (int loopcf = 0; loopcf < nbCf; loopcf++) {
dfswap[loopcf] = multicurves.getDiscountFactor(ccy, t[loopcf]);
p0[loopcf] = dfswap[loopcf] / dfswap[0];
cP[loopcf] = cfa[loopcf] * p0[loopcf];
}
final double k = -cfa[0];
double b0 = 0.0;