interest rate models and next release

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

interest rate models and next release

Ferdinando M. Ametrano-2
Hi all

I would like to make the new 0.3.0 release by the end of january.

There are few things that I would try to finish in time for this release:
implementation of QuEP 5, finite difference refactoring, etc, but these
won't be release-stopper.

What I think is really important is the interest rate model framework.
While I haven't taken a look at Sad's latest commit yet I see that CIR+,
BK, and HW are there, plus a g2 2factors model.
To have BDT and HL too would be nice, but it is not really important.
What is badly needed is documentation, namely the InterestRateModelling
namespace documentation. Sad, do you think you can produce this in time?

I would also like Python bindings for IR models and derivative products
(cap/floor/swaption), and I volunteer here.

Another key issue would be to solve the problems we have on some platforms,
as Dirk pointed out. I know Luigi is working on that: Luigi please report
here your final results.
BTW Luigi told me that next release could be available also on Mac OS9 with
CodeWarrior.


Do you think I'm missing something? FYI here's the link to the last updated
TODO file:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/quantlib/QuantLib/TODO.txt?rev=HEAD&only_with_tag=HEAD&content-type=text/vnd.viewcvs-markup

ciao -- Nando



Reply | Threaded
Open this post in threaded view
|

Re: interest rate models and next release

Dirk Eddelbuettel
On Tue, Jan 08, 2002 at 04:36:28PM +0100, Ferdinando Ametrano wrote:
> Another key issue would be to solve the problems we have on some platforms,
> as Dirk pointed out. I know Luigi is working on that: Luigi please report

quantlib itself is doing ok, it only fails on m68k which is a platform which
will eventually disappear [ there is sentimental value in it as it is the
first Debian (Linux ?) port ]

quantlib-python is in fairly bad shape; it fails on Alpha (Liuigi is looking
into that) but also on arm, ia64, hppa, mips, mipsel. Ie it only works on
i386, powerpc, s390, sparc. quantlib-ruby is somewhere in between. See
http://buildd.debian.org and follow to "build log database".


Dirk

--
Good judgment comes from experience; experience comes from bad judgment.
                                                            -- F. Brooks



Reply | Threaded
Open this post in threaded view
|

Re: interest rate models and next release

Ferdinando M. Ametrano-2
>quantlib itself is doing ok, [...] quantlib-python is in fairly bad shape;
you're too nice with QuantLib ... I'm pretty sure 99% of the
quantlib-python problems are quantlib problems ...


ciao -- Nando



Reply | Threaded
Open this post in threaded view
|

Re: interest rate models and next release

Sadruddin Rejeb-2
In reply to this post by Ferdinando M. Ametrano-2
On 08 Jan 2002 at 16:36, Ferdinando Ametrano wrote:
> What I think is really important is the interest rate model framework.
> While I haven't taken a look at Sad's latest commit yet I see that CIR+,
> BK, and HW are there, plus a g2 2factors model.
> To have BDT and HL too would be nice, but it is not really important.
> What is badly needed is documentation, namely the InterestRateModelling
> namespace documentation. Sad, do you think you can produce this in time?

No problem, the documentation should be ready by then. The g2 two factor model
isn't really usable right now, but since there are analytical formulas for
discount bond options, we could calibrate it to caps. Well... I tried and
it crashed, but I think this is because we must use a constrained optimizer
(which is not implemented yet), especially for the correlation parameter
(that should lie between -1.0 and 1.0).
BDT and HL are actually already implemented, so I should upload them to the CVS
in the near future.

Later,


--
Sad (sad dot rejeb at riskmap dot it)


Reply | Threaded
Open this post in threaded view
|

Re: interest rate models and next release

Luigi Ballabio-4
In reply to this post by Dirk Eddelbuettel
On Tue, Jan 08, 2002 at 04:36:28PM +0100, Ferdinando Ametrano wrote:
> > Another key issue would be to solve the problems we have on some
> platforms,
> > as Dirk pointed out. I know Luigi is working on that: Luigi please report

Ok, here are good news and bad news.
The good news: I compiled the current sources on alpha and fixed the
BinaryOption problem that Dirk reported.
The bad news: with binary options working, QuantLib-Python runs a few more
tests and I found another couple of problems.
I'll be looking into this. Tomorrow, maybe.

Later,
         Luigi



Reply | Threaded
Open this post in threaded view
|

