Serving the Quantitative Finance Community

  • 1
  • 2
  • 3
  • 4
  • 5
  • 8
 
User avatar
ludinski
Topic Author
Posts: 0
Joined: January 9th, 2009, 8:54 am

Please we need to start documenting QuantLib!

October 22nd, 2010, 6:46 am

Hi QuantLibers,QuantLib has passed the 1.0 milestone but unfortunately the docs are still at 0.1 After having spent an entire afternoon being frustrating and trying to figure out how to extend the monte-carlo engine (I am currently trying to parallelize the engine for multi-core processors), I decided to write this post.I know that Luigi has done some work in documenting the library (http://sites.google.com/site/luigiballabio/qlbook) but clearly there is still a lot to be done.Off course this has to be a community effort and we can't just expect Luigi to write the entire docs...so let us bootstrap this effort...I am ready to start documenting the monte-carlo engine because it s my principal point of current interest Regards,Anwar
 
User avatar
renorm
Posts: 1
Joined: February 11th, 2010, 10:20 pm

Please we need to start documenting QuantLib!

October 22nd, 2010, 9:05 am

I presume you want to parallelize Monte-Carlo engine and you want to do it for performance. Do you want to extend equity engines or LMM? Which threads do you want to use?
 
User avatar
Cuchulainn
Posts: 20253
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Please we need to start documenting QuantLib!

October 22nd, 2010, 9:23 am

You need a technical writer. Not necessarily the same as a developer. And if you have not done docs before it will be even more difficult.After [9,11] hours at the office writing docs after the kids have gone to bed is not optimal. Do in the mornings. If you are looking for a publisher, give me a shout, as we do this kind of thing.
Last edited by Cuchulainn on October 21st, 2010, 10:00 pm, edited 1 time in total.
 
User avatar
ludinski
Topic Author
Posts: 0
Joined: January 9th, 2009, 8:54 am

Please we need to start documenting QuantLib!

October 22nd, 2010, 10:49 am

<quote>You need a technical writer. Not necessarily the same as a developer. And if you have not done docs before it will be even more difficult.After [9,11] hours at the office writing docs after the kids have gone to bed is not optimal. Do in the mornings. If you are looking for a publisher, give me a shout, as we do this kind of thing. -------------------------www.datasimfinancial.com </quote>I m not saying that we should have "publisher quality docs"...just saying that we need something more than parsing the source code in order to understand how to adapt, extend or even use the library. Things that seem quite obvious to QuantLib implementors or someone who s been working with the library for many years may seem totally obscure to a newcomer. Lack of documentation should nt be a barrier to entry to the library for a newcomer. I don t know how widely QuantLib has been adopted, but I certainly don t want to write "yet another pricing library". Documentation should be lightweight and could take various formats such as:- Tutorials, howtos, etc...
 
User avatar
Cuchulainn
Posts: 20253
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Please we need to start documenting QuantLib!

October 22nd, 2010, 10:56 am

QuoteI m not saying that we should have "publisher quality docsWhat then?My guess is that the MC/parallel documentation will take [40,200] man-hours, depending on what has been done already etc. etc. Or even longer.And don't forget selective recall; pre- and post- process are costly. Acceptance testing, etc. But don't take my word for it
Last edited by Cuchulainn on October 21st, 2010, 10:00 pm, edited 1 time in total.
 
User avatar
ludinski
Topic Author
Posts: 0
Joined: January 9th, 2009, 8:54 am

Please we need to start documenting QuantLib!

October 22nd, 2010, 11:03 am

<quote>What then?My guess is that the MC/parallel documentation will take [40,200] man-hours, depending on what has been done already etc. etc. Or even longer.And don't forget selective recall; pre- and post- process are costly. Acceptance testing, etc. But don't take my word for it -------------------------www.datasimfinancial.com </quote>OK. In that case I m ready to invest 200 hours of writing docs rather than spending 200 hours coding yet another monte-carlo engine. At the end of the day I will have a better understanding of QuantLib and the docs will useful to the community....the question is where should I start? Who has a good understanding of the QuantLib Monte-Carlo engine?
 
User avatar
Cuchulainn
Posts: 20253
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Please we need to start documenting QuantLib!

October 22nd, 2010, 11:38 am

QuoteOriginally posted by: ludinski<quote>What then?My guess is that the MC/parallel documentation will take [40,200] man-hours, depending on what has been done already etc. etc. Or even longer.And don't forget selective recall; pre- and post- process are costly. Acceptance testing, etc. But don't take my word for it -------------------------www.datasimfinancial.com </quote>OK. In that case I m ready to invest 200 hours of writing docs rather than spending 200 hours coding yet another monte-carlo engine. At the end of the day I will have a better understanding of QuantLib and the docs will useful to the community....the question is where should I start? Who has a good understanding of the QuantLib Monte-Carlo engine?ouch! > 300 hours. Reading someone else's code take forever. Here is a doc for boost special functionsAnd who will maintain the docs after new revisions?
Last edited by Cuchulainn on October 21st, 2010, 10:00 pm, edited 1 time in total.
 
User avatar
ludinski
Topic Author
Posts: 0
Joined: January 9th, 2009, 8:54 am

Please we need to start documenting QuantLib!

October 22nd, 2010, 11:52 am

Quoteouch! > 300 hoursHere is a doc for boost special functionsAnd who will maintain the docs after new revisions?That s precisely the point. Boost has excellent docs. QuantLib should aim to have the same type of docs. From my understanding the boost docs are written by the boost developers. By the way Quantlib does nt use Boost.random it has rolled out it s own RNGs.Ok let s say we need something like 1000 hours for documenting QuantLib. Hoping that there is at least 50 quantlib users/developers out there...that s a 20 hour/person effort which seems reasonable to me. So if we all started documenting the part of the library we understand ...we could have something acceptable out of it
 
User avatar
Cuchulainn
Posts: 20253
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Please we need to start documenting QuantLib!

October 22nd, 2010, 12:01 pm

QuoteOk let s say we need something like 1000 hours for documenting QuantLib. Hoping that there is at least 50 quantlib users/developers out there...that s a 20 hour/person effort which seems reasonable to me. It take a builder 1 year, so it takes 100 builders 1/100. My guess QL will take 3000 man hours, at least. Especially if the developers are doing it for the first time.
Last edited by Cuchulainn on October 21st, 2010, 10:00 pm, edited 1 time in total.
 
User avatar
renorm
Posts: 1
Joined: February 11th, 2010, 10:20 pm

Please we need to start documenting QuantLib!

October 22nd, 2010, 12:03 pm

QuantLib documentation is sparse, especially implementation. You would have to reverse engineer lots of things and learn what is going on inside pricing engines. You can and should past your question in QuantLib mailing list. The developers are very helpful and reply to questions quickly.If you really want to invest nontrivial amount of efforts and time into this projects, may I suggest you to start with market models. Equity documentation is more or less adequate even for newcomers. IMHO, your efforts would have the greatest impact if spent improving LMM documentation. Parallelizing LMM makes more seance too. Mark Joshi has started open source CUDA project kooderive a while ago. The project is mainly about parallel LMM. Given that CUDA uses a dialect of C, you could borrow some of the numerical routines from kooderive. Both QuantLib and kooderive would benefit from your documenting efforts.My $0.02.
 
User avatar
Cuchulainn
Posts: 20253
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Please we need to start documenting QuantLib!

October 22nd, 2010, 12:24 pm

Large commercial s/w projects in other domains have a different approach. There is usually 1 architect, designers, programmers and focus on design as well.Just reverse engineering code is not the way imo. Look at how other domains do it and avoid the errors they made.Will you use UML 2.0?
Last edited by Cuchulainn on October 21st, 2010, 10:00 pm, edited 1 time in total.
 
User avatar
ludinski
Topic Author
Posts: 0
Joined: January 9th, 2009, 8:54 am

Please we need to start documenting QuantLib!

October 22nd, 2010, 12:50 pm

QuoteOriginally posted by: CuchulainnLarge commercial s/w projects in other domains have a different approach. There is usually 1 architect, designers, programmers and focus on design as well.Just reverse engineering code is not the way imo. Look at how other domains do it and avoid the errors they made.Will you use UML 2.0?You re right. But then it means QuantLib will never have any good docs? I really can t imagine that I m the only person in need of docs for extending the library. Is quantlib actually used in production systems?Yeah UML is one way of documenting stuff...
 
User avatar
ludinski
Topic Author
Posts: 0
Joined: January 9th, 2009, 8:54 am

Please we need to start documenting QuantLib!

October 22nd, 2010, 1:16 pm

QuoteOriginally posted by: renormQuantLib documentation is sparse, especially implementation. You would have to reverse engineer lots of things and learn what is going on inside pricing engines. You can and should past your question in QuantLib mailing list. The developers are very helpful and reply to questions quickly.If you really want to invest nontrivial amount of efforts and time into this projects, may I suggest you to start with market models. Equity documentation is more or less adequate even for newcomers. IMHO, your efforts would have the greatest impact if spent improving LMM documentation. Parallelizing LMM makes more seance too. Mark Joshi has started open source CUDA project kooderive a while ago. The project is mainly about parallel LMM. Given that CUDA uses a dialect of C, you could borrow some of the numerical routines from kooderive. Both QuantLib and kooderive would benefit from your documenting efforts.My $0.02.OK sounds reasonable...I guess a good starting point is the C++ classes mentioned in Mark Joshi's training sessions: http://www.moneyscience.com/training/pr ... ntlib.html
 
User avatar
ludinski
Topic Author
Posts: 0
Joined: January 9th, 2009, 8:54 am

Please we need to start documenting QuantLib!

October 22nd, 2010, 1:40 pm

QuoteOriginally posted by: renormI presume you want to parallelize Monte-Carlo engine and you want to do it for performance. Do you want to extend equity engines or LMM? Which threads do you want to use?Yeah I want to parallelize the Monte-Carlo engine for performance...it just frustrates me to have a 12 core Mac Pro and have one core overheating while 11 are ideal As far as threading is concerned I don t want to use "raw" threads but would rather use a higher-level library such as OpenMP, Intel TBB or Gran Central Dispatch. We could even imagine a hybrid approach where some of the computation is offloaded to the GPU via Open CL
 
User avatar
renorm
Posts: 1
Joined: February 11th, 2010, 10:20 pm

Please we need to start documenting QuantLib!

October 22nd, 2010, 4:43 pm

Why UML? QuantLib is too big. Limit yourself to LMM, at least for the beginning. Something similar to GSL manual would be much easier to produce than UML.