public override void initialize(InflationCoupon coupon)
        {
            coupon_ = coupon as YoYInflationCoupon;
            gearing_ = coupon_.gearing();
            spread_ = coupon_.spread();
            PaymentDate = coupon_.Date;
            YoYInflationIndex y = (YoYInflationIndex)(coupon.index());
            RateCurve = y.yoyInflationTermStructure().link.nominalTermStructure();

            // past or future fixing is managed in YoYInflationIndex::fixing()
            // use yield curve from index (which sets discount)

            discount_ = 1.0;
            if (PaymentDate > RateCurve.link.referenceDate())
                discount_ = RateCurve.link.discount(PaymentDate);

            spreadLegValue_ = spread_ * coupon_.accrualPeriod() * discount_;
        }
Exemple #2
0
        public override void initialize(InflationCoupon coupon)
        {
            coupon_      = coupon as YoYInflationCoupon;
            gearing_     = coupon_.gearing();
            spread_      = coupon_.spread();
            paymentDate_ = coupon_.date();
            YoYInflationIndex y = (YoYInflationIndex)(coupon.index());

            rateCurve_ = y.yoyInflationTermStructure().link.nominalTermStructure();

            // past or future fixing is managed in YoYInflationIndex::fixing()
            // use yield curve from index (which sets discount)

            discount_ = 1.0;
            if (paymentDate_ > rateCurve_.link.referenceDate())
            {
                discount_ = rateCurve_.link.discount(paymentDate_);
            }

            spreadLegValue_ = spread_ * coupon_.accrualPeriod() * discount_;
        }
Exemple #3
0
 public virtual void initialize(InflationCoupon i)
 {
 }
Exemple #4
0
      public override void initialize( InflationCoupon coupon)
      {
         coupon_ = coupon as CPICoupon;
         gearing_ = coupon_.fixedRate();
         spread_ = coupon_.spread();
         paymentDate_ = coupon_.date();
         rateCurve_ = ((ZeroInflationIndex)coupon.index())
            .zeroInflationTermStructure().link
            .nominalTermStructure();

         // past or future fixing is managed in YoYInflationIndex::fixing()
         // use yield curve from index (which sets discount)

         discount_ = 1.0;
         if (paymentDate_ > rateCurve_.link.referenceDate())
            discount_ = rateCurve_.link.discount(paymentDate_);

         spreadLegValue_ = spread_ * coupon_.accrualPeriod()* discount_;
      }
 public virtual void initialize(InflationCoupon i) {}