No coupon-pricers in swigged quantlib version for Java

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

No coupon-pricers in swigged quantlib version for Java

Egon R
Dear all,

I am using quantlib in Java (via Swig) since we are developping a GUI on Java.
Today, I tried to price a Cap. I wanted to use the IborLeg but it does not exist in my swigged version.
Then, I tried to price the cap using a standard leg, adding the coupons by my own (using IborCoupon, which I do have).
Then, I realized, that I do not have any pricers for coupons. Moreover, I do not have the method to set a pricer to the general class "Instrument". Hence, this approach does not work either. The same for floating rate bonds since there, too, I cannot set a pricer.

Does anyone know this problem and/or has a fix for it.

I took a look at the swig-interface-files. There all these methods and objects do exist. Somehow the swig procedure did not convert these objects/routines. I don't have any experience in swig-coding or modifying swig-interface-files. Hence, I decided to "contact" other quantlib users.

Any suggestions/help is really welcome.
Thanks a lot.

Best regards.
Egon
Reply | Threaded
Open this post in threaded view
|

Re: No coupon-pricers in swigged quantlib version for Java

Luigi Ballabio
On Mon, 2009-02-23 at 10:34 -0800, Egon R wrote:
> I am using quantlib in Java (via Swig) since we are developping a GUI on
> Java.
> Today, I tried to price a Cap. I wanted to use the IborLeg but it does not
> exist in my swigged version.

It does exist. But in the SWIG interfaces it's defined as a
free-standing function, not as a class.  As you can't have that in Java,
SWIG defines it as a static function in the org.quantlib.QuantLib class.

Luigi


--

Poets have been mysteriously silent on the subject of cheese.
-- Gilbert K. Chesterton



------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users