This book is directed at both industry practitioners and students interested in designing a pricing and risk management framework for financial derivatives using the Python programming language.
It is a practical book complete with working, tested code that guides the reader through the process of building a flexible, extensible pricing framework in Python. The pricing frameworks′ loosely coupled fundamental components have been designed to facilitate the quick development of new models. Concrete applications to real–world pricing problems are also provided.
Topics are introduced gradually, each building on the last. They include basic mathematical algorithms, common algorithms from numerical analysis, trade, market and event data model representations, lattice and simulation based pricing, and model development. The mathematics presented is kept simple and to the point.
The book also provides a host of information on practical technical topics such as C++/Python hybrid development (embedding and extending) and techniques for integrating Python based programs with Microsoft Excel.
1.1 Why Python?
1.2 Common misconceptions about Python.
1.3 Roadmap for this book.
2 The PPF Package.
2.1 PPF topology.
2.2 Unit testing.
2.3 Building and installing PPF.
3 Extending Python from C++.
3.1 Boost.Date Time types.
3.2 Boost.MultiArray and special functions.
3.3 NumPy arrays.
4 Basic Mathematical Tools.
4.1 Random number generation.
4.4 Root finding.
4.5 Linear algebra.
4.6 Generalised linear least squares.
4.7 Quadratic and cubic roots.
5 Market: Curves and Surfaces.
6 Data Model.
6.7 Trade utilities.
7 Timeline: Events and Controller.
8 The Hull White Model.
8.1 A component–based design.
8.2 The model and model factories.
8.3 Concluding remarks.
9 Pricing using Numerical Methods.
9.1 A lattice pricing framework.
9.2 A Monte–Carlo pricing framework.
9.3 Concluding remarks.
10 Pricing Financial Structures in Hull White.
10.1 Pricing a Bermudan.
10.2 Pricing a TARN.
10.3 Concluding remarks.
11 Hybrid Python/C++ Pricing Systems.
11.1 nth imm of year revisited.
11.2 Exercising nth imm of year from C++.
12 Python Excel Integration.
12.1 Black scholes COM server.
12.2 Numerical pricing with PPF in Excel.
A.1 Python interpreter modes.
A.2 Basic Python.
B.1 Hello world.
B.2 Classes, constructors and methods.
B.4 Python operators.
C Hull White Model Mathematics.
D Pickup Value Regression.
(http://www.quantsoft.co.jp) providing technical consulting services to meet the financial engineering programming needs of its clients.
CHRISTOPHER GARDNER has a PhD in Applied Mathematics from King′s College, London. He began his career working for UKAEA Fusion at Culham Laboratory before moving to the City of London. He has 10 years experience working as a Quantitative analyst. He is currently working on the pricing of Life derivatives for the Asset Management Pricing Desk at Swiss Re.