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

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