SERVING THE QUANTITATIVE FINANCE COMMUNITY

• 1
• 2

pushpendu
Topic Author
Posts: 1
Joined: June 19th, 2014, 1:45 pm

### Learning Quantlib

I've completed 5 modules of CQF, need to submit final project this December . I would like to learn more about quantlib c++ library . Is there any comprehensive training / docs for quantlib beginners.My background is java/C# working on risk analysis/integration . Any pointer is appreciated .

Cuchulainn
Posts: 59443
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Learning Quantlib

http://www.moneyscience.com/pg/events/A ... abioStarts tomorrow! If you do not know C++ then QL might be a challenge. Use SWIG?You best bet is to approach Luigi Ballabio.
Last edited by Cuchulainn on September 20th, 2014, 10:00 pm, edited 1 time in total.

tagoma
Posts: 18254
Joined: February 21st, 2010, 12:58 pm

### Learning Quantlib

Unfortunately, there is no complete and comprehensive manual on QL.One can find some links to online resources on the QL's website.One can also find help via QL mailing lists. There, a handful of smart and dedicated people make there best to provide assistance with using QL.I add there is a couple of videos posted by Luigi on the internet (on vimeo more on than youtube, I believe), following master classes he made. Finally, there is a QL group on Linkedin.
Last edited by tagoma on September 20th, 2014, 10:00 pm, edited 1 time in total.

lballabio
Posts: 983
Joined: January 19th, 2004, 12:34 pm

### Learning Quantlib

What tagoma said. The mailing list is probably your best bet as you learn the library.As for my material: my videos are at <http://vimeo.com/lballabio/videos>, and I started putting a few on YouTube, too: see <https://www.youtube.com/playlist?list=P ... THY_GYhJVr>. The short "notebook" ones are more about the usage of QuantLib, but there's still very few of them right now. The others, as well as most of my material at <http://implementingquantlib.blogspot.com/>, are about extending the library instead. If there were lots of usage documentation, I would tell you to come back to them later. Right now, they might be better than nothing: the blog posts explain the architecture of the library, so they should help you find your way around it.

studenttt
Posts: 48
Joined: August 8th, 2014, 12:58 am

### Learning Quantlib

My way to learn QuantLib is get my hand dirty. The best and absolutely best way to learn QuantLib is not via blogs and post, but just code it yourself. When I tried to learn how to bootstrap forward rates from a zero curve, I got an example from the Internet and tried to replicate the same result with QuantLib. Then I tried to read the headers in the TermStructure module, and coded it. It didn't give the result as expected, so I setup a breakpoint, stepped line-by-line to debug how it was computed.

lballabio
Posts: 983
Joined: January 19th, 2004, 12:34 pm

### Learning Quantlib

That, too. I guess it depends on one's learning style (and in fact, I provide plenty of exercises when I teach my course). There are also those that prefer to have an idea of the lay of the land before diving in.

studenttt
Posts: 48
Joined: August 8th, 2014, 12:58 am

### Learning Quantlib

QuoteOriginally posted by: lballabioThat, too. I guess it depends on one's learning style (and in fact, I provide plenty of exercises when I teach my course). There are also those that prefer to have an idea of the lay of the land before diving in.Well, your course is too expensive for people who want to get into the field. I'm really looking forward for you to finish off the QuantLib book so the beginners can benefit from the library as well.

lballabio
Posts: 983
Joined: January 19th, 2004, 12:34 pm

### Learning Quantlib

Yes, the course has a different target. It's supposed to be paid by one's employer.About the book: I haven't had much time to work on it of late. The available chapters cover the main parts of the library, though, so it should be somewhat usable already. Do you have any suggestions? What do you feel are the main missing parts? (The question is extended to anybody that wants to chime in, of course.)

Cuchulainn
Posts: 59443
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Learning Quantlib

