Given the explosive growth in new financial derivatives such as credit derivatives, hundreds of financial institutions now market these complex instruments and employ thousands of financial and technical professionals needed to model them accurately and effectively. Moreover, the implementation of these models in C++ and Matlab (two widely used languages for implementing and building derivatives models) has made programming skills in these languages important for practitioners to have. In addition, the use of Excel is also important as many trading desks use Excel as a front-end trading application.
Modeling Derivatives Applications in Matlab, C++, and Excel is the first book to cover in detail important derivatives pricing models for credit derivatives (for example, credit default swaps and credit-linked notes), collateralized-debt obligations (CDOs), mortgage-backed securities (MBSs), asset-backed securities (ABSs), swaps, fixed-income securities, and increasingly important weather, power, and energy derivatives using Matlab, C++, and Excel. Readers will benefit from both the mathematical derivations of the models, the theory underlying the models, as well as the code implementations.
Throughout this book, numerous examples are given using Matlab, C++, and Excel. Examples using actual real-time Bloomberg data show how these models work in practice. The purpose of the book is to teach readers how to properly develop and implement derivatives applications so that they can adapt the code for their own use as they develop their own applications. The best way to learn is to follow the examples and run the code. The chapters cover the following topics:
- Chapter 1: Swaps and fixed income securities
- Chapter 2: Copulas and copula methodologies
- Chapter 3: Mortgage-backed securities
- Chapter 4: Collateralized-debt obligations
- Chapter 5: Credit derivatives
- Chapter 6: Weather derivatives
- Chapter 7: Energy and power derivatives
- Chapter 8: Also covers model implementations for energy derivatives using Matlab, but is written and based on the proprietary work of its author, Craig Pirrong, professor of finance and director of the Global Energy Management Institute at the University of Houston.
- Chapter 9: Commercial real-estate backed securities (a type of asset-backed security), which is written and is based on the proprietary work of its author, Tien-Foo Sing, professor in the Department of Real Estate Finance at the National University of Singapore.
In order to provide different perspectives to readers and provide as much useful information as possible, the work and models developed and written by various leading practitioners and experts for certain topics are provided and incorporated throughout the book. Thus, not only does this book cover complex derivatives models and provide all of the code (which can be downloaded using a secure ID code from the companion Web site at http://www.ftpress.com/title/0131962590), but it also incorporates important work contributions from leading practitioners in the industry. For instance, the work of Galiani (2003) is discussed in the chapter on copulas and credit derivatives. The work of Picone (2004) is discussed in the chapter on collateralized-debt obligations. The work of Johnson (2004) is discussed in the chapters on fixed-income instruments and mortgage-backed securities. The valuable work for energy derivatives of Doerr (2002), Xiang (2004), and Xu (2004) is given. In Chapter 8, Craig Pirrong discusses the Pirrong-Jermayakan model, a two-dimensional alternating implicit difference (ADI) finite difference scheme for pricing energy derivatives. In Chapter 9, Tien-Foo Sing discusses using Monte Carlo to price asset-based securities. Moreover, numerous individuals named in the acknowledgments contributed useful code throughout the book.
The book emphasizes how to implement and code complex models for pricing, trading, and hedging using C++, Matlab, and Excel. The book does not focus on design patterns or best coding practices (these issues may be discussed in subsequent editions of the book.) Efficiency and modularity are important design goals in building robust object-oriented code. In some cases in this book, the C++ code provided could perhaps be more modular as with some of the routines in building interest rate trees. The emphasis throughout the book has been to provide working implementations for the reader to adapt. However, the book does provide some discussions and helpful tips for building efficient models. For instance, memory allocation for data structures is always an issue when developing a model that requires use and storage of multi-dimensional data. Use of a predefined two-dimensional array, for instance, is not the most efficient way to allocate memory since it is fixed in size. A lot of memory may be unutilized and wasted if you do not know how large the structure needs to be to store the actual data. On the other hand, the predefined array sizes may turn out not to be large enough.
Although two-dimensional arrays are easy to define, use of array template classes (that can handle multiple dimensions) and vectors (of vectors) in the Standard Template Library in C++ are more efficient because they are dynamic and only use as much memory as is needed. Such structures are used in the book, although some two-dimensional arrays are used as well. Matlab, a matrix manipulation language, provides automatic memory allocation of memory as data is used if no array sizes are predefined. All data in Matlab are treated as matrix objects; e.g., a single number is treated as a 1 x 1 array. Data can be added or removed from an object and the object will dynamically expand or reduce the amount of memory space as needed.
While every effort has been made to catch all typos and errors in the book, inevitably in a book of this length and complexity, there may still be a few. Any corrections will be posted on the Web site.
Hopefully, this book will give you the foundation to develop, build, and test your own models while saving you a great deal of development time through use of pre-tested robust code.
Supplemental Files on the Web Site
To download the code in this book, you must first register online. You will need a valid email address and the access code that is printed inside the envelope located at the back of the book.
To register online, go to http://www.ftpress.com/title/0131962590 and follow the on-screen instructions.
If you have any questions about online registration or downloading the code, please send us an inquiry via the Contact Us page at http://www.ftpress.com/about/contact us/.
NOTE: The code files are Copyrighted © 2006 by Justin London and the contributors thereof. Unauthorized reproduction or distribution is prohibited. All rights reserved.
© Copyright Pearson Education. All rights reserved.