Daniel Duffy: C++ Programming for Financial Research Students
with Samvit Prakash, University of Maryland
In April 2007 I gave a C++ course and its
applications to finance for a group of research students of Professor Dilip
Madan at the University of Maryland UMD (see group photograph). The students had programming experience in
Matlab, C and a number had some experience of C++ (incidentally, one of these
students was working on a Quantlib project). The course was based on the
contents of the 2006 C++ book. The percentage theory was approximately 55:45.
The first two days concentrated on the essential fundamental syntax of the C++
language, advanced inheritance and templates. On the last day we introduced
design patterns with applications to PDE/FDM and a student exercise on CDO/CDS. The motivation was high with lots of
questions being thrown at the trainer. Never a dull moment! Some of the tips and guidelines in the
context of a university environment are: Duffy’s comments . The distinction between the compile and
link phases when building a project; coming to terms with compiler and linker
errors . Setting up a C++ project and defining
project settings and properties . Realising that C++ uses data in a
different way from Matlab; in particular, we do not use global data in C++. The
fact that objects need member data needs to be emphasized . Design and implement a C++ as a network
of communicating objects having well-defined interfaces; this promotes
maintainability and extendibility . ‘Thinking object-oriented’ and not
procedural We requested Daniel to come to the
University of Maryland for giving us a jump-start in C++. That is exactly what we got! One can learn
C++ from a book. But nothing can match the efficiency of the author guiding you
through the chapters, while focusing on the most pertinent concepts. Most of us had no background in C++, though
some of us had attempted to learn it from books. After the course, we were able
to create our own projects, build and compile our own codes with applications
in Mathematical Finance. These were simple projects, but way more advanced than
“Hello World!”. If other universities want to invite Daniel
for such courses, here are some suggestions from our experience: -Organize a 4-day course or at the minimum,
a 3-day one. It is best to have spare time for topics relevant to the
participants! -Even better to split the courses into two
- a beginner’s one, with no C++/OOP background, and an intermediate one where
students know the basic concepts of C++ and OOP: classes, polymorphism,
overloading etc. -The intermediate class can focus more on
design patterns for a larger project. - Divide students in groups of 2 or 3.
Encourage participants to debug each other’s code- it’s a great way to learn
and very efficient for the pace of the class! We wish to thank all attendees for their
enthusiasm.
Samvit’s comments
























Recent Forum Discussions