QuoteOriginally posted by: studentttQuoteOriginally posted by: lballabioThat, too. I guess it depends on one's learning style (and in fact, I provide plenty of exercises when I teach my course). There are also those that prefer to have an idea of the lay of the land before diving in.Well, your course is too expensive for people who want to get into the field. I'm really looking forward for you to finish off the QuantLib book so the beginners can benefit from the library as well.In fairness, QL is supported by quants in their free time. People have jobs, (young) families and hobbies. On another thread, there a discussion about commercial products which sell for \$ and have the usually update fees. This allows them to hire lots of people, develop products etc. The main difference is resources.
Last edited by Cuchulainn on September 22nd, 2014, 10:00 pm, edited 1 time in total.

studenttt
Posts: 48
Joined: August 8th, 2014, 12:58 am

### Learning Quantlib

Yes. I think the book would be a bit better if it addresses how to use the library rather than how to extend the library. At the moment, there's too much focus on the how it's written. Take the TermStructure module as an example, I was in particular more interested how exactly to use the library to do some common tasks, such as bootstrapping forward rate and anything that do with curve building. Some examples would be nice. But instead the module was focused on how the module was designed with design patterns such as the bridge pattern.

Cuchulainn
Posts: 59443
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Learning Quantlib

QuoteOriginally posted by: studentttYes. I think the book would be a bit better if it addresses how to use the library rather than how to extend the library. At the moment, there's too much focus on the how it's written. Take the TermStructure module as an example, I was in particular more interested how exactly to use the library to do some common tasks, such as bootstrapping forward rate and anything that do with curve building. Some examples would be nice. But instead the module was focused on how the module was designed with design patterns such as the bridge pattern.Sounds like a good idea.A cookbook approach? e.g.1. Pick the basil leaves onto a chopping board (reserving a few baby leaves to garnish), then roughly chop the remaining leaves and finely chop the stalks.2....3.... 11. Serve with the reserved basil leaves sprinkled over the top and use a microplane to finely grate the Parmesan cheese, then sprinkle over.
Last edited by Cuchulainn on September 22nd, 2014, 10:00 pm, edited 1 time in total.

studenttt
Posts: 48
Joined: August 8th, 2014, 12:58 am

### Learning Quantlib

Yes. I'm more interested in a cookbook approach. Describing how it's written is nice but it shouldn't be the focus of the whole book.

lballabio
Posts: 983
Joined: January 19th, 2004, 12:34 pm

### Learning Quantlib

Well, the original idea was to stay focused on the design and to pester other people so that they would write the book focused on usage. It seemed more effective, but so far it didn't work (although there's been some glimmer of hope of late).Lately, I'm trying to cover the usage/cookbook part with the "notebooks" video series (the links are in my first post in this thread). I barely started on that, though.

Cuchulainn
Posts: 59443
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Learning Quantlib

Luigi,On the software internals of QL, what the ideas on upgrading some of the functionality to Boost and C++ 11? This has many advantages.Personally, I would do a complete rewrite of the Monte Carlo engine. AFAIR it uses Observer pattern all over the place ("GOF" Observer has a fatal flaw). Why not use Boost signals2? ======Here zip file with a discussion of a C# framework for MC. We also have it in C++. The main differences with OO design are:1. Interface-based and contracts.2. Loosely-coupled components.(C# delegates are similar to Boost signals(2)).This could be a starting point for discussion. C++ does not support interfaces but we can use std::function<> as a workaround.
Attachments
MCFramework.zip
Last edited by Cuchulainn on September 23rd, 2014, 10:00 pm, edited 1 time in total.

lballabio
Posts: 983
Joined: January 19th, 2004, 12:34 pm

### Learning Quantlib

We've been talking about offloading functionality to Boost (including signal2. Observer is used everywhere, not only in MC.) I'm not sure if we can do it while keeping backward compatibility, or if we'll have to start a new branch to move towards a version 2.0.C++11 is more tricky. It would be useful, sure, and I'm itching to try it, but I'm guessing that a lot of people are still stuck with versions of VC++ that don't support it. It's more than half in this sample, and I'm under the impression that banking IT departments are more conservative than most...