Login  Register

Re: setCouponPricer(s)

Posted by Luigi Ballabio on Dec 13, 2016; 2:23pm
URL: http://quantlib.414.s1.nabble.com/setCouponPricer-s-tp17915p17916.html

Hi,
    I don't think there's a function that does that.  If you want to get fancy, you can write a visitor similar to PricerSetter but storing both pricers and setting the appropriate one; otherwise, you can loop over the coupons and find out their type yourself.

Luigi


On Tue, Dec 13, 2016 at 12:56 PM Peter Caspers <[hidden email]> wrote:
Hi,

say I have a Leg with Libor coupons, floored Libor coupons, CMS coupons, etc. all mixed. I also have a IborCouponPricer and a CmsCouponPricer and want to attach these to the “matching" coupons.

How can I do that in one (not too long) line of code? It seems setCouponPricer() and setCouponPricers() do not suit really, but I might be missing the obvious...

Kind Regards
Peter
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev