Computer C++ and Applications to Quantitative Finance

Graduate course, Université Paris 1 Panthéon‑Sorbonne, 2022

This course introduces students to object-oriented programming by exploring the concepts of program specification and design, algorithm development, coding, and testing, with applications to designing a financial pricing library with pricing algorithms for vanilla and path-dependent options.

Aims of the course

Students learn how to write programs in object-oriented programming (OOP) using the C++ language. Topics covered include C++ classes/objects, input/output streams, overloading, inheritance, templates, and exception handling. Throughout the semester, problem solving skills will be emphasized and applied to solving computer problems. Experiments give hands-on experience with the topics covered in this course with specific examples on designing code architectures for financial derivatives pricing.

Slides and material

The course slides are here.

Class

22 hours.

Syllabus

Computations and functions in C++

This course presents the basics of computation. In particular, it discusses how to compute a value from a set of operands (expression), how to choose among alternative actions (selection), and how to repeat a computation for a series of values (iteration).

Errors, Exceptions, Debugging and Testing

This course discusses correctness of programs, errors, and error handling.

C++ functions and technicalities

This course presents language-technical details to give a slightly broader view of C++’s basic facilities and to provide a more systematic view of those facilities.

Object-Oriented-Programming and Classes

This course presents language technicalities, mostly related to user-defined types, that is, to classes and enumerations.

Object-Oriented-Programming for Finance

This course introduces a simple Monte Carlo model which does not use Object-Oriented-Programming techniques but rather is the simplest procedural model for pricing an option. We examine its shortcomings and discuss how classes naturally arise from the concepts involved in its construction. Gradually, we introduce needs and how to address them using OOP concepts.

Testing

The last two classes consist in illustrating C++ design concepts by developing together and gradually, a basic financial C++ library for pricing simple derivatives using different methods, and illustrating the use of Object Oriented Programming concepts for real life problems faced by Quant teams in the industry. After the sixth and final course and before the final exam, students are provided with the library developed in class, and are asked to add features using the concepts learned in class.