John Wiley & Sons Financial Modelling in Python Cover This book will: Show the reader how to get started quickly: Although the Python programming languag.. Product #: 978-0-470-98784-1 Regular price: $87.76 $87.76 Auf Lager

Financial Modelling in Python

Fletcher, Shayne / Gardner, Christopher

Wiley Finance Series

Cover

1. Auflage Juni 2009
244 Seiten, Hardcover
Fachbuch

ISBN: 978-0-470-98784-1
John Wiley & Sons

Weitere Versionen

mobipdf

This book will:

Show the reader how to get started quickly: Although the Python programming language is a powerful object-oriented language, it's easy to learn, especially for programmers already familiar with C or C++.
Show the reader how to write less code: Comparisons of program metrics (class counts, method counts, and so on) suggest that a program written in the Python programming language can be four times smaller than the same program written in C++.
Show the reader how to write better code: The Python programming language encourages good coding practices, and automatic garbage collection helps you avoid memory leaks.
Show the reader how to develop programs more quickly: The Python programming language is simpler than C++, and as such, your development time could be up to twice as fast when writing in it. Your programs will also require fewer lines of code.

Chapter by chapter this book gradually builds up a practical body of code that will serve as an extensible financial engineering system in python. The book uses the Black-Scholes example to begin the building of the python package that will house the code that will be presented as the book progresses.

Contents
1 Welcome to Python
1.1 Why Python?
1.1.1 Python is a high-level programming language
1.1.2 Python 'plays well with others'
1.1.3 Common misconceptions about Python
1.2 Roadmap for this book
2 First steps with Python
2.1 The Black-Scholes Formula
2.2 Modules and Packages
2.3 Unit-testing
3 Extending Python from C++
3.1 Boost.Datetime types
3.2 Boost.MultiArray types
4 Basic Mathematical Tools
4.1 Random number generation
4.2 N(.)
4.3 Interpolation
4.3.1 Interpolation in a single dimension
4.3.2 Interpolation in multiple-dimensions
4.4 Root-finding
4.4.1 Bisection Method
4.4.2 Newton-Raphson Method
4.5 Quadrature
4.5.1 Hermite
4.5.2 Piecewise constant polynomial integration
4.6 Linear Algebra
4.6.1 Matrix Inversion
4.6.2 Singular Value Decomposition
4.6.3 Solving Tridiagonal Systems
4.6.4 Solving linear systems
4.6.5 Pseudo square root
5 Curve and surface construction
5.1 Discount Factor Curves
5.2 Caplet Volatility Curves
5.3 Intensity Curves
5.4 Swaption Volatility Skew Cube
6 Pricing using Numerical Methods
6.1 Monte-Carlo pricing framework
6.2 A lattice pricing framework
7 The Hull-White model
7.1 A component based design
7.1.1 The state
7.1.2 The cache
7.1.3 The requestor
7.1.4 The filler
7.1.5 The rollback
7.1.6 The evolve
7.2 Pricing a Bermudan
7.3 Pricing a TARN
8 Hybrid Python/C++ Pricing Systems
Appendices
1 A Survey of Python Programming Tools
.2 Hull-White model

1 Welcome to Python

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.2 N(.)

4.3 Interpolation

4.4 Root finding

4.5 Linear algebra

4.6 Generalised linear least squares

4.7 Quadratic and cubic roots

4.8 Integration


5 Market: Curves and Surfaces

5.1 Curves

5.2 Surfaces

5.3 Environment


6 Data Model

6.1 Observables

6.2 Flows

6.3 Adjuvants

6.4 Legs

6.5 Exercises

6.6 Trades

6.7 Trade utilities


7 Timeline: Events and Controller

7.1 Events

7.2 Timeline

7.3 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


Appendices


A Python

A.1 Python interpreter modes

A.2 Basic Python

A.3 Conclusion


B Boost.Python

B.1 Hello world

B.2 Classes, constructors and methods

B.3 Inheritance

B.4 Python operators

B.5 Functions

B.6 Enums

B.7 Embedding

B.8 Conclusion


C Hull-White Model Mathematics


D Pickup Value Regression


Bibliography

Index
SHAYNE FLETCHER has a BSc. from the University of Sydney, Australia. He has had more than 10 years experience working for major investment banks in London, The Netherlands and Japan. In 2009 he founded QuantSoft (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.