for (int i = 0; i < _numberOfCashInstruments; i++) {
// TODO : Check if rate <= 0
final ZonedDateTime startDate = _baseDate;
final ZonedDateTime endDate = _cashDates[i];
final double rateYF = TimeCalculator.getTimeBetween(startDate, endDate, ACT_360);
// TODO : Check denom != 0
final double denom = 1.0 + _cashRates[i] * rateYF;
zcCashDiscount[i] = 1.0 / denom;
final double rateYF2 = TimeCalculator.getTimeBetween(startDate, endDate, ACT_365);
zcCashRates[i] = Math.pow(zcCashDiscount[i], -1.0 / (_basis * rateYF2)) - 1.0;
//_zCurveDates[i] = _cashDates[i];
_zCurveRates[i] = _cashRates[i];
_zCurveCCRates[i] = zcCashRates[i];
_zCurveDates.add(_cashDates[i]);
_zCurveContinuouslyCompoundedRates.add(_zCurveCCRates[i]);
_zCurveDiscountFactors.add(zcCashDiscount[i]);
}
final ZonedDateTime lastMMDate = _cashDates[_cashDates.length - 1];
// ----------------------------------------------------------------------
// Add the swap instruments
// TODO : Check is numSwaps == 0
// -----------------------------------
// Compute the last stub date
ZonedDateTime lastStubDate;
if (_numberOfCashInstruments < 1) {
lastStubDate = _baseDate;
} else {
lastStubDate = _cashDates[_numberOfCashInstruments - 1];