maturityDate() public method

public maturityDate ( Date valueDate ) : Date
valueDate Date
return Date
Example #1
0
        protected override void initializeDates()
        {
            // dummy ibor index with curve/swap arguments
            IborIndex clonedIborIndex = iborIndex_.clone(termStructureHandle_);

            // do not pass the spread here, as it might be a Quote i.e. it can dinamically change
            swap_ = new MakeVanillaSwap(tenor_, clonedIborIndex, 0.0, fwdStart_)
                    .withFixedLegDayCount(fixedDayCount_)
                    .withFixedLegTenor(new Period(fixedFrequency_))
                    .withFixedLegConvention(fixedConvention_)
                    .withFixedLegTerminationDateConvention(fixedConvention_)
                    .withFixedLegCalendar(calendar_)
                    .withFloatingLegCalendar(calendar_);

            earliestDate_ = swap_.startDate();

            // Usually...
            latestDate_ = swap_.maturityDate();
            // ...but due to adjustments, the last floating coupon might
            // need a later date for fixing
            #if QL_USE_INDEXED_COUPON
            FloatingRateCoupon lastFloating = (FloatingRateCoupon)swap_.floatingLeg()[swap_.floatingLeg().Count - 1];
            Date fixingValueDate            = iborIndex_.valueDate(lastFloating.fixingDate());
            Date endValueDate = iborIndex_.maturityDate(fixingValueDate);
            latestDate_ = Date.Max(latestDate_, endValueDate);
            #endif
        }
Example #2
0
        protected override void initializeDates()
        {
            // why not using index_->fixingDays instead of settlementDays_
            Date settlement = iborIndex_.fixingCalendar().advance(evaluationDate_, iborIndex_.fixingDays(), TimeUnit.Days);

            earliestDate_ = iborIndex_.fixingCalendar().advance(settlement, periodToStart_,
                                                                iborIndex_.businessDayConvention(), iborIndex_.endOfMonth());
            latestDate_ = iborIndex_.maturityDate(earliestDate_);
            fixingDate_ = iborIndex_.fixingDate(earliestDate_);
        }
Example #3
0
 protected override void initializeDates()
 {
     earliestDate_ = iborIndex_.fixingCalendar().advance(evaluationDate_, iborIndex_.fixingDays(), TimeUnit.Days);
     latestDate_   = iborIndex_.maturityDate(earliestDate_);
     fixingDate_   = iborIndex_.fixingCalendar().advance(earliestDate_, -iborIndex_.fixingDays(), TimeUnit.Days);
 }