-   Forums
     -   Articles and Whitepapers
     -   Downloads
     -   Courses and Events
     -   Course Registration
     -   Distance learning
     -   Courses for Universities
     -   Books
     -   Audios and Demos

Advanced C++ for Computational Finance - (code CPP-CF)

The goal of this three-day intensive hands-on course is to learn those advanced features in C++ that are of direct relevance to writing and extending applications for quantitative and computational finance. The course uses the object-oriented and generic (templates) programming models (OOP, GP) in combination with design patterns and the STL and boost libraries to allow you to create robust and flexible applications. We develop the contents of the course by discussing important the C++ language features and using OOP and GP models to write clean and effective code. We also discuss how to improve the performance of your application. In all cases, the examples and test cases are based on finance experience.

This is one of the few courses (in our opinion) that focuses on the application of C++ to quantitative and computational finance. It is a practical course for practitioners.

YOU ARE KINDLY REQUESTED TO BRING YOUR OWN LAPTOP TO THE COURSE.
To participate in this course, you need to bring your own laptop computer with a C++ compiler (ideally Microsoft's Visual Studio or GNU GCC for example)

Your trainer is Dr. Daniel J. Duffy who has 20 years experience of C++ application development, design and training of professionals. He is the author of several books on C++ with applications to financial engineering and computational finance.

The percentage theory/practice is 70/30.


What do you learn?

In this course we introduce state-of-the-art design and programming techniques in C++ and their application to Computational Finance. In particular, the following topics are discussed in detail:

  • Advanced C++ syntax and its application
  • Template classes and the Standard Template Library (STL)
  • Combining the object-oriented and generic programming paradigms
  • The famous Gamma (GOF) design patterns applied to QF
  • Interfacing to Excel: COM Add-ins
  • Creating applications: Monte Carlo, Finite Difference and lattice methods


What do you receive?

As attendee you receive a full set of slides, C++ source code and a copy of Daniel Duffy's book "Financial Instrument Pricing using C++" (Wiley 2004), including CD with C++ code. In short, you will receive what is needed to start developing your own applications. The price includes coffee, tea, lunch and refreshments.


What previous delegates have said?

  • "Very good style and knowledge was far above the norm"
  • "Excellent hands-on teaching"
  • "Good balance of C++ and finance, theory and practice"
  • "The book I wish I had had when I first started studying C++"
  • "The best course I ever attended (Vienna)"

 

Course contents updated January 2010


Course Contents

Day 1: Advanced Object-Oriented and Generic C++
Memory Management, Issues
  • Static, stack and heap memory management
  • Wild pointers, dangling pointers, double free bugs, memory leaks
  • Using object factories to control object lifecycle
  • Single object and object array allocation and deallocation
Memory Management, Solutions
  • The pimpl idiom; STL auto_ptr
  • Using Builder pattern to coordinate object lifetime
  • Overview of Boost smart pointers
  • Scoped and shared pointers
  • Casting and Run-Time Type Information (RTTI)
  • Static and dynamic casting overview
  • dynamic_cast and static_cast
  • Exception handling issues
  • Boost lexical_cast  
Polymorphism Functions
  • Dynamic polymorphism: virtual and pure virtual functions
  • Polymorphism and algorithms in computational finance
  • Polymorphism, inheritance and composition, what’s best?
  • Performance issues with dynamic polymorphism  
Static Polymorphism
  • Curiously Recurring Template Pattern (CRTP)
  • Where does static_cast fit it?
  • Where to use CRTP
  • CRTP and performance improvements  
Advanced Generic Programming (GP) in C++
  • Template classes and template functions
  • Partial specialization
  • Default parameters, template template parameters
  • Template member functions
  • Nested templates and data structures
Combining OOP and GP
  • Inheritance scenarios
  • Composition; combining composition with inheritance
  • Policy-based design and traits classes
  • When OOP and when GP?  

Day 2: STL, Boost Libraries and Design
STL Containers
  • Sequential and associative containers
  • Lists, vector and queues
  • Maps, sets and multimaps
  • Modelling option data with maps and Property Sets  
STL Algorithms and Iterators
  • Mutating and non-mutating algorithms
  • Searching and sorting
  • Inserting and removing data  
Using STL in Applications
  • Using STL with class adapters
  • STL-compatible data structures
  • Complexity analysis and performance tests  
Function Pointers and Function Objects
  • C function pointers: advantages and disadvantages
  • Function objects and their applications
  • Functions in boost; binding
  • Performance issues  
String Algorithms
  • Regular expressions
  • Trimming and conversion
  • Find and replace
  • Find iterator
  • Join and split  
Random Number Library
  • Concepts
  • Random number variate generators
  • Random number library distributions
  • Applications  
uBLAS (Basic Linear Algebra System)
  • Vectors, matrices and their operations
  • Patterned matrices (sparse, triangular, ..)
  • Expression templates to improve performance
  • Applications of uBLAS classes  
Essential Patterns: Creational 
  • Factory method and abstract factory
  • Creating complex objects using Builder
  • Singleton<T>  
Essential Patterns: Structural
  • Composite and nested objects
  • Bridge and implementation-independence
  • Extending object structure with Decorator  
Essential Patterns: Behavioural
  • Strategy and algorithms
  • Extending class functionality with Visitor
  • Template method pattern and customisable frameworks  

Day 3: Design and Applications to Computational Finance
Multi-threading: Theory
  • What is a thread? Thread lifecycle
  • Shared data models
  • Thread synchronization and notification
  • Speedup and race conditions  
Multi-threading: OpenMP and boost Thread       
  • Overview of functionality
  • Creating threads
  • Speed-up, accuracy and robustness  
Excel-C++ Integration
  • An overview of Excel add-ins
  • Creating Automation add-ins and worksheet functions
  • Creating COM add-ins: The steps using ATL projects  
The Monte Carlo Method
  • Description of the problem
  • Creating a software framework for a MC engine
  • Using design patterns to create flexible MC systems
  • Plain options, Asians and barriers  
The Finite Difference Method
  • A quick introduction to FDM
  • C++ classes for a FDM solver
  • Explicit and implicit schemes (Crank-Nicolson, Euler, ADE)
  • Presentation in Excel  
Improving Application Performance
  • Call by reference versus call by value
  • Appropriate use of virtual functions
  • Function objects versus function pointers
  • Preventing unnecessary temporary object creation  
Loop Optimisation
  • Loop interchange
  • Loop fission and fusion
  • Making loops multi-threaded (OpenMP)
  • Application profiling; determining a program’s serial fraction

Prerequisites

We assume that the student has experience of C++. This is not a beginners course and we assume you know what constructors, destructors and operator overloading are in C++ and how memory management works (see modules 1-3 of the Distance Learning course).


Who should attend?

This course has been developed for financial professionals who design and implement pricing and hedging models in C++ and Excel. The course introduces and elaborates on how to apply C++ to creating flexible and reliable applications in Quantitative Finance using the most modern software design techniques. There is ample room for questions on your own specific applications as well as hands-on programming sessions. It is assumed that the attendees have some working knowledge of C++ and have developed applications or prototype applications in that language.


Duration, price, date, locations and registration

Course duration: 3 days.
Dates and location: (click on dates to print registration form)


Date(s) Location Price Language
Oct 18 - Oct 20 2010 London
(United Kingdom)
€ 3100.-- ex. VAT
€ 3689.-- inc. VAT
English
Oct 27 - Oct 29 2010 New York
(United States)
€ 3100.-- ex. VAT
€ 3689.-- inc. VAT
English
Dec 01 - Dec 03 2010 Paris
(France)
€ 3100.-- ex. VAT
€ 3689.-- inc. VAT
English

Click on one of the dates above to register.