Login  Register

Quantlib on sun solaris 8

Posted by Xavier.Abulker on Aug 21, 2002; 1:07am
URL: http://quantlib.414.s1.nabble.com/Quantlib-on-sun-solaris-8-tp2136.html

Hello,
I have a problem using Quantlib on Sun solaris 8.
the results I find for Black&Scholes pricing is wrong,
for example the example EuropeanOption gives me:
"
Time to maturity = 0.25
Underlying price = 102
Strike = 100
Risk-free interest rate = 0.05
Volatility = 0.2

Method          Value   EstimatedError  Discrepancy     Rel. Discr.
Black Scholes   3.2422  0.0000          0.000000        0.000000
Call-Put parity 3.2422  N/A             0       0.000000
Integral        5.8308  N/A             2.588611        0.798407
Finite Diff.    5.8309  N/A             2.588639        0.798416
MC (crude)      5.8313  0.0117          2.589092        0.798555
MC (antithetic) 5.8284  0.0052          2.586132        0.797643
Binomial (JR)   5.8308  N/A             2.588541        0.798385
Binomial (CRR)  5.8311  N/A             2.588926        0.798504"

Here the result for Black Scholes   3.2422 is wrong.
I've tested on Windows with Borland compiler and the result is correct
there:
Time to maturity = 0.25
Underlying price = 102
Strike = 100
Risk-free interest rate = 0.05
Volatility = 0.2

Method          Value   EstimatedError  Discrepancy     Rel. Discr.
Black Scholes   5.8308  0.0000          0.000000        0.000000
Call-Put parity 5.8308  N/A             4.44089e-15     0.000000
Integral        5.8308  N/A             0.000001        0.000000
Finite Diff.    5.8309  N/A             0.000029        0.000005
MC (crude)      5.8435  0.0117          0.012658        0.002171
MC (antithetic) 5.8319  0.0052          0.001048        0.000180
Binomial (JR)   5.8308  N/A             0.000069        0.000012
Binomial (CRR)  5.8311  N/A             0.000315        0.000054

another problem, the example SwapValuation  crashes on Unix but works well
on NT.

I'm using the same version of quantlib: version 0.3.0 and gcc version
2.95.3 20010315 (release)

Is someone using the same configuration?
Thanks for your help

Xavier