示例#1
0
        public double getCPR(Date valDate)
        {
            Thirty360 dayCounter = new Thirty360();
            int       d          = dayCounter.dayCount(_startDate, valDate) / 30 + 1;

            return((d <= 30 ? 0.06 * (d / 30d) : 0.06) * _multi);
        }
示例#2
0
 public CPILeg(Schedule schedule,
               ZeroInflationIndex index,
               double baseCPI,
               Period observationLag)
 {
     schedule_          = schedule;
     index_             = index;
     baseCPI_           = baseCPI;
     observationLag_    = observationLag;
     paymentDayCounter_ = new Thirty360();
     paymentAdjustment_ = BusinessDayConvention.ModifiedFollowing;
     paymentCalendar_   = schedule.calendar();
     fixingDays_        = new List <int>()
     {
         0
     };
     observationInterpolation_ = InterpolationType.AsIndex;
     subtractInflationNominal_ = true;
     spreads_ = new List <double>()
     {
         0
     };
 }