I then can see that the (-nan) error message comes from the attempt of calculating the sqrt of a negative number (line 49 of analyticvariancegammaengine.cpp) , so far so good.
BUT: I don't understand why the program calls the Integrand class of analyticvariancegammaengine.cpp and not the one of integralengine.cpp.
I did the same analysis using gcc. Here step 10 of the above list shows a call of the Integral class of integralengine.cpp!
Many thanks for your help & kind regards,
Paul.
This is odd. The error seems to come from the BlackCalculator class, but the IntegralEngine class shouldn't use it.Can you attach a debugger to the program and get a traceback from the error?LuigiOn Sat, Nov 22, 2014 at 11:06 PM, Paul Buettiker <[hidden email]> wrote:------------------------------------------------------------------------------===================== Terminal Output ============================Dear allWhen I run the QuantLib example EquityOption.cpp (http://quantlib.org/reference/_equity_option_8cpp-example.html) compiled with QuantLib-1.4.1 (or QuantLib-1.4), I get the error message "forward (0) must be positive" when pricing an equity option using the PricingEngine IntegralEngine:
orca@linux-r2kn:/tmp> ./EquityOption
Option type = Put
Maturity = May 17th, 1999
Underlying price = 36
Strike = 40
Risk-free interest rate = 6.000000 %
Dividend yield = 0.000000 %
Volatility = 20.000000 %
Method European Bermudan American
Black-Scholes 3.844308 N/A N/A
Heston semi-analytic 3.844306 N/A N/A
Bates semi-analytic 3.844306 N/A N/A
Barone-Adesi/Whaley N/A N/A 4.459628
Bjerksund/Stensland N/A N/A 4.453064
Integral forward (0) must be positive
==================================================================The same happens when running quantlib-test-suite.I do NOT get this error when working with QuantLib-1.3.The compiler used is from the new Intel Parallel Studio XE 15 (64-bit), icc 15.0.0.0090.Anybody else who observed this? Does someone know a solution?Many thanks and kind regards,Paul.
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
--
Free forum by Nabble | Disable Popup Ads | Edit this page |