Question on using VanillaSwap

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Question on using VanillaSwap

Pornput Suriyamongkol
Hello,
 
I tried to create a VanillaSwap object from 2 Schedule objects as in the example codes. However when I used the Schedule objects constructed from vector of Dates (the payment dates are irregular) I got "full interface not available". Anybody knows the work around?
 
Thank you,
Book


Connect and share in new ways with Windows Live. Get it now!
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Question on using VanillaSwap

Luigi Ballabio
On Tue, 2008-02-12 at 02:28 +0000, Pornput Suriyamongkol wrote:
> I tried to create a VanillaSwap object from 2 Schedule objects as in
> the example codes. However when I used the Schedule objects
> constructed from vector of Dates (the payment dates are irregular) I
> got "full interface not available". Anybody knows the work around?

Hi,
        the workaround is a bit tedious---you'll have to create two
vector<shared_ptr<CashFlow> > yourself (one filled with FixedRateCoupons
and the other with IborCoupons) and use them to create a Swap (not
VanillaSwap) instance. We'll try to allow irregular dates in a future
release.  (If you want to have a try at it yourself and send us a patch,
please do so. You'll have to modify the FixedRateLeg class and the
FloatingLeg function so that they detect an irregular schedule and
switch to a safe behavior.)

Later,
        Luigi


--

Every solution breeds new problems.
-- unknown



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users