If you know a little bit about financial mathematics but don’t yet know a lot about programming, then C++ for Financial Mathematics is for you.

C++ is an essential skill for many jobs in quantitative finance, but learning it can be a daunting prospect. This book gathers together everything you need to know to price derivatives in C++ without unnecessary complexities or technicalities. It leads the reader step-by-step from programming novice to writing a sophisticated and flexible financial mathematics library. At every step, each new idea is motivated and illustrated with concrete financial examples.

As employers understand, there is more to programming than knowing a computer language. As well as covering the core language features of C++, this book teaches the skills needed to write truly high quality software. These include topics such as unit tests, debugging, design patterns and data structures.

The book teaches everything you need to know to solve realistic financial problems in C++. It can be used for self-study or as a textbook for an advanced undergraduate or master’s level course.

chapter 1|16 pages

Getting Started

chapter 2|20 pages

Basic Data Types and Operators

chapter 3|18 pages


chapter 4|16 pages

Flow of Control

chapter 5|14 pages

Working with Multiple Files

chapter 6|12 pages

Unit Testing

chapter 7|26 pages

Using C++ Classes

chapter 8|22 pages

User-Defined Types

chapter 9|14 pages

Monte Carlo Pricing in C++

chapter 10|16 pages


chapter 11|30 pages

Arrays, Strings, and Pointers

chapter 12|18 pages

More Sophisticated Classes

chapter 13|10 pages

The Portfolio Class

chapter 14|12 pages

Delta Hedging

chapter 15|22 pages

Debugging and Development Tools

chapter 16|28 pages

A Matrix Class

chapter 17|8 pages

An Overview of Templates

chapter 18|26 pages

The Standard Template Library

chapter 19|8 pages

Function Objects and Lambda Functions

chapter 20|22 pages


chapter 21|4 pages

Next Steps