generic pricer for floating-rate coupons
Inheritance: QLNet.Patterns.DefaultObservable, IObserver
Example #1
0
        public static void setCouponPricer(List <CashFlow> leg, FloatingRateCouponPricer pricer)
        {
            PricerSetter setter = new PricerSetter(pricer);

            foreach (CashFlow cf in leg)
            {
                cf.accept(setter);
            }
        }
Example #2
0
      public virtual void setPricer(FloatingRateCouponPricer pricer)
      {
         if (pricer_ != null)   // remove from the old observable
            pricer_.unregisterWith(update);

         pricer_ = pricer;

         if (pricer_ != null)
            pricer_.registerWith(update);      // add to observers of new pricer

         update();                                   // fire the change event to notify observers of this
      }
Example #3
0
 public override void setPricer(FloatingRateCouponPricer pricer)
 {
     if (pricer_ != null)
     {
         pricer_.unregisterWith(update);
     }
     pricer_ = pricer;
     if (pricer_ != null)
     {
         pricer_.registerWith(update);
     }
     update();
     underlying_.setPricer(pricer);
 }
Example #4
0
        public virtual void setPricer(FloatingRateCouponPricer pricer)
        {
            if (pricer_ != null) // remove from the old observable
            {
                pricer_.unregisterWith(update);
            }

            pricer_ = pricer;

            if (pricer_ != null)
            {
                pricer_.registerWith(update);  // add to observers of new pricer
            }
            update();                          // fire the change event to notify observers of this
        }
Example #5
0
 public PricerSetter(FloatingRateCouponPricer pricer)
 {
     pricer_ = pricer;
 }
Example #6
0
 public static void setCouponPricer(List<CashFlow> leg, FloatingRateCouponPricer pricer)
 {
     PricerSetter setter = new PricerSetter(pricer);
     foreach (CashFlow cf in leg) {
         cf.accept(setter);
     }
 }
Example #7
0
 public override void setPricer(FloatingRateCouponPricer pricer)
 {
    base.setPricer(pricer);
    underlying_.setPricer(pricer);
 }
 public override void setPricer(FloatingRateCouponPricer pricer)
 {
     base.setPricer(pricer);
     underlying_.setPricer(pricer);
 }
Example #9
0
 public PricerSetter(FloatingRateCouponPricer pricer)
 {
     pricer_ = pricer;
 }
Example #10
0
 public override void setPricer(FloatingRateCouponPricer pricer)
 {
     if (pricer_ != null)
     pricer_.unregisterWith(update);
      pricer_ = pricer;
      if (pricer_ != null)
     pricer_.registerWith(update);
      update();
      underlying_.setPricer(pricer);
 }