QuantLib and Quantrix

3.85K viewsGeneral Discussion
0

Does anybody has linked QuantLib and Quantrix together?
[url:2pjy25k1]http://www.quantlib.org/[/url:2pjy25k1]

I am thinking trying to migrate at least some parts of the QuantLib code (C++) to Java and integrate it in Quantrix. It is a difficult but very interesting project.

Is there a general interest for this kind of project?
All remarks, tips and questions are appreciated very much.

Dominik

0

Richard Gomes, the lead devloper of JQuantLib, sent me an e-mail with comments and corrections to my assumptions I did in this thread:

“I’d like to inform that we are on the way to our first release. I’d like to
make some observations about your message:

Dominik:
> After reviewing and trying to understand the QuantLib code (C++) I have the
> impression that QuantLib is very well designed and uses design patterns to
> the fullest extent. This is a plus but on the other side it is
> over-engineered.
Richard:
It’s really very well designed and well coded.
I wouldn’t say that it’s over-engineered but I’m doing JQuantLib easier to
understand and less complicated. What happens is that C++ requires a lot
of ‘low level’ code to perform things which Java offers transparently to
developers.

Dominik:
> Further, the migration of the C++ code to Java is not 100% possible due to
> the fact that the template feature of C++ can’t be replicated in Java
> perfectly.
Richard:
Let me disagree. Templates are, roughly… an “advanced and parametrized
copy-and-paste thing”. We obtain something similar and, in my humble
opinion… much better thing using Java Generics. With Generics, we obtain
real Java classes and not several copy-and-pasted pieces of code which are
generated by C++ compiler. A good example is our package
org.jquantlib.priceengines which contains several Generics instead of C++
templates. Anoter note is that we are not simply “translating” but we
are “doing it in Java”, doing it properly in Java.

Dominik:
> Second, QuantLib makes use of the C++ Boost library. There is no
> equivalent available for Java.
Richard:
Yes and no. A lot of effort was already done by several groups in order to
fill in the gap of STL in Java. In particular, we adopted the excellent Colt
library, developed at CERN [url:1blb7g44]http://dsd.lbl.gov/~hoschek/colt/[/url:1blb7g44] (a european
research laboratory on high energy physics) which contains most of STL we
need. I’m not skilled on STL… so I’m only able to tell you that “it seems”
to be complete enough.

Dominik:
> Third, the development of JQuantLib is lead
> by a single, very skilled, developer.
Richard:
Thanks for “very skilled” :)
At the moment we are a group of 3 very active “very skilled” developers. The
other 2 guys really rock! :) There are also other guys about to contribute,
as soon as they find enough time to do it.
At the moment we have 170 classes translated.. roughly 21% of QuantLib. In
fact this calculation is certainly wrong :-/
We plan to have our first release till end of May. Please see our milestones:
[url:1blb7g44]http://www.jquantlib.org/index.php/JQuantLib:Community_Portal[/url:1blb7g44]
We are currently working on tests.
[url:1blb7g44]http://www.jquantlib.org/maven2/sites/jquantlib/cobertura/index.html[/url:1blb7g44]

———————————————————————-

I will continue to develop the JQuantLib to Quantrix integration as soon as the first release of JQuantLib will be available.

Dominik

0

After reviewing and trying to understand the QuantLib code (C++) I have the impression that QuantLib is very well designed and uses design patterns to the fullest extent. This is a plus but on the other side it is over-engineered.

Further, the migration of the C++ code to Java is not 100% possible due to the fact that the template feature of C++ can’t be replicated in Java perfectly. Second, QuantLib makes use of the C++ Boost library. There is no equivalent available for Java. Third, the development of JQuantLib is lead by a single, very skilled, developer. Last but not least: My C++ knowledge is too poor to fully understand the code and concepts.

Based on all these reasons I think that we should develop a lightweight Java Finance API based on the idea of QuantLib but less sophisticated and huge. The goal is to provide the Quantrix users a simple open source finance framework.

Do you think this makes sense?
Do you have other ideas?
Or even better: Is someone willing to provide already available code?

Any feedback and suggestions are welcomed.

Dominik

0

J Scott,

Thank you for your reply.

I think I don’t have to do the work from scratch as I have found an open source project called JQuantLib: [url:yai1tdg2]http://www.jquantlib.org/[/url:yai1tdg2].
They have 77 classes developed so far but QuantLib has 645 *.hpp and 364 *.cpp files. I will contact the developers of JQuantLib to evaluate a possible teamwork.

An integration of Quantrix and QuantLib could help supporting Quantrix in the financial industry.

As I am not a finance professional I will appreciate any support from the members in this forum if we decide to start this project.

Dominik

0

I think that would be very interesting, but challenging as you say. I know Quantrix has looked to partnerships (like with ForecastPro) to pick up some statistical forecasting and financial analysis algorithms, but that requires that you do the forecasts outside Quantrix. In my mind Quantrix is the perfect UI for lightweight statistical forecasting, and a package that integrates the kind of thing QuantLib does would be great.

There’s another open source project called OpenForecast that is already built in Java, but it contains only the simplest forecasting models and nothing on the purely financial side like QuantLib.

As a side note, I’d be surprised if a 3rd party plugin market for Quantrix didn’t evolve as the product gets more distribution.