پارسی   English   العربیه

Introduction to C++ for Financial Engineers: An Object-Oriented Approach


The object-oriented programming language C++ is the de facto standard for developing real-life applications for Quantitative Finance and Financial Engineering. This language was designed by Dr. Bjarne Stroustup in the early 1990’s and it has become one of the most popular and robust languages for many important areas such as medical systems, computer graphics, telecommunications and in application areas where performance, accuracy and interoperability issues play a key role. The general expectation is that its importance will grow in the coming years.

C++ has also become the de facto standard for quant development and analysis. Knowledge of C++ is mandatory for many openings and job positions in Quantitative Finance. This book is the first book that discusses many of the issues that you need to know in order to be able to design and implement real-world applications. We focus on a number of critical topics:

  • Learning the essential syntax of C++ (‘getting the fundamentals right’)
  • Designing and implementing generic data structures using STL
  • Numerous applications (lattices, finite difference, Monte Carlo, etc)
  • Libraries, design patterns (GOF, POSA) and reusable software frameworks
  • Introduction to COM and C++ to Excel interoperability

Each chapter deals with one major topic. Furthermore, each chapter builds only on the results of the chapters preceding it, so that we keep the amount of forward referencing to a minimum. We discuss all the syntax that is discussed in the IT books and we apply it to QF applications. This book is self-contained and we advise its use in combination with the well-known standard reference work by Dr. Stroustrup.

Last, but not least, each chapter concludes with exercises and projects to test what you learned in that chapter. The exercises are based on the tactic: ‘get it working, then get it right, then get it optimised’. Furthermore, these exercises will also hopefully prepare you for your job interviews!

Included with the book is a CD will full source code, including working code for lattice, finite difference and Monte Carlo methods for one-factor and two-factor pricing models as well as an easy-to-use C++ visualization package to help you examine the output from these numerical methods.

DANIEL J. DUFFY has been involved in software development projects using C++ and object-oriented design techniques since 1988. He organized the first C++ course in the Netherlands in 1989 and has worked on a variety of C++ projects in areas such as computer graphics, optical technology, process control and quantitative finance systems. In 1993 he worked on an early version of a large object-oriented system for derivatives’ pricing and hedging models. He is designer/trainer and has trained mote than 2000 C++ developers in recent years.
A companion book to the current one is “Financial instrument pricing using C++” (Wiley 2004). Since 1996 he has written seven books on object-oriented design and programming. Daniel Duffy has a Phd in Numerical Analysis from Trinity College Dublin. He lives in the Netherlands with his wife Ilona and son Brendan.
He can be contacted at
0. Goals of this Book and Global Overview. 

Part I C++ Essential Skills.

1 Introduction to C++ and Quantitative Finance.

2 The Mechanics of C++: from Source Code to a Running Program.

3 C++ Fundamentals and My First Option Class.

4 Creating Robust Classes.

5 Operator Overloading in C++.

6 Memory Management in C++.

7 Functions, Namespaces and Introduction to Inheritance.

8 Advanced Inheritance and Payoff Class Hierarchies.

9 Run-Time Behaviour in C++.

10 An Introduction to C++ Templates.

Part II Data Structures, Templates and Patterns.

11 Introduction to Generic Data Structures and Standard Template Library (STL).

12 Creating Simpler Interfaces to STL for QF Applications.

13 Data Structures for Financial Engineering Applications. 

14 An Introduction to Design Patterns.

Part III QF Applications.

15 Programming the Binomial Method in C++.

16 Implementing One-Factor Black Scholes in C++.

17 Two-Factor Option Pricing: Basket and Other multi-Asset Options.

18 Useful C++ Classes for Numerical Analysis Applications in Finance.

19 Other Numerical Methods in Quantitative Finance.

20 The Monte Carlo Method Theory and  C++ Frameworks.

21 Skills Development: from White Belt to Black Belt.

Part IV Background Information.

22 Basic C Survival Guide.

23 Advanced C Syntax.

24 Datasim Visualisation Package in Excel: Drivers and Mechanisms.

25 Motivating COM and Emulation in C++.

26 COM Fundamentals.