示例#1
0
        //! \name InterestRateIndex interface
        public override Date maturityDate(Date valueDate)
        {
            Date fixingDate    = fixingCalendar_.advance(valueDate, -1, TimeUnit.Days);
            Date nextWednesday = Utils.previousWednesday(fixingDate + 7);

            return(fixingCalendar_.advance(nextWednesday, 1, TimeUnit.Days));
        }
示例#2
0
 //! \name Date calculations
 /*! This method returns a schedule of fixing dates between start and end. */
 public Schedule fixingSchedule(Date start, Date end)
 {
     return(new MakeSchedule().from(Utils.previousWednesday(start))
            .to(Utils.nextWednesday(end))
            .withFrequency(Frequency.Weekly)
            .withCalendar(fixingCalendar_)
            .withConvention(BusinessDayConvention.Following)
            .forwards()
            .value());
 }
示例#3
0
 public override bool isValidFixingDate(Date fixingDate)
 {
     // either the fixing date is last Wednesday, or all days
     // between last Wednesday included and the fixing date are
     // holidays
     for (Date d = Utils.previousWednesday(fixingDate); d < fixingDate; ++d)
     {
         if (fixingCalendar_.isBusinessDay(d))
         {
             return(false);
         }
     }
     // also, the fixing date itself must be a business day
     return(fixingCalendar_.isBusinessDay(fixingDate));
 }