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_; }
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_; }
public virtual void initialize(InflationCoupon i) { }
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) {}