June 05, 2007

"Free Seminar Evening – Software Frameworks in C++ and C# for Applications in Computational Finance" by Daniel Duffy

Speaker: Daniel J. Duffy, Datasim

Date and Time: Tuesday 26 June 2007, 18.30 to 20.30

Venue: City of London

Registration: contact Ilona Hooft Graafland

In this seminar we discuss how modern software design techniques are used to create applications in Computational Finance using C++ and C# as the implementation languages. We elaborate on the object-oriented and generic programming features that we employ to create robust and maintainable software systems for a range of derivatives applications such as equities and interest rates. In particular, we concentrate on PDE/FDM and Monte Carlo methods.

Some of the topics to be considered are:

  • Designing architectural Frameworks for financial applications
  • Combing the object-oriented and generic programming models
  • Developing applications for Monte Carlo and PDE
  • Choosing between C++ and C#: creating interoperable applications

Who should attend:

  • Quants and quant developers
  • Managers who wish to gain insight into the software development process in Computational Finance 

Program:

18.00 – 18.30 Refreshments and Registration

18.30 – 19.30 C++ and C# for Computational Finance

19.30 – 1945 short break/refreshments

19.45 – 20.30 Option Pricing with PDE and Monte Carlo

20.30 end of seminar

About the Speaker: view Daniel's profile

February 16, 2007

Daniel Duffy: Learning C++, Part II

 In my previous blog I discussed a number of fundamental techniques that should be mastered before one can make use of C++ to build an application.
In this blog I would like to introduce a number of advanced C++ syntax constructs that promote developer productivity and the reliability of code:

1. Template class and template functions: C++ supports the generic programming metaphor. This is the realisation of the Abstract Data Type (ADT) in computer science. An ADT is essentially a data structure and operations acting on that structure. But the type of the data is unspecified or generic. C++ supports a wide range of ADTs in its Standard Template Library (STL). Examples are lists, vectors, maps and sets.

The advantages of templates are:

. Once you have written and tested a template class it can be reused in many contexts by replacing the generic type by a specific type (this is called template instantiation)
. They are compile-time, hence fast
. They complement the object-oriented programming paradigm. You can inherit a template class from another template class, for example
. In some cases, using the ubiquitous inheritance mechanism is just not the correct solution. In particular, deriving all classes from the ‘cosmological’ object or Object leads to performance and reliability issues. Using templates in this way avoids dynamic casting

2. Exception handling: C++ supports try/catch/throw and the use of this technique is to be advised rather than ERRNO variable or even assert(). In general, exception handling is useful for catching and handling logic errors in your code. For example, here is a piece of code for printing arrays in Excel. The called functions checks if the input arrays from a finite difference methods are aligned:

try

{ // Print option price

printMatrixInExcel(fdm.result(), fdm.TValues(), fdm.XValues(), string("BSEulerE"));

} catch (DatasimException& e)

{ // If arrays are not compatible catch the exception here

    e.print();

    return 0;

}

In this case the function must be called with the arguments in the correct order, otherwise a run-time error will result because of array misalignment. Having an exception handler allows to pinpoint the logic error.

3. STL has a number of generic algorithms for sorting, searching and modifying STL containers. Please use these rather than creating your own.

4. The last technique is more of a tip. The misuse of the inheritance mechanism is harmful in my opinion. Many C++ applications become difficult to maintain for the following reasons:

. Using deep C++ class hierarchies (deriving a class from a class from class …)
. Multiple inheritance considered very harmful
. Creating classes with many member functions

These problems can be avoided by first designing the application and using the appropriate design patterns. 

Some C++ applications start small and in the early phases functionality, performance and accuracy are important factors for success. When the application is accepted it needs to be extended, at which time maintenance and ease of extension become important, especially when time-to-market forces come into play.

This will be the subject of the next blog when we discuss application development and design.

Anyone have any questions/comments? Feel free to reply!

Daniel


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