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

            foreach (CashFlow cf in leg)
            {
                cf.accept(setter);
            }
        }
Esempio n. 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
      }
Esempio n. 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);
 }
Esempio n. 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
        }
Esempio n. 5
0
 public PricerSetter(FloatingRateCouponPricer pricer)
 {
     pricer_ = pricer;
 }
Esempio n. 6
0
 public static void setCouponPricer(List<CashFlow> leg, FloatingRateCouponPricer pricer)
 {
     PricerSetter setter = new PricerSetter(pricer);
     foreach (CashFlow cf in leg) {
         cf.accept(setter);
     }
 }
Esempio n. 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);
 }
Esempio n. 9
0
 public PricerSetter(FloatingRateCouponPricer pricer)
 {
     pricer_ = pricer;
 }
Esempio n. 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);
 }