This post was updated on .
Hello,
I'm developing a JAVA Web application for financial calculations. I'm using the JAVA wrapper that it allows me to use C++ QuantLib. I'm trying to add BasisPointValue and ZSpread methods from CashFlows.cpp by adding their prototypes to CashFlows.i SWIG interface. After generating new JAVA Quantlib library and replacing it at the project, the methods are still unavailable. One year ago I had to include this two methods in C# wrapper and it worked perfectly, but for JAVA it doesn't work properly. (This is the C# thread I opened a year ago: BasisPointValue method does not exist in QuantLib for C#) What am I doing wrong this time? Thank you very much. Best regards. |
This is the error I receive when I try to access CashFlows.BasisPointValue()
I use other 13 methods from CashFlows class and all of them are available. ¿Any clue? Thank you very much. |
How did you build the Java module? Did you recompile the wrappers
after regenerating them? Luigi On Wed, Feb 20, 2013 at 9:32 AM, sergvil <[hidden email]> wrote: > This is the error I receive when I try to access CashFlows.BasisPointValue() > > >> 09:05:59,125 ERROR [TxPolicy] javax.ejb.EJBTransactionRolledbackException: >> java.lang.UnsatisfiedLinkError: CashFlows_basisPointValue__SWIG_4 > > I use other 13 methods from CashFlows class and all of them are available. > > ¿Any clue? > > Thank you very much. > > > > > -- > View this message in context: http://quantlib.10058.n7.nabble.com/BasisPointValue-and-ZSpread-methods-do-not-exist-for-JAVA-tp14052p14056.html > Sent from the quantlib-users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_feb > _______________________________________________ > QuantLib-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/quantlib-users ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hello Luigi,
I'm working on linux and I'm following instructions from this link to build SWIG. The article has been written by Tito Ingargiola, who belongs to this mailing list. http://puppetmastertrading.com/blog/2008/06/14/using-quantlib-from-java/ First, I modify cashflows.i, adding the code I need. Then I only execute the instructions described on "Building Quantlib-SWIG" section (I think that QuantLib is not necessary because I had built it one time at the beginning, is it?). On Eclipse I can put the method on code with no errors (so it seems that methods are correctly added to QuantLib.jar). But on execution time eclipse shows the error I wrote on my last reply. Thank you very much. |
It seems like the jar is updated, but the shared library containing
the C++ wrapper code is not. When you run make -C Java after modifying cashflows.i, you should see first swig being run, and then the wrappers being compiled (this last step will take quite a while). Do you see it? Also, is it possible that you're picking up an old version of libQuantLibJNI.so instead of the one you just compiled? Luigi On Wed, Feb 20, 2013 at 11:17 AM, sergvil <[hidden email]> wrote: > Hello Luigi, > > I'm working on linux and I'm following instructions from this link to build > SWIG. The article has been written by Tito Ingargiola, who belongs to this > mailing list. > > http://puppetmastertrading.com/blog/2008/06/14/using-quantlib-from-java/ > <http://puppetmastertrading.com/blog/2008/06/14/using-quantlib-from-java/> > > First, I modify cashflows.i, adding the code I need. Then I only execute the > instructions described on "Building Quantlib-SWIG" section (I think that > QuantLib is not necessary because I had built it one time at the beginning, > is it?). > > On Eclipse I can put the method on code with no errors (so it seems that > methods are correctly added to QuantLib.jar). But on execution time eclipse > shows the error I wrote on my last reply. > > Thank you very much. > > > > > > -- > View this message in context: http://quantlib.10058.n7.nabble.com/BasisPointValue-and-ZSpread-methods-do-not-exist-for-JAVA-tp14052p14058.html > Sent from the quantlib-users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_feb > _______________________________________________ > QuantLib-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/quantlib-users ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hello Luigi,
I have executed all the SWIG process again after modifying cashflows.i and I'm still receiving the same error on execution. This is the output for: 1) make -C Java 2) sudo make Install I think that the process finishes correctly, but I'm not sure if libQuantLibJNI.so copied to /usr/local/lib is well generated or if this is the one I have to use. Thank you very much. Sergio. |
It looks like it's installed correctly, and yes, that's the one.
Strange. Try posting your modified cashflows.i and I'll try to see if it works for me. Luigi On Thu, Feb 21, 2013 at 12:45 PM, sergvil <[hidden email]> wrote: > Hello Luigi, > > I have executed all the SWIG process again after modifying cashflows.i and > I'm still receiving the same error on execution. > > This is the output for: > > 1) make -C Java > > >> make: se ingresa al directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Java' >> mkdir -p org/quantlib > * >> /usr/bin/swig -java -c++ -outdir org/quantlib \ >> -package org.quantlib -o quantlib_wrap.cpp ../SWIG/quantlib.i > * >> make all-am >> make[1]: se ingresa al directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Java' >> g++ -c quantlib_wrap.cpp -fno-strict-aliasing -g -O2 >> -I/home/arena/Desarrollo/jdk/jdk1.5.0_22/include >> -I/home/arena/Desarrollo/jdk/jdk1.5.0_22/include/linux `quantlib-config >> --cflags` -o quantlib_wrap.o >> g++ -shared quantlib_wrap.o -Wl -o libQuantLibJNI.so `quantlib-config >> --libs` >> mkdir -p bin >> find org/quantlib -name '*.java' | xargs >> /home/arena/Desarrollo/jdk/jdk1.5.0_22/bin/javac -d bin >> /home/arena/Desarrollo/jdk/jdk1.5.0_22/bin/jar cf QuantLib.jar -C bin org >> make[1]: se sale del directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Java' >> make: se sale del directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Java' > > 2) sudo make Install > > >> Making install in CSharp >> make[1]: se ingresa al directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/CSharp' >> /usr/bin/swig -csharp -c++ -outdir csharp \ >> -namespace QuantLib -o cpp/quantlib_wrap.cpp >> ../SWIG/quantlib.i >> make install-am >> make[2]: se ingresa al directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/CSharp' >> make[3]: se ingresa al directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/CSharp' >> make[3]: No se hace nada para `install-exec-am'. >> make[3]: No se hace nada para `install-data-am'. >> make[3]: se sale del directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/CSharp' >> make[2]: se sale del directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/CSharp' >> make[1]: se sale del directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/CSharp' >> Making install in Guile >> make[1]: se ingresa al directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Guile' >> /usr/bin/swig -guile -c++ -Linkage passive -scmstub -gh \ >> -o quantlib_wrap.cpp ../SWIG/quantlib.i >> make install-am >> make[2]: se ingresa al directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Guile' >> make[3]: se ingresa al directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Guile' >> make[3]: No se hace nada para `install-exec-am'. >> make[3]: No se hace nada para `install-data-am'. >> make[3]: se sale del directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Guile' >> make[2]: se sale del directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Guile' >> make[1]: se sale del directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Guile' > * >> Making install in Java >> make[1]: se ingresa al directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Java' >> make install-am >> make[2]: se ingresa al directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Java' >> make[3]: se ingresa al directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Java' >> cp -p libQuantLibJNI.so //usr/local/lib/libQuantLibJNI.so >> cp -p QuantLib.jar //usr/local/lib/QuantLib.jar >> make[3]: No se hace nada para `install-data-am'. >> make[3]: se sale del directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Java' >> make[2]: se sale del directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Java' >> make[1]: se sale del directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Java' > * >> Making install in MzScheme >> make[1]: se ingresa al directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/MzScheme' >> /usr/bin/swig -mzscheme -c++ -o quantlib_wrap.cpp ../SWIG/quantlib.i >> make install-am >> make[2]: se ingresa al directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/MzScheme' >> make[3]: se ingresa al directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/MzScheme' >> make[3]: No se hace nada para `install-exec-am'. >> make[3]: No se hace nada para `install-data-am'. >> make[3]: se sale del directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/MzScheme' >> make[2]: se sale del directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/MzScheme' >> make[1]: se sale del directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/MzScheme' >> Making install in OCaml >> make[1]: se ingresa al directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/OCaml' >> /usr/bin/swig -ocaml -c++ -o quantlib_wrap.c ../SWIG/quantlib.i >> ../SWIG/basketoptions.i:72: Warning 467: Overloaded method >> AverageBasketPayoffPtr::AverageBasketPayoffPtr(boost::shared_ptr< Payoff > >> const,Array const &) not supported (no type checking rule for >> 'boost::shared_ptr< Payoff > const'). >> make install-am >> make[2]: se ingresa al directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/OCaml' >> make[3]: se ingresa al directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/OCaml' >> make[3]: No se hace nada para `install-exec-am'. >> make[3]: No se hace nada para `install-data-am'. >> make[3]: se sale del directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/OCaml' >> make[2]: se sale del directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/OCaml' >> make[1]: se sale del directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/OCaml' >> Making install in Perl >> make[1]: se ingresa al directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Perl' >> /usr/bin/swig -perl -c++ -o quantlib_wrap.cpp ../SWIG/quantlib.i >> make install-am >> make[2]: se ingresa al directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Perl' >> make -f Makefile.quantlib >> make[3]: se ingresa al directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Perl' >> Skip blib/lib/QuantLib.pm (unchanged) >> cc -c -D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV >> -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE >> -D_FILE_OFFSET_BITS=64 -g -O2 -fno-strict-aliasing -Wno-unused >> -Wno-uninitialized -Wno-sign-compare -Wno-write-strings >> -DVERSION=\"1.2\" -DXS_VERSION=\"1.2\" -fPIC >> "-I/usr/lib/perl5/5.14.2/i586-linux-thread-multi/CORE" quantlib_wrap.cpp >> rm -f blib/arch/auto/QuantLib/QuantLib.so >> LD_RUN_PATH="/usr/local/lib" cc -shared -fomit-frame-pointer >> -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector >> -funwind-tables -fasynchronous-unwind-tables -g -Wall -pipe >> quantlib_wrap.o -o blib/arch/auto/QuantLib/QuantLib.so \ >> -lQuantLib \ >> >> chmod 755 blib/arch/auto/QuantLib/QuantLib.so >> make[3]: se sale del directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Perl' >> touch .build-stamp >> make[3]: se ingresa al directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Perl' >> make -f Makefile.quantlib install >> make[4]: se ingresa al directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Perl' >> Files found in blib/arch: installing files in blib/lib into architecture >> dependent library tree >> Appending installation info to >> /usr/local/lib/perl5/5.14.2/i586-linux-thread-multi/perllocal.pod >> make[4]: se sale del directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Perl' >> make[3]: No se hace nada para `install-data-am'. >> make[3]: se sale del directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Perl' >> make[2]: se sale del directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Perl' >> make[1]: se sale del directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Perl' >> Making install in Python >> make[1]: se ingresa al directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Python' >> /usr/bin/swig -python -c++ -modern -outdir QuantLib \ >> -o QuantLib/quantlib_wrap.cpp ../SWIG/quantlib.i >> make install-am >> make[2]: se ingresa al directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Python' >> CXXFLAGS="-g -O2 -fno-strict-aliasing -Wno-unused -Wno-uninitialized >> -Wno-sign-compare -Wno-write-strings" /usr/bin/python setup.py build >> running build >> running build_py >> copying QuantLib/QuantLib.py -> build/lib.linux-i686-2.7/QuantLib >> running build_ext >> sh: quantlib-config: no se encontró la orden >> sh: quantlib-config: no se encontró la orden >> building 'QuantLib._QuantLib' extension >> g++ -fno-strict-aliasing -g -O2 -DNDEBUG -fomit-frame-pointer >> -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector >> -funwind-tables -fasynchronous-unwind-tables -g -fPIC >> -I/usr/include/python2.7 -c QuantLib/quantlib_wrap.cpp -o >> build/temp.linux-i686-2.7/QuantLib/quantlib_wrap.o -Wno-unused -g -O2 >> -fno-strict-aliasing -Wno-unused -Wno-uninitialized -Wno-sign-compare >> -Wno-write-strings >> QuantLib/quantlib_wrap.cpp:149:20: fatal error: Python.h: No existe el >> fichero o el directorio >> compilation terminated. >> error: command 'g++' failed with exit status 1 >> make[2]: *** [.build-stamp] Error 1 >> make[2]: se sale del directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Python' >> make[1]: *** [install] Error 2 >> make[1]: se sale del directorio >> `/home/arena/Desarrollo/MathLibs/QuantLib-SWIG-1.2/Python' >> make: *** [install-recursive] Error 1 > > I think that the process finishes correctly, but I'm not sure if > libQuantLibJNI.so copied to /usr/local/lib is well generated or if this is > the one I have to use. > > Thank you very much. > Sergio. > > > > -- > View this message in context: http://quantlib.10058.n7.nabble.com/BasisPointValue-and-ZSpread-methods-do-not-exist-for-JAVA-tp14052p14063.html > Sent from the quantlib-users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_feb > _______________________________________________ > QuantLib-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/quantlib-users ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
This post was updated on .
In reply to this post by sergvil
Hello Luigi,
Ok, this is my modified cashflows.i I only added BasisPointValue and Zspread methods at the end. <<Attached on next reply>> Thank you very much. Sergio. |
May you attach it? For some reason inlining it in the message added
noise at the beginning of the lines. On Thu, Feb 21, 2013 at 12:58 PM, sergvil <[hidden email]> wrote: > Hello Luigi, > > Ok, this is my modified cashflows.i > > I only added BasisPointValue and Zspread methods at the end. > > > /* > Copyright (C) 2000, 2001, 2002, 2003 RiskMap srl > Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 StatPro Italia srl > Copyright (C) 2005 Dominic Thuillier > Copyright (C) 2010, 2011 Lluis Pujol Bajador > > This file is part of QuantLib, a free-software/open-source library > for financial quantitative analysts and developers - http://quantlib.org/ > > QuantLib is free software: you can redistribute it and/or modify it > under the terms of the QuantLib license. You should have received a > copy of the license along with this program; if not, please email > <[hidden email]>. The license is also available online at > <http://quantlib.org/license.shtml>. > > This program is distributed in the hope that it will be useful, but WITHOUT > ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > FITNESS > FOR A PARTICULAR PURPOSE. See the license for more details. > */ > > > #ifndef quantlib_cash_flows_i > #define quantlib_cash_flows_i > > %include date.i > %include types.i > %include calendars.i > %include daycounters.i > %include indexes.i > %include termstructures.i > %include scheduler.i > %include vectors.i > %include volatilities.i > > %{ > using QuantLib::CashFlow; > %} > > %ignore CashFlow; > class CashFlow { > public: > Real amount() const; > Date date() const; > }; > > %template(CashFlow) boost::shared_ptr<CashFlow>; > IsObservable(boost::shared_ptr<CashFlow>); > > #if defined(SWIGCSHARP) > SWIG_STD_VECTOR_ENHANCED( boost::shared_ptr<CashFlow> ) > #endif > %template(Leg) std::vector<boost::shared_ptr<CashFlow> >; > typedef std::vector<boost::shared_ptr<CashFlow> > Leg; > > > // implementations > > %{ > using QuantLib::SimpleCashFlow; > using QuantLib::Coupon; > using QuantLib::FixedRateCoupon; > using QuantLib::IborCoupon; > using QuantLib::Leg; > using QuantLib::FloatingRateCoupon; > > typedef boost::shared_ptr<CashFlow> SimpleCashFlowPtr; > typedef boost::shared_ptr<CashFlow> CouponPtr; > typedef boost::shared_ptr<CashFlow> IborCouponPtr; > typedef boost::shared_ptr<CashFlow> FixedRateCouponPtr; > typedef boost::shared_ptr<CashFlow> FloatingRateCouponPtr; > %} > > %rename(SimpleCashFlow) SimpleCashFlowPtr; > class SimpleCashFlowPtr : public boost::shared_ptr<CashFlow> { > public: > %extend { > SimpleCashFlowPtr(Real amount, const Date& date) { > return new SimpleCashFlowPtr(new SimpleCashFlow(amount,date)); > } > } > }; > > %rename(Coupon) CouponPtr; > class CouponPtr : public boost::shared_ptr<CashFlow> { > private: > CouponPtr(); > public: > %extend { > Real nominal() { > return boost::dynamic_pointer_cast<Coupon>(*self)->nominal(); > } > Date accrualStartDate() { > return boost::dynamic_pointer_cast<Coupon>(*self) > ->accrualStartDate(); > } > Date accrualEndDate() { > return boost::dynamic_pointer_cast<Coupon>(*self) > ->accrualEndDate(); > } > Date referencePeriodStart() { > return boost::dynamic_pointer_cast<Coupon>(*self) > ->referencePeriodStart(); > } > Date referencePeriodEnd() { > return boost::dynamic_pointer_cast<Coupon>(*self) > ->referencePeriodEnd(); > } > Real rate() { > return boost::dynamic_pointer_cast<Coupon>(*self)->rate(); > } > Time accrualPeriod() { > return boost::dynamic_pointer_cast<Coupon>(*self) > ->accrualPeriod(); > } > BigInteger accrualDays() { > return boost::dynamic_pointer_cast<Coupon>(*self) > ->accrualDays(); > } > DayCounter dayCounter() const { > return boost::dynamic_pointer_cast<Coupon>(*self) > ->dayCounter(); > } > Real accruedAmount(const Date& date) { > return boost::dynamic_pointer_cast<Coupon>(*self) > ->accruedAmount(date); > } > } > }; > > %inline %{ > CouponPtr as_coupon(const boost::shared_ptr<CashFlow>& cf) { > return boost::dynamic_pointer_cast<Coupon>(cf); > } > %} > > > %rename(FixedRateCoupon) FixedRateCouponPtr; > class FixedRateCouponPtr : public CouponPtr { > %feature("kwargs") FixedRateCouponPtr; > public: > %extend { > FixedRateCouponPtr(const Date& paymentDate, Real nominal, > Rate rate, const DayCounter& dayCounter, > const Date& startDate, const Date& endDate, > const Date& refPeriodStart = Date(), > const Date& refPeriodEnd = Date()) { > return new FixedRateCouponPtr( > new FixedRateCoupon(paymentDate, nominal, rate, > dayCounter, startDate, endDate, > refPeriodStart, refPeriodEnd)); > } > InterestRate interestRate() { > return boost::dynamic_pointer_cast<FixedRateCoupon>(*self) > ->interestRate(); > } > } > }; > > %inline %{ > FixedRateCouponPtr as_fixed_rate_coupon( > const boost::shared_ptr<CashFlow>& cf) > { > return boost::dynamic_pointer_cast<FixedRateCoupon>(cf); > } > %} > > > %{ > using QuantLib::FloatingRateCouponPricer; > %} > > %ignore FloatingRateCouponPricer; > class FloatingRateCouponPricer {}; > > %template(FloatingRateCouponPricer) > boost::shared_ptr<FloatingRateCouponPricer>; > > void setCouponPricer(const Leg&, > const boost::shared_ptr<FloatingRateCouponPricer>&); > > %rename(FloatingRateCoupon) FloatingRateCouponPtr; > class FloatingRateCouponPtr : public CouponPtr { > private: > FloatingRateCouponPtr(); > public: > %extend { > Date fixingDate() { > return boost::dynamic_pointer_cast<FloatingRateCoupon>(*self) > ->fixingDate(); > } > Integer fixingDays() { > return boost::dynamic_pointer_cast<FloatingRateCoupon>(*self) > ->fixingDays(); > } > bool isInArrears() { > return boost::dynamic_pointer_cast<FloatingRateCoupon>(*self) > ->isInArrears(); > } > Real gearing() { > return boost::dynamic_pointer_cast<FloatingRateCoupon>(*self) > ->gearing(); > } > Rate spread() { > return boost::dynamic_pointer_cast<FloatingRateCoupon>(*self) > ->spread(); > } > Rate indexFixing() { > return boost::dynamic_pointer_cast<FloatingRateCoupon>(*self) > ->indexFixing(); > } > Rate adjustedFixing() { > return boost::dynamic_pointer_cast<FloatingRateCoupon>(*self) > ->adjustedFixing(); > } > Rate convexityAdjustment() { > return boost::dynamic_pointer_cast<FloatingRateCoupon>(*self) > ->convexityAdjustment(); > } > Real price(const Handle<YieldTermStructure>& discountCurve) { > return boost::dynamic_pointer_cast<FloatingRateCoupon>(*self) > ->price(discountCurve); > } > InterestRateIndexPtr index() const { > return boost::dynamic_pointer_cast<FloatingRateCoupon>(*self) > ->index(); > } > void setPricer(const boost::shared_ptr<FloatingRateCouponPricer>& p) > { > boost::dynamic_pointer_cast<FloatingRateCoupon>(*self) > ->setPricer(p); > } > } > }; > > %inline %{ > FloatingRateCouponPtr as_floating_rate_coupon( > const boost::shared_ptr<CashFlow>& cf) > { > return boost::dynamic_pointer_cast<FloatingRateCoupon>(cf); > } > %} > > > %{ > using QuantLib::CappedFlooredCoupon; > typedef boost::shared_ptr<CashFlow> CappedFlooredCouponPtr; > %} > > %rename(CappedFlooredCoupon) CappedFlooredCouponPtr; > class CappedFlooredCouponPtr : public FloatingRateCouponPtr { > %feature("kwargs") CappedFlooredCouponPtr; > public: > %extend { > CappedFlooredCouponPtr(const FloatingRateCouponPtr& underlying, > Rate cap = Null<Rate>(), > Rate floor = Null<Rate>()) { > boost::shared_ptr<FloatingRateCoupon> u = > boost::dynamic_pointer_cast<FloatingRateCoupon>(underlying); > return new CappedFlooredCouponPtr( > new CappedFlooredCoupon(u,cap,floor)); > } > Rate cap() { > return boost::dynamic_pointer_cast<CappedFlooredCoupon>(*self) > ->cap(); > } > Rate floor() { > return boost::dynamic_pointer_cast<CappedFlooredCoupon>(*self) > ->floor(); > } > Rate effectiveCap() { > return boost::dynamic_pointer_cast<CappedFlooredCoupon>(*self) > ->effectiveCap(); > } > Rate effectiveFloor() { > return boost::dynamic_pointer_cast<CappedFlooredCoupon>(*self) > ->effectiveFloor(); > } > bool isCapped() { > return boost::dynamic_pointer_cast<CappedFlooredCoupon>(*self) > ->isCapped(); > } > bool isFloored() { > return boost::dynamic_pointer_cast<CappedFlooredCoupon>(*self) > ->isFloored(); > } > void setPricer(const boost::shared_ptr<FloatingRateCouponPricer>& p) > { > boost::dynamic_pointer_cast<CappedFlooredCoupon>(*self) > ->setPricer(p); > } > } > }; > > > // specialized floating-rate coupons > > %rename(IborCoupon) IborCouponPtr; > class IborCouponPtr : public FloatingRateCouponPtr { > %feature("kwargs") IborCouponPtr; > public: > %extend { > IborCouponPtr(const Date& paymentDate, Real nominal, > const Date& startDate, const Date& endDate, > Integer fixingDays, InterestRateIndexPtr& index, > Real gearing = 1.0, Spread spread = 0.0, > const Date& refPeriodStart = Date(), > const Date& refPeriodEnd = Date(), > const DayCounter& dayCounter = DayCounter()) { > const boost::shared_ptr<IborIndex> iri = > boost::dynamic_pointer_cast<IborIndex>(index); > return new IborCouponPtr( > new IborCoupon(paymentDate, nominal, startDate, endDate, > fixingDays, iri, gearing, spread, > refPeriodStart, refPeriodEnd, dayCounter)); > } > } > }; > > > %{ > using QuantLib::IborCouponPricer; > using QuantLib::BlackIborCouponPricer; > typedef boost::shared_ptr<FloatingRateCouponPricer> IborCouponPricerPtr; > typedef boost::shared_ptr<FloatingRateCouponPricer> > BlackIborCouponPricerPtr; > %} > > %rename(IborCouponPricer) IborCouponPricerPtr; > class IborCouponPricerPtr : public > boost::shared_ptr<FloatingRateCouponPricer> { > private: > IborCouponPricerPtr(); > public: > %extend { > Handle<OptionletVolatilityStructure> capletVolatility() { > return boost::dynamic_pointer_cast<IborCouponPricer>(*self) > ->capletVolatility(); > } > void setCapletVolatility(const Handle<OptionletVolatilityStructure>& > v = > Handle<OptionletVolatilityStructure>()) > { > boost::dynamic_pointer_cast<IborCouponPricer>(*self) > ->setCapletVolatility(v); > } > } > }; > > %rename(BlackIborCouponPricer) BlackIborCouponPricerPtr; > class BlackIborCouponPricerPtr : public IborCouponPricerPtr { > public: > %extend { > BlackIborCouponPricerPtr(const Handle<OptionletVolatilityStructure>& > v = > Handle<OptionletVolatilityStructure>()) > { > return new BlackIborCouponPricerPtr(new > BlackIborCouponPricer(v)); > } > } > }; > > %{ > using QuantLib::CmsCoupon; > using QuantLib::CappedFlooredCmsCoupon; > typedef boost::shared_ptr<CashFlow> CmsCouponPtr; > typedef boost::shared_ptr<CashFlow> CappedFlooredCmsCouponPtr; > %} > > %rename(CmsCoupon) CmsCouponPtr; > class CmsCouponPtr : public FloatingRateCouponPtr { > %feature("kwargs") CmsCouponPtr; > public: > %extend { > CmsCouponPtr(const Date& paymentDate, Real nominal, > const Date& startDate, const Date& endDate, > Integer fixingDays, const SwapIndexPtr& index, > Real gearing = 1.0, Spread spread = 0.0, > const Date& refPeriodStart = Date(), > const Date& refPeriodEnd = Date(), > const DayCounter& dayCounter = DayCounter(), > bool isInArrears = false) { > const boost::shared_ptr<SwapIndex> swi = > boost::dynamic_pointer_cast<SwapIndex>(index); > return new CmsCouponPtr( > new CmsCoupon(paymentDate,nominal,startDate,endDate, > fixingDays,swi,gearing,spread, > refPeriodStart,refPeriodEnd, > dayCounter,isInArrears)); > } > } > }; > > %{ > using QuantLib::CmsCouponPricer; > using QuantLib::AnalyticHaganPricer; > using QuantLib::NumericHaganPricer; > using QuantLib::GFunctionFactory; > typedef boost::shared_ptr<FloatingRateCouponPricer> CmsCouponPricerPtr; > typedef boost::shared_ptr<FloatingRateCouponPricer> AnalyticHaganPricerPtr; > typedef boost::shared_ptr<FloatingRateCouponPricer> NumericHaganPricerPtr; > %} > > %rename(CmsCouponPricer) CmsCouponPricerPtr; > class CmsCouponPricerPtr : public > boost::shared_ptr<FloatingRateCouponPricer> { > private: > CmsCouponPricerPtr(); > public: > %extend { > Handle<SwaptionVolatilityStructure> swaptionVolatility() { > return boost::dynamic_pointer_cast<CmsCouponPricer>(*self) > ->swaptionVolatility(); > } > void setSwaptionVolatility( > const Handle<SwaptionVolatilityStructure>& v > = > Handle<SwaptionVolatilityStructure>()) > { > boost::dynamic_pointer_cast<CmsCouponPricer>(*self) > ->setSwaptionVolatility(v); > } > } > }; > > class GFunctionFactory { > private: > GFunctionFactory(); > public: > enum YieldCurveModel { Standard, > ExactYield, > ParallelShifts, > NonParallelShifts }; > }; > > %rename(AnalyticHaganPricer) AnalyticHaganPricerPtr; > class AnalyticHaganPricerPtr : public CmsCouponPricerPtr { > public: > %extend { > AnalyticHaganPricerPtr(const Handle<SwaptionVolatilityStructure>& v, > GFunctionFactory::YieldCurveModel model, > const Handle& meanReversion) { > return new AnalyticHaganPricerPtr( > new AnalyticHaganPricer(v, model, > meanReversion)); > } > } > }; > > %rename(NumericHaganPricer) NumericHaganPricerPtr; > class NumericHaganPricerPtr : public CmsCouponPricerPtr { > public: > %extend { > NumericHaganPricerPtr(const Handle<SwaptionVolatilityStructure>& v, > GFunctionFactory::YieldCurveModel model, > const Handle >> & meanReversion, >> Rate lowerLimit = 0.0, >> Rate upperLimit = 1.0, >> Real precision = 1.0e-6) { >> return new NumericHaganPricerPtr( >> new NumericHaganPricer(v, model, meanReversion, >> lowerLimit, upperLimit, >> precision)); >> } >> } >> }; >> >> %rename(CappedFlooredCmsCoupon) CappedFlooredCmsCouponPtr; >> class CappedFlooredCmsCouponPtr: public CappedFlooredCouponPtr { >> %feature("kwargs") CappedFlooredCouponPtr; >> public: >> %extend { >> CappedFlooredCmsCouponPtr( >> const Date& paymentDate, Real nominal, >> const Date& startDate, const Date& endDate, >> Natural fixingDays, const SwapIndexPtr& index, >> Real gearing = 1.0, Spread spread = 0.0, >> const Rate cap = Null >> <Rate> >> (), >> const Rate floor = Null >> <Rate> >> (), >> const Date& refPeriodStart = Date(), >> const Date& refPeriodEnd = Date(), >> const DayCounter& dayCounter = DayCounter(), >> bool isInArrears = false) { >> const boost::shared_ptr >> <SwapIndex> >> swi = >> boost::dynamic_pointer_cast >> <SwapIndex> >> (index); >> return new CappedFlooredCmsCouponPtr( >> new CappedFlooredCmsCoupon( >> paymentDate, nominal, startDate, endDate, >> fixingDays, >> swi, gearing, spread, cap, floor, refPeriodStart, >> refPeriodEnd, dayCounter, isInArrears)); >> } >> } >> }; >> >> >> // cash flow vector builders >> >> %{ >> Leg _FixedRateLeg(const Schedule& schedule, >> const DayCounter& dayCount, >> const std::vector >> <Real> >> & nominals, >> const std::vector >> <Rate> >> & couponRates, >> BusinessDayConvention paymentAdjustment = Following, >> const DayCounter& firstPeriodDayCount = DayCounter()) { >> return QuantLib::FixedRateLeg(schedule) >> .withNotionals(nominals) >> .withCouponRates(couponRates,dayCount) >> .withPaymentAdjustment(paymentAdjustment) >> .withFirstPeriodDayCounter(firstPeriodDayCount); >> } >> %} >> %feature("kwargs") _FixedRateLeg; >> %rename(FixedRateLeg) _FixedRateLeg; >> Leg _FixedRateLeg(const Schedule& schedule, >> const DayCounter& dayCount, >> const std::vector >> <Real> >> & nominals, >> const std::vector >> <Rate> >> & couponRates, >> BusinessDayConvention paymentAdjustment = Following, >> const DayCounter& firstPeriodDayCount = DayCounter()); >> >> %{ >> Leg _IborLeg(const std::vector >> <Real> >> & nominals, >> const Schedule& schedule, >> const boost::shared_ptr >> <Index> >> & index, >> const DayCounter& paymentDayCounter = DayCounter(), >> const BusinessDayConvention paymentConvention = Following, >> const std::vector >> <Natural> >> & fixingDays = std::vector >> <Natural> >> (), >> const std::vector >> <Real> >> & gearings = std::vector >> <Real> >> (), >> const std::vector >> <Spread> >> & spreads = std::vector >> <Spread> >> (), >> const std::vector >> <Rate> >> & caps = std::vector >> <Rate> >> (), >> const std::vector >> <Rate> >> & floors = std::vector >> <Rate> >> (), >> bool isInArrears = false) { >> boost::shared_ptr >> <IborIndex> >> libor = >> boost::dynamic_pointer_cast >> <IborIndex> >> (index); >> return QuantLib::IborLeg(schedule, libor) >> .withNotionals(nominals) >> .withPaymentDayCounter(paymentDayCounter) >> .withPaymentAdjustment(paymentConvention) >> .withFixingDays(fixingDays) >> .withGearings(gearings) >> .withSpreads(spreads) >> .withCaps(caps) >> .withFloors(floors) >> .inArrears(isInArrears); >> } >> %} >> %feature("kwargs") _IborLeg; >> %rename(IborLeg) _IborLeg; >> Leg _IborLeg(const std::vector >> <Real> >> & nominals, >> const Schedule& schedule, >> const IborIndexPtr& index, >> const DayCounter& paymentDayCounter = DayCounter(), >> const BusinessDayConvention paymentConvention = Following, >> const std::vector >> <Natural> >> & fixingDays = std::vector >> <Natural> >> (), >> const std::vector >> <Real> >> & gearings = std::vector >> <Real> >> (), >> const std::vector >> <Spread> >> & spreads = std::vector >> <Spread> >> (), >> const std::vector >> <Rate> >> & caps = std::vector >> <Rate> >> (), >> const std::vector >> <Rate> >> & floors = std::vector >> <Rate> >> (), >> bool isInArrears = false); >> >> %{ >> Leg _CmsLeg(const std::vector >> <Real> >> & nominals, >> const Schedule& schedule, >> const boost::shared_ptr >> <Index> >> & index, >> const DayCounter& paymentDayCounter = DayCounter(), >> const BusinessDayConvention paymentConvention = Following, >> const std::vector >> <Natural> >> & fixingDays = std::vector >> <Natural> >> (), >> const std::vector >> <Real> >> & gearings = std::vector >> <Real> >> (), >> const std::vector >> <Spread> >> & spreads = std::vector >> <Spread> >> (), >> const std::vector >> <Rate> >> & caps = std::vector >> <Rate> >> (), >> const std::vector >> <Rate> >> & floors = std::vector >> <Rate> >> (), >> bool isInArrears = false) { >> boost::shared_ptr >> <SwapIndex> >> swapIndex = >> boost::dynamic_pointer_cast >> <SwapIndex> >> (index); >> return QuantLib::CmsLeg(schedule, swapIndex) >> .withNotionals(nominals) >> .withPaymentDayCounter(paymentDayCounter) >> .withPaymentAdjustment(paymentConvention) >> .withFixingDays(fixingDays) >> .withGearings(gearings) >> .withSpreads(spreads) >> .withCaps(caps) >> .withFloors(floors) >> .inArrears(isInArrears); >> } >> %} >> %feature("kwargs") _CmsLeg; >> %rename(CmsLeg) _CmsLeg; >> Leg _CmsLeg(const std::vector >> <Real> >> & nominals, >> const Schedule& schedule, >> const SwapIndexPtr& index, >> const DayCounter& paymentDayCounter = DayCounter(), >> const BusinessDayConvention paymentConvention = Following, >> const std::vector >> <Natural> >> & fixingDays = std::vector >> <Natural> >> (), >> const std::vector >> <Real> >> & gearings = std::vector >> <Real> >> (), >> const std::vector >> <Spread> >> & spreads = std::vector >> <Spread> >> (), >> const std::vector >> <Rate> >> & caps = std::vector >> <Rate> >> (), >> const std::vector >> <Rate> >> & floors = std::vector >> <Rate> >> (), >> bool isInArrears = false); >> >> %{ >> Leg _CmsZeroLeg(const std::vector >> <Real> >> & nominals, >> const Schedule& schedule, >> const boost::shared_ptr >> <Index> >> & index, >> const DayCounter& paymentDayCounter = DayCounter(), >> const BusinessDayConvention paymentConvention = Following, >> const std::vector >> <Natural> >> & fixingDays = std::vector >> <Natural> >> (), >> const std::vector >> <Real> >> & gearings = std::vector >> <Real> >> (), >> const std::vector >> <Spread> >> & spreads = std::vector >> <Spread> >> (), >> const std::vector >> <Rate> >> & caps = std::vector >> <Rate> >> (), >> const std::vector >> <Rate> >> & floors = std::vector >> <Rate> >> ()) { >> boost::shared_ptr >> <SwapIndex> >> swapIndex = >> boost::dynamic_pointer_cast >> <SwapIndex> >> (index); >> return QuantLib::CmsLeg(schedule, swapIndex) >> .withNotionals(nominals) >> .withPaymentDayCounter(paymentDayCounter) >> .withPaymentAdjustment(paymentConvention) >> .withFixingDays(fixingDays) >> .withGearings(gearings) >> .withSpreads(spreads) >> .withCaps(caps) >> .withFloors(floors) >> .withZeroPayments(); >> } >> %} >> %feature("kwargs") _CmsZeroLeg; >> %rename(CmsZeroLeg) _CmsZeroLeg; >> Leg _CmsZeroLeg(const std::vector >> <Real> >> & nominals, >> const Schedule& schedule, >> const SwapIndexPtr& index, >> const DayCounter& paymentDayCounter = DayCounter(), >> const BusinessDayConvention paymentConvention = Following, >> const std::vector >> <Natural> >> & fixingDays = std::vector >> <Natural> >> (), >> const std::vector >> <Real> >> & gearings = std::vector >> <Real> >> (), >> const std::vector >> <Spread> >> & spreads = std::vector >> <Spread> >> (), >> const std::vector >> <Rate> >> & caps = std::vector >> <Rate> >> (), >> const std::vector >> <Rate> >> & floors = std::vector >> <Rate> >> ()); >> >> >> // cash-flow analysis >> >> %{ >> using QuantLib::CashFlows; >> using QuantLib::Duration; >> %} >> >> struct Duration { >> enum Type { Simple, Macaulay, Modified }; >> }; >> >> class CashFlows { >> private: >> CashFlows(); >> CashFlows(const CashFlows&); >> public: >> static Date startDate(const Leg &); >> static Date maturityDate(const Leg &); >> %extend { >> static Real npv( >> const Leg& leg, >> const boost::shared_ptr >> <YieldTermStructure> >> & discountCurve, >> Spread zSpread, >> const DayCounter &dayCounter, >> Compounding compounding, >> Frequency frequency, >> bool includeSettlementDateFlows, >> const Date& settlementDate = Date(), >> const Date& npvDate = Date()) { >> return QuantLib::CashFlows::npv(leg, discountCurve, >> zSpread, >> dayCounter, >> compounding, >> frequency, >> includeSettlementDateFlows, >> settlementDate, >> npvDate); >> } >> static Real npv( >> const Leg& leg, >> const Handle >> <YieldTermStructure> >> & discountCurve, >> bool includeSettlementDateFlows, >> const Date& settlementDate = Date(), >> const Date& npvDate = Date()) { >> return QuantLib::CashFlows::npv(leg, **discountCurve, >> includeSettlementDateFlows, >> settlementDate, npvDate); >> } >> } >> static Real npv(const Leg&, >> const InterestRate&, >> bool includeSettlementDateFlows, >> Date settlementDate = Date(), >> Date npvDate = Date()); >> >> static Real npv(const Leg&, >> Rate yield, >> const DayCounter&dayCounter, >> Compounding compounding, >> Frequency frequency, >> bool includeSettlementDateFlows, >> Date settlementDate = Date(), >> Date npvDate = Date()); >> %extend { >> static Real bps( >> const Leg& leg, >> const boost::shared_ptr >> <YieldTermStructure> >> & discountCurve, >> bool includeSettlementDateFlows, >> const Date& settlementDate = Date(), >> const Date& npvDate = Date()) { >> return QuantLib::CashFlows::bps(leg, *discountCurve, >> includeSettlementDateFlows, >> settlementDate, npvDate); >> } >> static Real bps( >> const Leg& leg, >> const Handle >> <YieldTermStructure> >> & discountCurve, >> bool includeSettlementDateFlows, >> const Date& settlementDate = Date(), >> const Date& npvDate = Date()) { >> return QuantLib::CashFlows::bps(leg, **discountCurve, >> includeSettlementDateFlows, >> settlementDate, npvDate); >> } >> } >> static Real bps(const Leg&, >> const InterestRate &, >> bool includeSettlementDateFlows, >> Date settlementDate = Date(), >> Date npvDate = Date()); >> static Real bps(const Leg&, >> Rate yield, >> const DayCounter&dayCounter, >> Compounding compounding, >> Frequency frequency, >> bool includeSettlementDateFlows, >> Date settlementDate = Date(), >> Date npvDate = Date()); >> >> %extend { >> static Rate atmRate( >> const Leg& leg, >> const boost::shared_ptr >> <YieldTermStructure> >> & discountCurve, >> bool includeSettlementDateFlows, >> const Date& settlementDate = Date(), >> const Date& npvDate = Date(), >> Real npv = Null >> <Real> >> ()) { >> return QuantLib::CashFlows::atmRate(leg, *discountCurve, >> >> includeSettlementDateFlows, >> settlementDate, npvDate, >> npv); >> } >> } >> static Rate yield(const Leg&, >> Real npv, >> const DayCounter& dayCounter, >> Compounding compounding, >> Frequency frequency, >> bool includeSettlementDateFlows, >> Date settlementDate = Date(), >> Date npvDate = Date(), >> Real accuracy = 1.0e-10, >> Size maxIterations = 10000, >> Rate guess = 0.05); >> static Time duration(const Leg&, >> const InterestRate&, >> Duration::Type type, >> bool includeSettlementDateFlows, >> Date settlementDate = Date()); >> >> static Time duration(const Leg&, >> Rate yield, >> const DayCounter& dayCounter, >> Compounding compounding, >> Frequency frequency, >> Duration::Type type, >> bool includeSettlementDateFlows, >> Date settlementDate = Date(), >> Date npvDate = Date()); >> >> static Real convexity(const Leg&, >> const InterestRate&, >> bool includeSettlementDateFlows, >> Date settlementDate = Date(), >> Date npvDate = Date()); >> >> static Real convexity(const Leg&, >> Rate yield, >> const DayCounter& dayCounter, >> Compounding compounding, >> Frequency frequency, >> bool includeSettlementDateFlows, >> Date settlementDate = Date(), >> Date npvDate = Date()); >> >> >> static Real basisPointValue(const Leg& leg, >> const InterestRate& yield, >> bool includeSettlementDateFlows, >> Date settlementDate = Date(), >> Date npvDate = Date()); >> >> static Real basisPointValue(const Leg& leg, >> Rate yield, >> const DayCounter& dayCounter, >> Compounding compounding, >> Frequency frequency, >> bool includeSettlementDateFlows, >> Date settlementDate = Date(), >> Date npvDate = Date()); >> >> static Spread zSpread(const Leg& leg, >> Real npv, >> const boost::shared_ptr >> <YieldTermStructure> >> &, >> const DayCounter& dayCounter, >> Compounding compounding, >> Frequency frequency, >> bool includeSettlementDateFlows, >> Date settlementDate = Date(), >> Date npvDate = Date(), >> Real accuracy = 1.0e-10, >> Size maxIterations = 100, >> Rate guess = 0.0); >> >> }; >> >> >> #endif > > Thank you very much. > > Sergio. > > > > > -- > View this message in context: http://quantlib.10058.n7.nabble.com/BasisPointValue-and-ZSpread-methods-do-not-exist-for-JAVA-tp14052p14065.html > Sent from the quantlib-users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_feb > _______________________________________________ > QuantLib-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/quantlib-users ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Sergio,
may you also send me a short Java program with which to test the module? I'm afraid I'm quite rusty with the language. Luigi On Thu, Feb 21, 2013 at 1:09 PM, sergvil <[hidden email]> wrote: > Yes, of course. Here it is. > > cashflows.i <http://quantlib.10058.n7.nabble.com/file/n14067/cashflows.i> > > Thank you very much. > > Sergio. > > > > -- > View this message in context: http://quantlib.10058.n7.nabble.com/BasisPointValue-and-ZSpread-methods-do-not-exist-for-JAVA-tp14052p14067.html > Sent from the quantlib-users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_feb > _______________________________________________ > QuantLib-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/quantlib-users ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hello Luigi, If you prefer, you can send me the libQuantLibJNI.so generated by your SWIG and I can test it on my machine. Thank you very much. Sergio. |
Hello Luigi,
At last, when I was testing the little JAVA program I was going to send to you, I realized that the problem was on our JBoss server, because the little program runs great. The problem was that JBOSS was taking an old libQuantLibJNI.so. We thought that our JBoss server always take local libraries but it is configured on other way. We have change this library with the SWIG generated one and all is working perfectly. Thank you very much for your help! Best regards. Sergio. |
Sergio,
I've added your changes to the repository. Thanks, Luigi On Thu, Feb 28, 2013 at 4:30 PM, sergvil <[hidden email]> wrote: > Hello Luigi, > > At last, when I was testing the little JAVA program I was going to send to > you, I realized that the problem was on our JBoss server, because the little > program runs great. The problem was that JBOSS was taking an old > libQuantLibJNI.so. We thought that our JBoss server always take local > libraries but it is configured on other way. We have change this library > with the SWIG generated one and all is working perfectly. > > Thank you very much for your help! > > Best regards. > > Sergio. > > > > -- > View this message in context: http://quantlib.10058.n7.nabble.com/BasisPointValue-and-ZSpread-methods-do-not-exist-for-JAVA-tp14052p14082.html > Sent from the quantlib-users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_feb > _______________________________________________ > QuantLib-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/quantlib-users ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |