The goal of this book is to model financial instruments, such as options, bonds and interest-rate products by partial differential equations, finite differences and C++. It is intended for IT and quantitative finance professionals who know this material and wish to deepen their knowledge and for those readers who use techniques such as Monte Carlo, Fourier transform methods, stochastic differential equations and lattice methods (for example, the binomial method) for instrument pricing.
We integrate a number of well-known areas to create a traceable and maintainable path from when a financial engineer proposes a new model to when he or she codes the resulting equations in C++. When viewed as a black box, the core process in this book is to produce C++ classes and code for financial engineering applications. Furthermore, we give lots of examples of code that developers can use without much hassle. The accompanying CD contains all the source code in this book. We provide guidelines, algorithms and reusable code to help the reader to achieve these ends. The main activities that realise the core process are:
-
Activity 1: Map the financial model to a partial differential equation (PDE)
-
Activity 2: Approximate the PDE by the finite difference method (FDM)
-
Activity 3: Implement the FDM using C++ and design patterns.
In this book we shall concentrate on Activities 2 and 3. Since this is a book on the application of C++ to financial engineering we concentrate on mapping the numerical algorithms from Activity 2 to robust and flexible C++ code and classes. However, we shall provide sufficient motivation and background information to help the reader to understand the complete ‘instrument life cycle’. This life cycle describes the processes, activities, decisions and alternatives that describe how to program models for financial instruments in C++.
The topics in this book relate to finance, partial differential equations, numerical schemes and C++ code, and for this reason we use the term Computational Finance to sum up these related activities (see Seydel, 2003, where the same phrase is used). The foundations for partial differential equations and finite difference schemes for financial engineering applications are discussed in Duffy (2004b).