if (stubType == StubType.FRONTSHORT || stubType == StubType.FRONTLONG) {
final List<ZonedDateTime> reversedCashflowSchedule = new ArrayList<>();
ZonedDateTime date = endDate;
while (date.isAfter(startDate)) {
reversedCashflowSchedule.add(date);
date = date.minus(cds.getCouponFrequency().getPeriod());
}
// TODO : Check the FRONTSHORT/FRONTLONG logic here
if (reversedCashflowSchedule.size() == 1 || date.isEqual(startDate) || stubType == StubType.FRONTSHORT) {
reversedCashflowSchedule.add(startDate);
} else {