This book introduces the reader to the C++ programming language and how to use it to write applications in quantitative finance (QF) and related areas. No previous knowledge of C or C++ is required -- experience with VBA, Matlab or other programming language is sufficient. The book adopts an incremental approach; starting from basic principles then moving on to advanced complex techniques and then to real-life applications in financial engineering. There are five major parts in the book:
The kinds of applications include binomial and trinomial methods, Monte Carlo simulation, advanced trees, partial differential equations and finite difference methods.
This book includes a companion website with all source code and many useful C++ classes that you can use in your own applications. Examples, test cases and applications are directly relevant to QF.
This book is the perfect companion to Daniel J. Duffy's book Financial Instrument Pricing using C++ (Wiley 2004, 0470855096 / 9780470021620)
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 dduffy@datasim.nl
0 Goals of this Book and Global Overview 1
PART I C++ ESSENTIAL SKILLS 5
1 Introduction to C++ and Quantitative Finance 7
2 The Mechanics of C++: from Source Code to a Running Program 15
3 C++ Fundamentals and My First Option Class 31
4 Creating Robust Classes 49
5 Operator Overloading in C++ 63
6 Memory Management in C++ 79
7 Functions, Namespaces and Introduction to Inheritance 93
8 Advanced Inheritance and Payoff Class Hierarchies 113
9 Run-Time Behaviour in C++ 133
10 An Introduction to C++ Templates 153
PART II DATA STRUCTURES, TEMPLATES AND PATTERNS 167
11 Introduction to Generic Data Structures and Standard Template Library (STL) 169
12 Creating Simpler Interfaces to STL for QF Applications 187
13 Data Structures for Financial Engineering Applications 203
14 An Introduction to Design Patterns 223
PART III QF APPLICATIONS 243
15 Programming the Binomial Method in C++ 245
16 Implementing One-Factor Black Scholes in C++ 265
17 Two-Factor Option Pricing: Basket and Other Multi-Asset Options 283
18 Useful C++ Classes for Numerical Analysis Applications in Finance 305
19 Other Numerical Methods in Quantitative Finance 315
20 The Monte Carlo Method Theory and C++ Frameworks 327
Dr. Joerg Kieritz and Daniel J. Duffy
21 Skills Development: from White Belt to Black Belt 345
21.1 Introduction and objectives 345
PART IV BACKGROUND INFORMATION 351
22 Basic C Survival Guide 353
23 Advanced C Syntax 363
24 Datasim Visualisation Package in Excel: Drivers and Mechanisms 373
25 Motivating COM and Emulation in C++ 391
26 COM Fundamentals 401
References 407
Index 409