示例#1
0
 public OISRateHelper(int settlementDays,
                      Period tenor, // swap maturity
                      Handle <Quote> fixedRate,
                      OvernightIndex overnightIndex)
     : base(fixedRate)
 {
     settlementDays_ = settlementDays;
     tenor_          = tenor;
     overnightIndex_ = overnightIndex;
     overnightIndex_.registerWith(update);
     initializeDates();
 }
示例#2
0
        public DatedOISRateHelper(Date startDate,
                                  Date endDate,
                                  Handle <Quote> fixedRate,
                                  OvernightIndex overnightIndex)

            : base(fixedRate)
        {
            overnightIndex.registerWith(update);

            // dummy OvernightIndex with curve/swap arguments
            // review here
            IborIndex      clonedIborIndex      = overnightIndex.clone(termStructureHandle_);
            OvernightIndex clonedOvernightIndex = clonedIborIndex as OvernightIndex;

            swap_ = new MakeOIS(new Period(), clonedOvernightIndex, 0.0)
                    .withEffectiveDate(startDate)
                    .withTerminationDate(endDate)
                    .withDiscountingTermStructure(termStructureHandle_);

            earliestDate_ = swap_.startDate();
            latestDate_   = swap_.maturityDate();
        }