Base inflation-coupon pricer. The main reason we can't use FloatingRateCouponPricer as the base is that it takes a FloatingRateCoupon which takes an InterestRateIndex and we need an inflation index (these are lagged). The basic inflation-specific thing that the pricer has to do is deal with different lags in the index and the option e.g. the option could look 3 months back and the index 2. We add the requirement that pricers do inverseCap/Floor-lets. These are cap/floor-lets as usually defined, i.e. pay out if underlying is above/below a strike. The non-inverse (usual) versions are from a coupon point of view (a capped coupon has a maximum at the strike). We add the inverse prices so that conventional caps can be priced simply.
Inheritance: QLNet.Patterns.DefaultObservable, IObserver
コード例 #1
0
        public void setPricer(InflationCouponPricer pricer)
        {
            if (!checkPricerImpl(pricer))
            {
                throw new Exception("pricer given is wrong type");
            }

            if (pricer_ != null)
            {
                pricer_.unregisterWith(update);
            }
            pricer_ = pricer;
            if (pricer_ != null)
            {
                pricer_.registerWith(update);
            }
            update();
        }
コード例 #2
0
ファイル: InflationCoupon.cs プロジェクト: zhangz/QLNet
        public void setPricer(InflationCouponPricer pricer)
        {
            Utils.QL_REQUIRE(checkPricerImpl(pricer), () => "pricer given is wrong type");

            if (pricer_ != null)
            {
                pricer_.unregisterWith(update);
            }

            pricer_ = pricer;

            if (pricer_ != null)
            {
                pricer_.registerWith(update);
            }

            update();
        }
コード例 #3
0
 protected override bool checkPricerImpl(InflationCouponPricer i)
 {
     return(i is YoYInflationCouponPricer);
 }
コード例 #4
0
ファイル: CPICoupon.cs プロジェクト: Yenyenx/qlnet
 protected override bool checkPricerImpl(InflationCouponPricer pricer)
 {
     CPICouponPricer p = pricer as CPICouponPricer;
      return ( p != null );
 }
コード例 #5
0
 //! makes sure you were given the correct type of pricer
 // this can also done in external pricer setter classes via
 // accept/visit mechanism
 protected virtual bool checkPricerImpl(InflationCouponPricer i) { return false; }
コード例 #6
0
      public void setPricer(InflationCouponPricer pricer) 
      {
         if (!checkPricerImpl(pricer))
            throw new ApplicationException("pricer given is wrong type");

         if (pricer_ != null)
            pricer_.unregisterWith(update);
        pricer_ = pricer;
        if (pricer_ != null)
           pricer_.registerWith(update);
        update();
      }
コード例 #7
0
ファイル: CPICoupon.cs プロジェクト: fabricemineit/qlnet
        protected override bool checkPricerImpl(InflationCouponPricer pricer)
        {
            CPICouponPricer p = pricer as CPICouponPricer;

            return(p != null);
        }
コード例 #8
0
ファイル: YoYInflationCoupon.cs プロジェクト: jrviala/qlnet
 protected override bool checkPricerImpl(InflationCouponPricer i)
 {
    return (i is YoYInflationCouponPricer);
 }
コード例 #9
0
 //! makes sure you were given the correct type of pricer
 // this can also done in external pricer setter classes via
 // accept/visit mechanism
 protected virtual bool checkPricerImpl(InflationCouponPricer i)
 {
     return(false);
 }