1st Edition

Quantitative Finance An Object-Oriented Approach in C++

By Erik Schlogl Copyright 2014
    354 Pages 30 B/W Illustrations
    by Chapman & Hall

    354 Pages 30 B/W Illustrations
    by Chapman & Hall

    Quantitative Finance: An Object-Oriented Approach in C++ provides readers with a foundation in the key methods and models of quantitative finance. Keeping the material as self-contained as possible, the author introduces computational finance with a focus on practical implementation in C++.

    Through an approach based on C++ classes and templates, the text highlights the basic principles common to various methods and models while the algorithmic implementation guides readers to a more thorough, hands-on understanding. By moving beyond a purely theoretical treatment to the actual implementation of the models using C++, readers greatly enhance their career opportunities in the field.

    The book also helps readers implement models in a trading or research environment. It presents recipes and extensible code building blocks for some of the most widespread methods in risk management and option pricing.

    Web Resource
    The author’s website provides fully functional C++ code, including additional C++ source files and examples. Although the code is used to illustrate concepts (not as a finished software product), it nevertheless compiles, runs, and deals with full, rather than toy, problems. The website also includes a suite of practical exercises for each chapter covering a range of difficulty levels and problem complexity.

    A Brief Review of the C++ Programming Language
    Getting started
    Procedural programming in C++
    Object-oriented features of C++
    Templates
    Exceptions
    Namespaces

    Basic Building Blocks
    The Standard Template Library (STL)
    The Boost Libraries
    Numerical arrays
    Numerical integration
    Optimisation and root search
    The term structure of interest rates

    Lattice Models for Option Pricing
    Basic concepts of pricing by arbitrage
    Hedging and arbitrage–free pricing
    Defining a general lattice model interface
    Implementing binomial lattice models
    Models for the term structure of interest rates

    The Black/Scholes World
    Martingales
    Option pricing in continuous time
    Exotic options with closed form solutions
    Implementation of closed form solutions
    American options

    Finite Difference Methods
    The object-oriented interface
    The explicit finite difference method
    The implicit finite difference method
    The Crank/Nicolson scheme

    Implied Volatility and Volatility Smiles
    Calculating implied distributions
    Constructing an implied volatility surface
    Stochastic volatility

    Monte Carlo Simulation
    Background
    The generic Monte Carlo algorithm
    Simulating asset price processes
    Discretising stochastic differential equations
    Predictor-corrector methods
    Variance reduction techniques
    Pricing instruments with early exercise features
    Quasi-random Monte Carlo

    The Heath/Jarrow/Morton Model
    The model framework
    Gauss/Markov HJM
    Option pricing in the Gaussian HJM framework
    Adding a foreign currency
    Implementing closed-form solutions
    Monte Carlo simulation in the HJM framework
    Implementing Monte Carlo simulation

    Appendix A: Interfacing between C++ and Microsoft Excel
    Appendix B: Automatic Generation of Documentation Using Doxygen

    References

    Index

    Biography

    Erik Schlögl currently is Professor and Director of the Quantitative Finance Research Centre at the University of Technology, Sydney (UTS), Australia. Erik received his doctorate in Economics from the University of Bonn, Germany, for work on term structure models and the pricing of fixed income derivatives and has gained broad-based experience in computational financial engineering. He has consulted for financial institutions and software developers in Europe, Australia and in the US. His research interests cover a broad area of quantitative finance, in particular model calibration, interest rate term structure modelling, credit risk and the integration of multiple sources of risk. He has published articles in a number of international journals, including Finance & Stochastics, Quantitative Finance, Risk and the Journal of Economic Dynamics and Control. In addition to UTS, he held positions at the University of New South Wales, Australia, and the University of Bonn, Germany.

    "… a comprehensive, dual-perspective introduction to quantitative finance methods. By providing implementation details alongside theory, Schlögl ensures that one is never overemphasized at the expense of the other. All of the code described is reusable and reliant on only a small number of external libraries, meaning that this book is an invaluable resource to students and professionals in the field alike."
    Computing Reviews, March 2015

    "I recommend Erik Schlogl’s new book to all those interested in model implementation. From quasi-random sequences to HJM to the Excel interface, with full C++ code, there is something here for everyone."
    —Jim Gatheral, Presidential Professor, Baruch College, CUNY

    "If 25 years ago I had started in finance using C instead of Visual Basic, perhaps now I might be approximating Prof. Schlogl’s balanced and professional C++ framework for pricing financial derivatives. From interacting with quants writing production code I have learnt that several years’ experience with C++ can be dangerous as the possibility of writing incomprehensible (to others) abstract code becomes attractive. In this respect Prof. Schlogl strikes just the right balance between using the full power of C++ to encapsulate, concentrate, and abstract code, while remaining comprehensible. His book thoroughly outlines a framework, including procedures and libraries, for constructing the various building blocks of pricing systems for financial derivatives. Users implementing his sort of framework can be confident their code will be understood, and that it can be maintained and revised without dating. It is one of the dozen or so books that ought to be on every financial quant’s bookshelf; if only I had had it earlier!"
    —Alan Brace, Senior Quantitative Analyst in Market Risk, National Australia Bank, and Adjunct Professor, Quantitative Finance Research Centre, University Technology of Sydney

    "While some view quantitative finance as just another playground for beautiful mathematical theories, it is ultimately a very practical discipline where one’s success is more often than not measured by the quality, speed, and accuracy of computer code written to solve real-world problems. Quantitative Finance: An Object-Oriented Approach in C++ embraces this pragmatic view wholeheartedly to great success. The three core competencies of a successful quant: firm grasp of theory, strong command of numerical methods, and software design and development skills are taught in parallel, inseparable in the book as they are in the real world. A fantastic resource for students looking to become quants, the book sets a standard on how practically relevant quantitative finance should be taught. Those already in the field will also no doubt learn a thing or two on how to represent common financial constructs as logical and reusable software components."
    —Vladimir V. Piterbarg, Head of Quantitative Analytics, Barclays

    "Students and practitioners of quantitative analysis have long wanted a detailed exposition of computational finance that includes implementation details and quality C++ code. Their desires are no longer unrequited—this book contains a clear and careful discussion of many of the key derivatives pricing models together with object-oriented C++ code. Substantial discussion of the design choices made is also included. I believe that this book is destined to be part of every financial engineer’s toolkit."
    —Professor Mark Joshi, University of Melbourne