QuantLib-Python works on alpha debian

Luigi Ballabio-4
In reply to this post by Dirk Eddelbuettel
>On Tue, Jan 08, 2002 at 04:36:28PM +0100, Ferdinando Ametrano wrote:
> > Another key issue would be to solve the problems we have on some
> platforms,
> > as Dirk pointed out. I know Luigi is working on that: Luigi please report

Ok, I just committed some changes which make QuantLib-Python compile and
pass all tests on alpha. I hope this will fix the problems on other
platforms as well.

Dirk: while a couple of bugs were ours only, one seems to be related with
some C or C++ library. If you have any idea of who's the maintainer of the
corresponding package, you might want to get in touch with him and report.
The bug can be reproduced on flatline.tdyc.com as follows:

ballabio@flatline:~$ python
Python 2.1.1+ (#1, Jan  9 2002, 03:47:01)
[GCC 2.95.4  (Debian prerelease)] on linux2
Type "copyright", "credits" or "license" for more information.
 >>> import math
 >>> math.exp(-700)
9.8596765437597708e-305
 >>> math.exp(-750)
0.0
 >>> math.exp(-720)
Floating point exception
ballabio@flatline:~$

i.e., there is a range of numbers around -720 which causes exp() to abort.
Also, the same was happening in a calculation inside libQuantLib, so that
the problem might be not in Python but rather in some math C or C++ library
which both QuantLib and Python link to.

I fixed the problem in our code by filtering the call to exp() and just
returning 0 if the exponent is below -700 or so, but it might be advisable
to report the thing if you have any idea who to report to.

Bye for now,
                 Luigi



Reply | Threaded
Open this post in threaded view
|

Re: QuantLib-Python works on alpha debian

Dirk Eddelbuettel
On Thu, Jan 10, 2002 at 12:09:24PM +0000, Luigi Ballabio wrote:
>
> >On Tue, Jan 08, 2002 at 04:36:28PM +0100, Ferdinando Ametrano wrote:
> >> Another key issue would be to solve the problems we have on some
> >platforms,
> >> as Dirk pointed out. I know Luigi is working on that: Luigi please report
>
> Ok, I just committed some changes which make QuantLib-Python compile and
> pass all tests on alpha. I hope this will fix the problems on other

Excellent news, and thank you!

> platforms as well.

Probably/hopefully. I guess it is worth trying. I guess I should grab a
tarball out of CVS...   Is that against stock QL or do I need a new QL too

> Dirk: while a couple of bugs were ours only, one seems to be related with
> some C or C++ library. If you have any idea of who's the maintainer of the
> corresponding package, you might want to get in touch with him and report.
> The bug can be reproduced on flatline.tdyc.com as follows:
>
> ballabio@flatline:~$ python
> Python 2.1.1+ (#1, Jan  9 2002, 03:47:01)
> [GCC 2.95.4  (Debian prerelease)] on linux2
> Type "copyright", "credits" or "license" for more information.
> >>> import math
> >>> math.exp(-700)
> 9.8596765437597708e-305
> >>> math.exp(-750)
> 0.0
> >>> math.exp(-720)
> Floating point exception
> ballabio@flatline:~$
>
> i.e., there is a range of numbers around -720 which causes exp() to abort.
> Also, the same was happening in a calculation inside libQuantLib, so that
> the problem might be not in Python but rather in some math C or C++ library
> which both QuantLib and Python link to.

I'm suspect that this leads down to glibc where code like exp() ultimately
resides.

I think we should report this to debian-alpha and/or debian-python. What do
you think?

> I fixed the problem in our code by filtering the call to exp() and just
> returning 0 if the exponent is below -700 or so, but it might be advisable
> to report the thing if you have any idea who to report to.

Hack alert :)

Dirk


--
Good judgment comes from experience; experience comes from bad judgment.
                                                            -- F. Brooks


Reply | Threaded
Open this post in threaded view
|

Re: Re: QuantLib-Python works on alpha debian

Ferdinando M. Ametrano-2
>I guess I should grab a
>tarball out of CVS...   Is that against stock QL or do I need a new QL too
I don't know exactly what a stock QL is, anyway you will need a new QL too.
Besides the exp bug, Luigi told me about 1 SWIG interface bug and 1 QL bug.

FYI today or tomorrow I will update the nightly build on quantlib.org, so
you might take the tarball from the site if you prefer

ciao -- Nando