Page 1 of 1

QuantLib: my first impression

Posted: March 5th, 2010, 3:27 am
by renorm
I was looking into QuantLib for some time and currently trying to extend some of the classes from the library. Here is my very short and very subjective review.0) The library is big and full of very useful stuff (Monte-Carlo, Finite-Differences, Random and Quasi Random numbers and tons of other numerical stuff). The test suite is included. Which is very good.1) Learning curve is steep. It doesn't help that documentation is very sparse. Many class methods aren't documented at all. For example, what does Interpolation :: primitive do?2) The library is pure OOP and doesn't use (or uses very little) generic programming. Inheritance hierarchies are deep and multiple inheritance used often.3) Because everything must belong to some inheritance tree, it is inevitable that some of the inheritances are of SQUARE IS A RECTANGLE type. For example, StochasticProcess1D is derived from StochasticProcess, but because the inheritance doesn't represent IS A relationship, the public interface of the derived class must be redefined. Would it be better to use concepts instead of OOP in this kind of situation?

QuantLib: my first impression

Posted: March 5th, 2010, 3:31 am
by renorm
Btw, is there a typo in Black Scholes SDE as it given in BlackScholesProcess Class Reference? Should the SDE read as dLogS = ...?

QuantLib: my first impression

Posted: March 5th, 2010, 7:43 am
by ktang
QuoteOriginally posted by: renormWould it be better to use concepts instead of OOP in this kind of situation?This is very interesting. Can you give some examples or keywords on how to improve the design?

QuantLib: my first impression

Posted: March 5th, 2010, 8:15 am
by Cuchulainn
This is an off remark, but related to how any system is built. OOP is one of the paradigms for designing software systems; there are other, equally viable ones. Instead of always ISA (inheritance) you *also* use HAS-A (composition, delegation) which is even better in my experience. I am not going to start ranting again, but inheritance is neither necessary nor sufficient for flexible code. It is difficult to maintain and can be wrong (e.g. SQUARE ISA RECTANGLE ) QuoteCan you give some examples or keywords on how to improve the designIn C++, I find these to be useful:1. boost::Function (interface programming)2. template template parameters (ball and socket architecture), implements this3. boost::Signals (events)Most developers are comfortable with OOP and find templates (especially compiler errors) somewhat intimidating. Most experienced developers I talk to say that GP and non-OOP leads to easier s/w.. Look at Java and C# if you need convincing which way the wind is blowing here is an example of a generic nested class, with smart pointers and where the implelmentation is customisable. *Using* it just implies GenericComposite<double, vector> ==> write once, clone many times. No more inheritance, nor _copy_and_paste_

QuantLib: my first impression

Posted: July 28th, 2010, 4:59 am
by hkapoor
hi there,is quantlib good enough for quant job prep...

QuantLib: my first impression

Posted: July 28th, 2010, 10:05 am
by renorm
Doesn't hurt to have on resume. QuantLib requires certain level of sophistication both in C++ and financial calculus.

QuantLib: my first impression

Posted: July 31st, 2010, 8:47 am
by hli7
I know a few hedge funds are using Quantlib together with Python for their work.