Re: Simple Code

Posted by Dirk Eddelbuettel on
URL: http://quantlib.414.s1.nabble.com/Simple-Code-tp4403p4407.html

It looks like it is an issue with Ubuntu. or the older QL 0.3.9 library.
I also get Lorenzo's invalid answer of 0 when I use the supplied QL 0.3.9
packages on Ubuntu.

Interestingly enough, I do get the correct answer using RQuantLib rather than
the little C++ source code:

edd@joe:~$ echo 'library(RQuantLib); EuropeanOption("call", 7, 8, 0, 0.05, 1, 0.1)' | R --slave
Concise summary of valuation for EuropeanOption
      value       delta       gamma        vega       theta         rho
 0.08234248  0.21613477  0.41869080  2.05158494 -0.17410929  1.43060089
     divRho
-1.51294336

This uses the standard Ubuntu packages, rebuilt for the C++ transition:

edd@joe:~$ dpkg -l r-base-core libquantlib-0.3.9c2 r-cran-rquantlib
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  libquantlib-0. 0.3.9-6ubuntu3 Quantitative Finance Library -- development
ii  r-base-core    2.1.1-1        GNU R core of statistical computing language
ii  r-cran-rquantl 0.1.12-3build1 GNU R package interfacing the QuantLib finan


I don't have access to an older Debian system with 0.3.9 to compare; with
0.3.11 the correct answer comes up with the same C++ code posted a few days
ago.  

Dirk

--
Hell, there are no rules here - we're trying to accomplish something.
                                                  -- Thomas A. Edison