Book Image

Advanced Quantitative Finance with C++

By : Alonso Peña, Ph.D.
Book Image

Advanced Quantitative Finance with C++

By: Alonso Peña, Ph.D.

Overview of this book

<p>This book will introduce you to the key mathematical models used to price financial derivatives, as well as the implementation of main numerical models used to solve them. In particular, equity, currency, interest rates, and credit derivatives are discussed. In the first part of the book, the main mathematical models used in the world of financial derivatives are discussed. Next, the numerical methods used to solve the mathematical models are presented. Finally, both the mathematical models and the numerical methods are used to solve some concrete problems in equity, forex, interest rate, and credit derivatives.</p> <p>The models used include the Black-Scholes and Garman-Kohlhagen models, the LIBOR market model, structural and intensity credit models. The numerical methods described are Monte Carlo simulation (for single and multiple assets), Binomial Trees, and Finite Difference Methods. You will find implementation of concrete problems including European Call, Equity Basket, Currency European Call, FX Barrier Option, Interest Rate Swap, Bankruptcy, and Credit Default Swap in C++.</p>
Table of Contents (17 chapters)
Advanced Quantitative Finance with C++
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Preface
Index

Discipline 3 – informatics (C++ programming)


What is the role of C++ in pricing derivatives? Its role is fundamental. It allows us to implement the actual calculations that are required in order to solve the pricing problem. Using the preceding techniques to describe the dynamics of the underlying, we require to simulate many potential future scenarios describing its evolution. Say we ought to price a futures contract on the EUR/USD exchange rate with one year maturity. We have to simulate the future evolution of EUR/USD for each day for the next year (using equation 3). We can then compute the payoff at maturity (using equation 1). However, in order to compute the expected payoff (using equation 4), we need to simulate thousands of such possible evolutions via a technique known as Monte Carlo simulation. The set of steps required to complete this process is known as an algorithm. To price a derivative, we ought to construct such algorithm and then implement it in an advanced programming language such as C++. Of course C++ is not the only possible choice, other languages include Java, VBA, C#, Mathworks Matlab, and Wolfram Mathematica. However, C++ is an industry standard because it's flexible, fast, and portable. Also, through the years, several numerical libraries have been created to conduct complex numerical calculations in C++. Finally, C++ is a powerful modern object-oriented language.

It is always difficult to strike a balance between clarity and efficiency. We have aimed at making computer programs that are self-contained (not too object oriented) and self-explanatory. More advanced implementations are certainly possible, particularly in the context of larger financial pricing libraries in a corporate context. In this book, all the programs are implemented with the newest standard C++11 using Code::Blocks (http://www.codeblocks.org) and MinGW (http://www.mingw.org).