Re: QuantLib and Linux

Posted by L.Isella on
URL: http://quantlib.414.s1.nabble.com/QuantLib-and-Linux-tp4393p4394.html

Ok, same here on my Kubuntu (== Ubuntu with KDE instead of Gnome) box.
>
> [...]
>

> Ok, then you have to show us what you did, and what errors you got. We can't
> guess that.
>
> [ Ok I just tried it, and there is an implicit Depends: on the -dev package
> for the Boost headers. So also do 'apt-get install libboost-test-dev' and the
> you should be set. ]
>
> So try this:
>
> 0. Prelims:  
> Besides libquantlib0-dev, you need quantlib-examples for the
> source code of the examples. I presume you have that.
>
> 1. Get source code, copy to /tmp and gunzip
> $ cd /usr/share/doc/libquantlib-0.3.9c2/examples/
> $ cp -a DiscreteHedging/ /tmp/
> $ cd /tmp/DiscreteHedging/
>
> 2. Build it:
> $ g++ -o DH DiscreteHedging.cpp -lQuantLib
>
> 3. You should have a new executable 'DH':
> edd@joe:/tmp/DiscreteHedging$ ls -l DH
> -rwxr-xr-x  1 edd edd 523030 2006-01-22 14:09 DH
>
> 4. Run it:
> edd@joe:/tmp/DiscreteHedging$ ./DH
> Option value: 2.51207
>
>         |        | P&L          |  P&L    | Derman&Kamal | P&L          | P&L
> samples | trades | Mean         | Std Dev | Formula      | skewness     | kurt.
> -------------------------------------------------------------------------------
> 50000   | 21     | -0.000       | 0.43    | 0.44         | -0.35        | 1.59
> 50000   | 84     | -0.001       | 0.22    | 0.22         | -0.20        | 1.76
>
                                                                           
Thanks Dirk.
Well, now things seem to be much better. I replicated step by step what you did and I got the same as you (well, same option value and different parameters in the table, but I suppose it is normal (probably the results do not converge yet)).
I'll be doing more tests in the next days, but I suppose the problem was the Boost headers, which turned out not to be installed when I had run apt-get the first time.
Sorry for taking up your time on such a trivial issue.
Best regards

Lorenzo