|
From: Banerjee, T. K <tap...@jp...> - 2019-08-08 01:00:59
|
Hi Luigi, Qlib experts,
It seems I could able to run some Java SWIG examples, some other fails. See below.
I guess he failed example may have data or incompatible function issue.
I was googling it on failures, looks like some other also got similar failures.
If anyone has any pointe to fix the issue, please let me know.
Thanks,
home/podsintr/qlib/QuantLib-SWIG-1.15/Java > javac -cp ".:QuantLib.jar" examples/EquityOptions.java
/home/podsintr/qlib/QuantLib-SWIG-1.15/Java > java -cp ".:QuantLib.jar" -Djava.library.path=/home/podsintr/qlib/lib examples.EquityOptions
Method European Bermudan American
============================================================================
Black-Scholes 0.000000000 NaN NaN
Heston Semi-Analytic 0.000000000 NaN NaN
Heston COS Method 0.000000000 NaN NaN
Bates Semi-Analytic 0.000000000 NaN NaN
Barone-Adesi/Whaley NaN NaN 0.000000000
Bjerksund/Stensland NaN NaN 0.000000000
Integral 0.000000000 NaN NaN
Finite differences 0.000000000 0.000000000 0.000000000
Binomial Jarrow-Rudd 0.000000000 0.000000000 0.000000000
Binomial Cox-Ross-Rubinstein 0.000000000 0.000000000 0.000000000
Additive equiprobabilities 0.000000000 0.000000000 0.000000000
Binomial Trigeorgis 0.000000000 0.000000000 0.000000000
Binomial Tian 0.000000000 0.000000000 0.000000000
Binomial Leisen-Reimer 0.000000000 0.000000000 0.000000000
Binomial Joshi 0.000000000 0.000000000 0.000000000
MC (crude) 0.000000000 NaN NaN
MC (Sobol) 0.000000000 NaN NaN
home/podsintr/qlib/QuantLib-SWIG-1.15/Java > java -cp ".:QuantLib.jar" -Djava.library.path=/home/podsintr/qlib/lib examples.UnaryFunctions
Integration result 1.9999999999999944
Brent Solver result 0.7390851323735234
# Fails
java -cp ".:QuantLib.jar" -Djava.library.path=/home/podsintr/qlib/lib examples.FRA
/home/podsintr/qlib/QuantLib-SWIG-1.15/Java > java -cp ".:QuantLib.jar" -Djava.library.path=/home/podsintr/qlib/lib examples.FRA
Exception in thread "main" java.lang.RuntimeException: Missing Euribor3M Actual/360 fixing for May 19th, 2006
at org.quantlib.QuantLibJNI.ForwardRateAgreement_spotValue(Native Method)
at org.quantlib.ForwardRateAgreement.spotValue(ForwardRateAgreement.java:51)
at examples.FRA.main(FRA.java:49)
From: Banerjee, Tapas K via QuantLib-dev [mailto:qua...@li...]
Sent: Wednesday, August 07, 2019 1:13 PM
To: QuantLib developers <qua...@li...>
Subject: Re: [Quantlib-dev] QuantLib-SWIG-1.15 example Run issue
Hi Luigi, Qlib experts,
I fixed both issues the way u mentioned below. Now Quantlib.jar and libJNI.so<https://secureweb.jpmchase.net/readonly/http:/libJNI.so> created fine
When I try to run example programs, I get below error:
java -cp ".:QuantLib.jar" -Djava.library.path=/home/podsintr/qlib/lib examples.FRA
/home/podsintr/qlib/QuantLib-SWIG-1.15/Java > java -cp ".:QuantLib.jar" -Djava.library.path=/home/podsintr/qlib/lib examples.FRA
Exception in thread "main" java.lang.RuntimeException: Missing Euribor3M Actual/360 fixing for May 19th, 2006
at org.quantlib.QuantLibJNI.ForwardRateAgreement_spotValue(Native Method)
at org.quantlib.ForwardRateAgreement.spotValue(ForwardRateAgreement.java:51)
at examples.FRA.main(FRA.java:49)
/home/podsintr/qlib/QuantLib-SWIG-1.15/Java > java -cp ".:QuantLib.jar" -Djava.library.path=/home/podsintr/qlib/lib examples.Bonds
Today: Monday, September 15th, 2008
Settlement date: Thursday, September 18th, 2008
Exception in thread "main" java.lang.RuntimeException: Boost assertion failed: px != 0
at org.quantlib.QuantLibJNI.IborCouponPricer_setCapletVolatility__SWIG_0(Native Method)
at org.quantlib.IborCouponPricer.setCapletVolatility(IborCouponPricer.java:43)
at examples.Bonds.main(Bonds.java:497)
Any idea, why is the issue & how to fix?
Can I run any other example program to see it I working?
FYI: We are using 1.56 version Boost (to make it compatible gcc 44) , 1.15 version of Quantlib.
Thanks,
From: Luigi Ballabio [mailto:lui...@gm...<mailto:lui...@gm...>]
Sent: Tuesday, August 06, 2019 3:14 AM
To: Banerjee, Tapas K <tap...@jp...<mailto:tap...@jp...>>
Cc: QuantLib developers <qua...@li...<mailto:qua...@li...>>
Subject: Re: [Quantlib-dev] QuantLib-SWIG-1.15 build issue
Thanks. The first error,
On Mon, Aug 5, 2019 at 10:16 PM Banerjee, Tapas K via QuantLib-dev <qua...@li...<mailto:qua...@li...>> wrote:
checking for QuantLib... ./configure: line 4029: quantlib-config: command not found
means that you either didn't install QuantLib (the C++ library) or that you installed it in a non-standard location and configure can't find it. In the first case, install QuantLib (i.e., run `make install` and possibly `ldconfig` after you compile it). In the second case, if you installed it in /some/other/path, add /some/other/path/bin to PATH before running configure.
The second error,
config.status: error: cannot find input file: `CSharp/Makefile.in<https://secureweb.jpmchase.net/readonly/http:/Makefile.in>' # We don’t have C# compiler, so thought it is OK to infore.
blocks configure and prevents it from continuing and creating the Java Makefile (Makefile.in<https://secureweb.jpmchase.net/readonly/http:/Makefile.in> is not the makefile; it's the input that configure processes to create the makefile). Did you remove CSharp/Makefile.in<https://secureweb.jpmchase.net/readonly/http:/Makefile.in>? If so, start over from a clean download.
Luigi
This message is confidential and subject to terms at:https://www.jpmorgan.com/emaildisclaimer including on confidential, privileged or legal entity information, viruses and monitoring of electronic messages. If you are not the intended recipient, please delete this message and notify the sender immediately. Any unauthorized use is strictly prohibited.
This message is confidential and subject to terms at: https://www.jpmorgan.com/emaildisclaimer including on confidential, privileged or legal entity information, viruses and monitoring of electronic messages. If you are not the intended recipient, please delete this message and notify the sender immediately. Any unauthorized use is strictly prohibited.
|