void setCorrelation(
                  const Handle<Quote> &correlation = Handle<Quote>()) {
     unregisterWith(correlation_);
     correlation_ = correlation;
     registerWith(correlation_);
     update();
 }
Example #2
0
 void setCapletVolatility(
                     const Handle<OptionletVolatilityStructure>& v =
                             Handle<OptionletVolatilityStructure>()) {
     unregisterWith(capletVol_);
     capletVol_ = v;
     registerWith(capletVol_);
     update();
 }
Example #3
0
 void setSwaptionVolatility(
                     const Handle<SwaptionVolatilityStructure>& v=
                             Handle<SwaptionVolatilityStructure>()) {
     unregisterWith(swaptionVol_);
     swaptionVol_ = v;
     registerWith(swaptionVol_);
     update();
 }
 void YoYInflationCapFloorEngine::setVolatility(
         const Handle<YoYOptionletVolatilitySurface> &v) {
     if (!volatility_.empty())
         unregisterWith(volatility_);
     volatility_ = v;
     registerWith(volatility_);
     update();
 }
Example #5
0
 void InflationCoupon::setPricer(const boost::shared_ptr<InflationCouponPricer>& pricer) {
     QL_REQUIRE(checkPricerImpl(pricer),"pricer given is wrong type");
     if (pricer_)
         unregisterWith(pricer_);
     pricer_ = pricer;
     if (pricer_)
         registerWith(pricer_);
     update();
 }
Example #6
0
 void setPricer(
     const boost::shared_ptr<FloatingRateCouponPricer>& pricer) {
     if (pricer_)
         unregisterWith(pricer_);
     pricer_ = pricer;
     if (pricer_)
         registerWith(pricer_);
     update();
     underlying_->setPricer(pricer);
 }
Example #7
0
 inline void Handle<T>::Link::linkTo(const boost::shared_ptr<T>& h,
                                     bool registerAsObserver) {
     if ((h != h_) || (isObserver_ != registerAsObserver)) {
         if (h_ && isObserver_)
             unregisterWith(h_);
         h_ = h;
         isObserver_ = registerAsObserver;
         if (h_ && isObserver_)
             registerWith(h_);
         notifyObservers();
     }
 }
 void setMeanReversion(const Handle<Quote>& meanReversion) {
     unregisterWith(meanReversion_);
     meanReversion_ = meanReversion;
     registerWith(meanReversion_);
     update();
 }