Serving the Quantitative Finance Community

 
User avatar
renorm
Topic Author
Posts: 1
Joined: February 11th, 2010, 10:20 pm

QuantLib: my first impression

March 5th, 2010, 3:27 am

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?
Last edited by renorm on March 4th, 2010, 11:00 pm, edited 1 time in total.
 
User avatar
renorm
Topic Author
Posts: 1
Joined: February 11th, 2010, 10:20 pm

QuantLib: my first impression

March 5th, 2010, 3:31 am

Btw, is there a typo in Black Scholes SDE as it given in BlackScholesProcess Class Reference? Should the SDE read as dLogS = ...?
Last edited by renorm on March 4th, 2010, 11:00 pm, edited 1 time in total.
 
User avatar
ktang
Posts: 0
Joined: January 15th, 2010, 7:16 pm

QuantLib: my first impression

March 5th, 2010, 7:43 am

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?
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

QuantLib: my first impression

March 5th, 2010, 8:15 am

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_
Last edited by Cuchulainn on March 4th, 2010, 11:00 pm, edited 1 time in total.
 
User avatar
hkapoor
Posts: 0
Joined: July 6th, 2010, 10:30 am

QuantLib: my first impression

July 28th, 2010, 4:59 am

hi there,is quantlib good enough for quant job prep...
 
User avatar
renorm
Topic Author
Posts: 1
Joined: February 11th, 2010, 10:20 pm

QuantLib: my first impression

July 28th, 2010, 10:05 am

Doesn't hurt to have on resume. QuantLib requires certain level of sophistication both in C++ and financial calculus.
 
User avatar
hli7
Posts: 0
Joined: February 7th, 2005, 8:25 pm

QuantLib: my first impression

July 31st, 2010, 8:47 am

I know a few hedge funds are using Quantlib together with Python for their work.