March 25, 2008

Happy Easter...

...once again, a few days late. Also, it is somewhat telling that my latest post was to wish you a happy new year.

Oh well. As usual with these posts, I bring news on my Implementing QuantLib drafts. If you follow the link, you'll find a new version of chapter 3 in which I completed the section on yield term structures. As usual, I'll be grateful for any comments and/or corrections.

Luigi

January 03, 2008

Happy New Year!

I'm a few days late, I know. I was on vacation after the flurry of activity at the end of 2007; we had a new QuantLib release on December 24th (if you're interested, you can get it while it's hot at quantlib.org). My drafts of Implementing QuantLib got updated, too; there's no new content, but the existing material was modified to reflect changes in the library.

Again, happy 2008.

Luigi

November 05, 2007

Luigi Ballabio: implementing QuantLib (again)

I really have to come up with a catchier title for these posts.

However: the Implementing QuantLib page now links (thanks to a suggestion from Comp++'s own Daniel Duffy) to a tentative table of contents. Also new is a small appendix describing the code conventions we use in QuantLib---and I use in the book.

As usual, I'll be grateful for any comments and corrections.

Luigi

October 31, 2007

Luigi Ballabio: Implementing QuantLib

Hi all, Another half chapter of Implementing QuantLib is available. As promised, it describes a few classes I glossed over in the previous chapters. You can find the draft here.

As usual, comments are welcome.

Luigi

September 26, 2007

Implementing QuantLib Part 2

Hi all,

Just a short post to inform you that I've uploaded another half chapter of my ongoing book---as well as a revision of the previous chapter. You can find the draft here.

As usual, comments are welcome.

Luigi

September 07, 2007

An Introduction to the Boost Library

by Daniel Duffy

C++ continues to evolve and already STL is part of the official standard. I would like to discuss some new developments that are taking place and in particular we give an overview of the boost library (www.boost.org), a suite of useful C++ libraries containing functionality in the form of template classes:

  • Multiarray: defines a generic interface to multidimensional containers
  • Random numbers: contains a number of classes for generators and statistical distributions
  • Property map: classes that embody key-value pairs and definition of the corresponding access (for example read and write)
  • Smart pointers: objects that store pointers to dynamically allocated (heap) objects
  • Graph library: a C++ library implementing graphs, networks and related graph algorithms

The authors (as well as many other software developers) have developed a subset of the functionality contained in these libraries. For example, in Duffy 2004 and Duffy 2006 we have implemented a template Property Map class with properties similar to that in boost; furthermore, we have created classes for two-dimensional matrices and three-dimensional tensors using nested STL classes. If we were to build such classes again, we would choose to use the boost library as underlying substrate.
We give a short description of the functionality in the above libraries. At this stage we avoid dealing with the C++ details on how to use these libraries in an application (they will be discussed later). We summarise each library as a list of features:

   

Multiarray
    Array classes for n-dimensional data
    Accessing the elements of array using () and [] operators
    Creating views of an array having the same or less dimensions
    Determining storage ordering of data (C-style, Fortran-style or user-defined)
    Defining or changing array index (zero is default)
    Changing an array’s shape
    Resizing an array (increasing or decreasing the extent of a dimension in an array)

   

Random Numbers
    Linear congruential generators
    Mersenne Twister generator
    Lagged Fibonacci generators
    Classes for continuous statistical distributions
    Classes for discrete statistical distributions

   

Property Maps
    Key-value pair concept
    Readable and writable data
    Support for built-in C++ data types
    Applicability to Boost Graph Library (BGL)

   

Smart Pointers
    Sole ownership to single objects and arrays
    Shared ownership of objects and arrays
    Shared ownership of objects with embedded reference counting

The gradual introduction of these features in applications will promote the reliability, maintainability and efficiency of your software. We shall see next how to use these libraries and to apply them to the Monte Carlo method and other applications in finance.

In the next blogs we shall give some examples in C++ and applications to the Monte Carlo method.

April 27, 2007

Luigi Ballabio: A first look into QuantLib

If you happened to have a look at QuantLib, it won't have escaped you that the library sorely lacks documentation. I'm not talking of some kind of class reference; that one is available---mostly because it can be generated automatically. What is missing is a description of the architecture of the library, and of how the various classes interact.

Well, as the song says, rejoice, all ye faithful: such documentation is finally being written. Here is a draft of a chapter. You're welcome to read it; I'll be grateful for any feedback, corrections, and criticisms. In particular, criticisms will help us improve both the docs and the library itself, so fire ahead.

Luigi

Email me!

Download Chapter 2 here

(right-click & save target to download this file)

March 19, 2007

Luigi Ballabio: Show Me the Code!

As I was checking the new entries in my RSS feeds, I recently stumbled upon this blog entry. Go ahead, read it. I'll wait right here.

Are you back, gentle reader? What do you think? Although the blogger referred in particular to computer science, his argument applies to almost all fields. In fact, Mark Joshi made the very same point in a conversation we had last summer. How much can you trust the results of a quantitative-finance paper if they're not repeatable?

Of course, one could reproduce the results - in a way. Based on the author's description, one could code the same calculations. Like we have that kind of time, right?

In fact, the insight toolkit mentioned at the end of the post is a nice idea. If authors wrote their code on top of such a library and made it available, the advantage would be twofold. On the one hand, they would build upon classes and functions reviewed and tested by scores of other users. On the other hand, readers familiar with the toolkit would find it much easier to read the author's code and could focus on understanding the actual new algorithms rather than the scaffolding.

Need I mention that we have a similar toolkit for quantitative finance?

Thoughts anyone? I'll be glad to read them.

Luigi

C(omp) Search


WWW
compplusplus.com

C(omp) Community

Could this be you? Thijs van den Berg Dr. Jörg Kienitz Bjarne Stroustrup Dr. Egor Kraev Daniel Duffy Andrea Germani Umberto Cherubini Luigi Ballabio

More Members

Meet the Editorial Team



C(omp) Feeds


Want to know when new posts and features are made available? Sign up to receive email notifications by entering your email address:

Delivered by FeedBurner



Any Comments?

Send in questions for our authors and bloggers: comp@wiley.co.uk



C(omp) Events

1) 13-15 November: Quant Invest 2007
Russell Hotel, London
Key speakers include Sushil Wadhhwani, Paul Wilmott and Deborah Fuhr...

2) 30 November: CCCP Mathematical Finance Conference
Princeton University
Speakers include Paul Glasserman, Peter Carr and Rama Cont.

3) 10-14 December: Risk Minds 2007
President Wilson, Geneva

4) 12-15 December: Quantitative Methods in Finance
Manly Pacific Hotel
Sydney, Australia
Speakers include Mark Joshi

5) January 2008: Distance Learning for Financial Engineers
Computational and Quantitative Finance in C++
Datasim Education BV


Recent Forum Discussions


C(omp) Calendar

June 2008
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30