
Financial Modelling in Python
by Fletcher, Shayne; Gardner, ChristopherBuy New
Rent Textbook
Rent Digital
Used Textbook
We're Sorry
Sold Out
How Marketplace Works:
- This item is offered by an independent seller and not shipped from our warehouse
- Item details like edition and cover design may differ from our description; see seller's comments before ordering.
- Sellers much confirm and ship within two business days; otherwise, the order will be cancelled and refunded.
- Marketplace purchases cannot be returned to eCampus.com. Contact the seller directly for inquiries; if no response within two days, contact customer service.
- Additional shipping costs apply to Marketplace purchases. Review shipping costs at checkout.
Summary
Author Biography
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.
Table of Contents
Welcome to Python | p. 1 |
Why Python? | p. 1 |
Python is a general-purpose high-level programming language | p. 1 |
Python integrates well with data analysis, visualisation and GUI toolkits | p. 2 |
Python 'plays well with others' | p. 2 |
Common misconceptions about Python | p. 2 |
Roadmap for this book | p. 3 |
The PPF Package | p. 5 |
PPF topology | p. 5 |
Unit testing | p. 6 |
doctest | p. 6 |
PyUnit | p. 7 |
Building and installing PPF | p. 7 |
Prerequisites and dependencies | p. 7 |
Building the C++ extension modules | p. 8 |
Installing the PPF package | p. 9 |
Testing a PPF installation | p. 9 |
Extending Python from C++ | p. 11 |
Boost.Date_Time types | p. 11 |
Examples | p. 12 |
Boost.MultiArray and special functions | p. 17 |
NumPy arrays | p. 19 |
Accessing array data in C++ | p. 19 |
Examples | p. 23 |
Basic Mathematical Tools | p. 27 |
Random number generation | p. 27 |
N(.) | p. 28 |
Interpolation | p. 29 |
Linear interpolation | p. 31 |
Loglinear interpolation | p. 32 |
Linear on zero interpolation | p. 32 |
Cubic spline interpolation | p. 33 |
Root finding | p. 35 |
Bisection method | p. 35 |
Newton-Raphson method | p. 36 |
Linear algebra | p. 38 |
Matrix multiplication | p. 38 |
Matrix inversion | p. 38 |
Matrix pseudo-inverse | p. 39 |
Solving linear systems | p. 39 |
Solving tridiagonal systems | p. 39 |
Solving upper diagonal systems | p. 40 |
Singular value decomposition | p. 42 |
Generalised linear least squares | p. 44 |
Quadratic and cubic roots | p. 46 |
Integration | p. 49 |
Piecewise constant polynomial fitting | p. 49 |
Piecewise polynomial integration | p. 51 |
Semi-analytic conditional expectations | p. 57 |
Market: Curves and Surfaces | p. 63 |
Curves | p. 63 |
Surfaces | p. 64 |
Environment | p. 65 |
Data Model | p. 69 |
Observables | p. 69 |
LIBOR | p. 70 |
Swap rate | p. 74 |
Flows | p. 79 |
Adjuvants | p. 82 |
Legs | p. 84 |
Exercises | p. 85 |
Trades | p. 87 |
Trade utilities | p. 88 |
Timeline: Events and Controller | p. 93 |
Events | p. 93 |
Timeline | p. 94 |
Controller | p. 97 |
The Hull-White Model | p. 99 |
A component-based design | p. 99 |
Requestor | p. 100 |
State | p. 101 |
Filler | p. 104 |
Rollback | p. 108 |
Evolve | p. 112 |
Exercise | p. 115 |
The model and model factories | p. 118 |
Concluding remarks | p. 121 |
Pricing using Numerical Methods | p. 123 |
A lattice pricing framework | p. 123 |
A Monte-Carlo pricing framework | p. 128 |
Pricing non-callable trades | p. 129 |
Pricing callable trades | p. 131 |
Concluding remarks | p. 142 |
Pricing Financial Structures in Hull-White | p. 145 |
Pricing a Bermudan | p. 145 |
Pricing a TARN | p. 152 |
Concluding remarks | p. 157 |
Hybrid Python/C++ Pricing Systems | p. 159 |
nth_imm_of_year revisited | p. 159 |
Exercising nth_imm_of_year from C++ | p. 161 |
Python Excel Integration | p. 165 |
Black-scholes COM server | p. 165 |
VBS client | p. 167 |
VBA client | p. 167 |
Numerical pricing with PPF in Excel | p. 168 |
Common utilities | p. 168 |
Market server | p. 169 |
Trade server | p. 176 |
Pricer server | p. 187 |
Appendices | p. 191 |
Python | p. 193 |
Python interpreter modes | p. 193 |
Interactive mode | p. 193 |
Batch mode | p. 193 |
Basic Python | p. 194 |
Simple expressions | p. 194 |
Built-in data types | p. 195 |
Control flow statements | p. 197 |
Functions | p. 200 |
Classes | p. 201 |
Modules and packages | p. 203 |
Conclusion | p. 205 |
Boost.Python | p. 207 |
Hello world | p. 207 |
Classes, constructors and methods | p. 207 |
Inheritance | p. 209 |
Python operators | p. 212 |
Functions | p. 212 |
Enums | p. 214 |
Embedding | p. 214 |
Conclusion | p. 216 |
Hull-White Model Mathematics | p. 217 |
Pickup Value Regression | p. 219 |
Bibliography | p. 221 |
Index | p. 223 |
Table of Contents provided by Ingram. All Rights Reserved. |
An electronic version of this book is available through VitalSource.
This book is viewable on PC, Mac, iPhone, iPad, iPod Touch, and most smartphones.
By purchasing, you will be able to view this book online, as well as download it, for the chosen number of days.
Digital License
You are licensing a digital product for a set duration. Durations are set forth in the product description, with "Lifetime" typically meaning five (5) years of online access and permanent download to a supported device. All licenses are non-transferable.
More details can be found here.
A downloadable version of this book is available through the eCampus Reader or compatible Adobe readers.
Applications are available on iOS, Android, PC, Mac, and Windows Mobile platforms.
Please view the compatibility matrix prior to purchase.