the University of Chicago, and Carnegie-Mellon, respectively, may start to adapt
their curricula, if they have not done so already, to place more emphasis on the prac-
tical implementation and coding of models as many of their graduates head to Wall
Street to work in quantitative research and trading development groups.
I felt that since no book bridged the gap between the two and because such a
book would have helped me both in school and afterward on the job as a quantita-
tive developer, I should write such a book so as to help others. Such a book was an
enormous undertaking and required contacting many of the model developers of
some of the more complicated models to try to understand how they implemented
them and in some cases to even obtain their code. In those cases where I was not
able to get model details or code from an author, I was able to verify the accuracy
and robustness of the code I developed by being able to reproduce numerical results
of the models in published papers and books.
Modeling Derivatives in C++ is the first book to provide the source code for
most models used for pricing equity and fixed income derivatives. The objective of
the book is to fill the large gap that has existed between theory and practice of the
quantitative finance field. Readers will learn how to correctly code in C++ many de-
rivatives models used by research and trading desks. The book bridges the gap be-
tween theory and practice by providing both the theory and mathematical
derivations behind the models as well as the actual working code implementations
of these models. While there have been other books that have helped bridge this
gap such as Clewlow and Strickland’s Implementing Derivatives Models (John Wi-
ley & Sons, 1998a), they provide only pseudocode and do not emphasize robust
and efficient object-oriented code that is reusable. The assumption that readers can
easily or correctly translate pseudocode, which may have complex embedded sub-
routines of numerical computations that is needed, often is mistaken. Sometimes,
readers learn by analyzing and reviewing the complete and working code, which is
what this book attempts to accomplish. However, Implementing Derivatives Mod-
els does contain useful model discussions and pseudocode implementations, some
of which are implemented and built upon in this book using C++, such as the hedge
control variate method discussed in Chapter 2 and the alternating direction implicit
method discussed in Chapter 5.
Modeling Derivatives in C++ goes several steps beyond just providing C++
code; it discusses inefficiencies in some of the implementations and how they can be
improved with more robust object-oriented implementations by providing code
from the QuantLib, an open source quantitative pricing library, as well as by pro-
viding alternative implementations. For instance, three separate implementations
are given for the Hull-White model to show readers different coding approaches.
The book contains hundreds of classes, and there is a complete pricing engine li-
brary on the CD-ROM accompanying this book, which includes the code discussed
and given in the book. QuantPro, an MFC Windows application, for pricing many
equity and fixed income derivatives using the models discussed in the book, as well
as for simulating derivatives trades, is also provided on the CD-ROM.
It is the goal of the book that readers will be able to write their own models in
Preface xv