You are on page 1of 37

2

Foreword
This book is an outgrowth of a number of activities of the author in the elds
of Derivatives Analytics and Python Programming at Visixion GmbH on the
one hand and of teaching Mathematical Finance at Saarland University on
the other hand.
It is the second preliminary edition of the book, nished in March 2013
(the rst was nished in January 2012), and it will most probably be corrected, revised and amended in a number of minor and even major ways.
The author is thankful for any hint with regard to errors, inconsistencies,
potential clarications and improvements in general.
The book is targeted at practitioners, researchers and students interested
in the market-based valuation of options from a practical perspective, i.e. the
single implementation steps that make up such an eort. It is also for those
who want to learn how Python can be used for Derivatives Analytics and
Financial Engineering. However, apart from being primarily practical and
implementation-oriented, the book also provides the necessary theoretical
foundations and numerical tools.
My hope is that the book will contribute to the increasing acceptance of
Python in the nancial community. If you are interested in getting the Python
scripts accompanying the book, send an email to contact@visixion.com.
I thank my familyand in particular my wife Sandrafor their support
and understanding that such a project requires many hours of solitude. I
also want to thank my colleague Michael Schwed for his continuous help and
support. Discussions with participants of seminars and of my lectures at
Saarland University also helped the project signicantly. Parts of this book
have beneted from talks I have given at Python conferences in Florence,
Paris and Leipzig during 2011 and 2012.

4
I dedicate this book to my lovely son Henry Nikolaus whose direct approach to living and clear view of the world I admire.
Vlklingen, Saarland, Germany
o
27. March 2013
Yves Hilpisch

Contents
1 A Quick Tour
1.1 Market-Based Valuation
1.2 Structure of the Book . .
1.3 Why Python? . . . . . .
1.4 Further Reading . . . . .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

The Market

17
17
18
20
21

23

2 What is Market-Based Valuation?


2.1 Options and their Value . . . . . . .
2.2 Vanilla vs. Exotic Instruments . . . .
2.3 Risks Aecting Equity Derivatives . .
2.3.1 Market Risks . . . . . . . . .
2.3.2 Other Risks . . . . . . . . . .
2.4 Hedging . . . . . . . . . . . . . . . .
2.5 Market-Based Valuation as a Process

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

25
25
29
31
31
33
33
34

3 Equity and Option Markets


3.1 Introduction . . . . . . . . . . . . . . . .
3.2 Volatility, Correlation & Co. . . . . . . .
3.3 Normal Returns as the Benchmark Case
3.4 Indices and Stocks . . . . . . . . . . . .
3.4.1 Stylized Facts . . . . . . . . . . .
3.4.2 DAX Index Returns . . . . . . .
3.5 Option Markets . . . . . . . . . . . . . .
3.5.1 Bid/Ask Spreads . . . . . . . . .
3.5.2 Implied Volatility Surface . . . .
3.6 Short Rates . . . . . . . . . . . . . . . .
3.7 Conclusions . . . . . . . . . . . . . . . .
3.8 Python Scripts . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

37
37
38
40
44
44
45
50
50
52
54
57
58

.
.
.
.
.
.
.

CONTENTS
3.8.1
3.8.2
3.8.3
3.8.4
3.8.5

II

GBM Analysis . . . . . . . . . .
DAX Analysis . . . . . . . . . .
BSM Implied Volatilities . . . .
DAX Implied Volatilities . . . .
EURIBOR Analysis . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

Theoretical Valuation

69

4 Risk-Neutral Valuation
4.1 Introduction . . . . . . . . . . . .
4.2 Discrete-Time Uncertainty . . . .
4.3 Discrete Market Model . . . . . .
4.3.1 Primitives . . . . . . . . .
4.3.2 Basic Denitions . . . . .
4.4 Central Results in Discrete Time
4.5 Continuous-Time Case . . . . . .
4.6 Proofs . . . . . . . . . . . . . . .
4.6.1 Proof of Lemma 1 . . . . .
4.6.2 Proof of Proposition 1 . .
4.6.3 Proof of Theorem 1 . . . .

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

5 Complete Market Models


5.1 Introduction . . . . . . . . . . . . . . . . . . . .
5.2 Black-Scholes-Merton Model . . . . . . . . . . .
5.2.1 Market Model . . . . . . . . . . . . . . .
5.2.2 The Fundamental PDE . . . . . . . . . .
5.2.3 European options . . . . . . . . . . . . .
5.3 Greeks in the BSM Model . . . . . . . . . . . .
5.4 Cox-Ross-Rubinstein Model . . . . . . . . . . .
5.5 Proofs and Python Scripts . . . . . . . . . . . .
5.5.1 Its Lemma . . . . . . . . . . . . . . . .
o
5.5.2 Python Script for BSM Option Valuation
5.5.3 Python Script for BSM Call Greeks . . .
5.5.4 Python Script for CRR Option Valuation
6 Fourier-based Option Pricing
6.1 Introduction . . . . . . . . . .
6.2 The Pricing Problem . . . . .
6.3 Fourier Transforms . . . . . .
6.4 Fourier-based Option Pricing .

58
61
63
64
65

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

71
71
72
77
77
78
80
85
91
91
92
93

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

95
95
96
96
97
98
102
106
109
109
110
112
113

.
.
.
.

115
. 115
. 116
. 117
. 119

.
.
.
.
.
.
.
.
.
.
.

CONTENTS

6.5

6.6

6.7
6.8

6.4.1 Lewis (2001) Approach . . . . .


6.4.2 Carr-Madan (1999) Approach .
Numerical Evaluation . . . . . . . . . .
6.5.1 Fourier Series . . . . . . . . . .
6.5.2 Fast Fourier Transform . . . . .
Applications . . . . . . . . . . . . . . .
6.6.1 Continuous Market Model . . .
6.6.2 Discrete Market Model . . . . .
Conclusions . . . . . . . . . . . . . . .
Python Scripts . . . . . . . . . . . . .
6.8.1 Fourier Series . . . . . . . . . .
6.8.2 Roots of Unity . . . . . . . . .
6.8.3 Convolution . . . . . . . . . . .
6.8.4 Module with Parameters . . . .
6.8.5 Call Value by Convolution . . .
6.8.6 Option Pricing by Convolution
6.8.7 Option Pricing by DFT . . . .
6.8.8 Speed Test of DFT . . . . . . .

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

7 Valuation of American Options


7.1 Introduction . . . . . . . . . . . . . . . .
7.2 Financial Model . . . . . . . . . . . . . .
7.3 American Option Valuation . . . . . . .
7.3.1 Problem Formulations . . . . . .
7.3.2 Valuation Algorithms . . . . . . .
7.4 Numerical Results . . . . . . . . . . . . .
7.4.1 American Put Option . . . . . . .
7.4.2 American Short Condor Spread .
7.5 Conclusions . . . . . . . . . . . . . . . .
7.6 Python Scripts . . . . . . . . . . . . . .
7.6.1 Binomial Valuation . . . . . . . .
7.6.2 Monte Carlo Valuation with LSM

III

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

139
. 139
. 140
. 141
. 141
. 143
. 146
. 146
. 147
. 149
. 150
. 150
. 151

Market-Based Valuation

8 A First Example
8.1 Introduction .
8.2 Market Model
8.3 Valuation . .
8.4 Calibration .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

119
122
124
124
126
127
127
128
132
133
133
133
134
135
135
136
136
137

157
.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

159
. 159
. 159
. 160
. 161

CONTENTS
8.5
8.6
8.7

Simulation . . . . . . . . . . . . . . . . . .
Conclusions . . . . . . . . . . . . . . . . .
Python Scripts . . . . . . . . . . . . . . .
8.7.1 Valuation by Numerical Integration
8.7.2 Valuation by FFT . . . . . . . . . .
8.7.3 Calibration to Three Maturities . .
8.7.4 Calibration to Short Maturity . . .
8.7.5 Valuation by MCS . . . . . . . . .

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

9 General Model Framework


9.1 Introduction . . . . . . . . . . . . . . . . . . . . .
9.2 The Framework . . . . . . . . . . . . . . . . . . .
9.3 Features of the Framework . . . . . . . . . . . . .
9.4 Zero-Coupon Bond Valuation . . . . . . . . . . .
9.5 European Option Valuation . . . . . . . . . . . .
9.5.1 PDE Approach . . . . . . . . . . . . . . .
9.5.2 Transform Methods . . . . . . . . . . . . .
9.5.3 Monte Carlo Simulation . . . . . . . . . .
9.6 Conclusions . . . . . . . . . . . . . . . . . . . . .
9.7 Proofs and Python Scripts . . . . . . . . . . . . .
9.7.1 Its Lemma . . . . . . . . . . . . . . . . .
o
9.7.2 Python Script for Bond Valuation . . . . .
9.7.3 Python Script for European Call Valuation

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

162
166
167
167
168
170
171
173

.
.
.
.
.
.
.
.
.
.
.
.
.

175
. 175
. 175
. 177
. 180
. 180
. 181
. 183
. 184
. 185
. 185
. 185
. 186
. 187

10 Monte Carlo Simulation


191
10.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
10.2 Valuation of Zero-Coupon Bonds . . . . . . . . . . . . . . . . 192
10.3 Valuation of European Options . . . . . . . . . . . . . . . . . 196
10.4 Valuation of American Options . . . . . . . . . . . . . . . . . 201
10.4.1 Numerical Results . . . . . . . . . . . . . . . . . . . . 203
10.4.2 Higher Accuracy vs. Lower Speed . . . . . . . . . . . . 208
10.5 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
10.6 Python Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . 210
10.6.1 General Zero-Coupon Bond Valuation . . . . . . . . . . 210
10.6.2 CIR85 Simulation and Valuation . . . . . . . . . . . . 211
10.6.3 PyTables Database for European Options . . . . . . . 214
10.6.4 Automated Valuation of European Options by MCS . . 219
10.6.5 PyTables Database for American Put Options . . . . . 224
10.6.6 Automated Valuation of American Put Options by MCS
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229

CONTENTS

11 Model Calibration
11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . .
11.2 General Considerations . . . . . . . . . . . . . . . . . . .
11.2.1 Why Calibration At All? . . . . . . . . . . . . . .
11.2.2 Which Role Play Dierent Model Components? .
11.2.3 What Objective Function? . . . . . . . . . . . . .
11.2.4 What Market Data? . . . . . . . . . . . . . . . .
11.2.5 What Optimization Algorithm? . . . . . . . . . .
11.3 Calibration of Short Rate Component . . . . . . . . . . .
11.3.1 Theoretical Foundations . . . . . . . . . . . . . .
11.3.2 Calibration to German Bund Yield Curve . . . .
11.4 Calibration of Equity Component . . . . . . . . . . . . .
11.4.1 Valuation via Fourier Transform Method . . . . .
11.4.2 Calibration to DAX Call Option Quotes . . . . .
11.5 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . .
11.6 Python Scripts for Cox-Ingersoll-Ross Model . . . . . . .
11.6.1 Calibration of CIR85 . . . . . . . . . . . . . . . .
11.6.2 Calibration Results for CIR85 Model . . . . . . .
11.6.3 Bond Valuation in CIR85 Model . . . . . . . . . .
11.7 Python Scripts for Bakshi-Cao-Chen Model . . . . . . . .
11.7.1 Call Option Valuation in BCC97 Model . . . . . .
11.7.2 BSM Valuation Algorithms and Implied Volatility
11.7.3 Option Data and Calibration Results . . . . . . .
11.7.4 Calibration of Jump-Diusion Part of BCC97 . .
11.7.5 Calibration of Complete Model of BCC97 . . . .
11.7.6 Short Rate Calculation . . . . . . . . . . . . . . .
11.7.7 Comparison of Implied Volatilities . . . . . . . . .
12 Simulation and Valuation
12.1 Introduction . . . . . . . . . . . . . . . . .
12.2 Simulation of BCC97 Model . . . . . . . .
12.3 Valuation of Equity Options . . . . . . . .
12.3.1 European Options . . . . . . . . .
12.3.2 American Options . . . . . . . . . .
12.4 Conclusions . . . . . . . . . . . . . . . . .
12.5 Python Scripts . . . . . . . . . . . . . . .
12.5.1 Simulating the BCC97 Model . . .
12.5.2 Valuation of European Call Options
12.5.3 Valuation of American Call Options

. .
. .
. .
. .
. .
. .
. .
. .
by
by

. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
MCS
MCS

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

237
. 237
. 238
. 238
. 240
. 241
. 243
. 244
. 244
. 244
. 246
. 249
. 249
. 253
. 256
. 258
. 258
. 260
. 261
. 262
. 262
. 265
. 269
. 270
. 272
. 274
. 274

.
.
.
.
.
.
.
.
.
.

277
. 277
. 277
. 281
. 281
. 282
. 282
. 283
. 283
. 285
. 286

10

CONTENTS

13 Dynamic Hedging
13.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . .
13.2 Hedging Study for BSM Model . . . . . . . . . . . . .
13.3 Hedging Study for BCC97 Model . . . . . . . . . . . .
13.4 Conclusions . . . . . . . . . . . . . . . . . . . . . . . .
13.5 Python Scripts . . . . . . . . . . . . . . . . . . . . . .
13.5.1 LSM Delta Hedging in BSM (Single Path) . . .
13.5.2 LSM Delta Hedging in BSM (Multiple Paths) .
13.5.3 LSM Algorithm for American Put in BCC97 . .
13.5.4 LSM Delta Hedging in BCC97 (Single Path) . .
13.5.5 LSM Delta Hedging in BCC97 (Multiple Paths)

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

14 Executive Summary
A Python in a Nutshell
A.1 Python Fundamentals . . . . . . . . . .
A.1.1 Installing Python Packages . . .
A.1.2 First Steps with Python . . . .
A.1.3 Array Operations . . . . . . . .
A.1.4 Random Numbers . . . . . . . .
A.1.5 Plotting . . . . . . . . . . . . .
A.2 European Option Pricing . . . . . . . .
A.2.1 Black-Scholes-Merton Approach
A.2.2 Cox-Ross-Rubinstein Approach
A.2.3 Monte Carlo Approach . . . . .
A.3 Selected Financial Topics . . . . . . . .
A.3.1 Approximation . . . . . . . . .
A.3.2 Optimization . . . . . . . . . .
A.3.3 Numerical Integration . . . . .
A.4 Advanced Python Topics . . . . . . . .
A.4.1 Classes and Objects . . . . . .
A.4.2 Data Import and Export . . . .
A.5 Rapid Financial Engineering . . . . . .

289
. 289
. 290
. 295
. 299
. 300
. 300
. 302
. 304
. 305
. 308
311

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

313
. 313
. 313
. 314
. 317
. 320
. 320
. 323
. 323
. 324
. 329
. 331
. 331
. 334
. 335
. 336
. 336
. 337
. 341

Bibliography

345

Index

354

List of Tables
3.1
3.2

Option bid/ask spreads for call options on the DJIA . . . . . . 51


Option bid/ask spreads for put options on the DJIA . . . . . . 51

5.1

Valuation results from the CRR binomial algorithm for the


European call option . . . . . . . . . . . . . . . . . . . . . . . 108

7.1

Valuation results from the LSM and DUAL Monte Carlo algorithms for the American put option . . . . . . . . . . . . . . 149
Valuation results from the LSM and DUAL Monte Carlo algorithms for the Short Condor Spread . . . . . . . . . . . . . 150

7.2

10.1 Monte Carlo valuation results for European call and put options in Hestons stochastic volatility model (I) . . . . . . . .
10.2 Monte Carlo valuation results for European call and put options in Hestons stochastic volatility model (II) . . . . . . .
10.3 Monte Carlo valuation results for American put options in
Heston-Cox-Ingersoll-Ross stochastic volatility and short rate
model (I) . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.4 Monte Carlo valuation results for American put options in
Heston-Cox-Ingersoll-Ross stochastic volatility and short rate
model (II) . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.5 Monte Carlo valuation results for American put options in
Heston-Cox-Ingersoll-Ross stochastic volatility and short rate
model (III) . . . . . . . . . . . . . . . . . . . . . . . . . . .

11

. 200
. 202

. 206

. 208

. 209

12

LIST OF TABLES

List of Figures
2.1
2.2

Inner value of a European call option . . . . . . . . . . . . . . 26


Black-Scholes-Merton value of a European call option . . . . . 28

3.1
3.2

A single simulated path for the geometric Brownian motion . .


Histogram of the daily log returns of the geometric Brownian
motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Realized volatility for the simulated path of the geometric
Brownian motion . . . . . . . . . . . . . . . . . . . . . . . . .
Rolling mean log return, volatility and correlation (261 days)
for Geometric Brownian motion . . . . . . . . . . . . . . . . .
DAX daily quotes as downloaded from http://finance.yahoo.
com into a spreadsheet . . . . . . . . . . . . . . . . . . . . . .
DAX index level quotes and daily log returns over the period
from 26. Nov 1990 to 01. Feb 2013 . . . . . . . . . . . . . . .
Histogram of the daily log returns of the DAX over the period
from 26. Nov 1990 to 01. Feb 2013 . . . . . . . . . . . . . . .
Left tail of histogram of the daily log returns of the DAX over
the period from 26. Nov 1990 to 01. Feb 2013 . . . . . . . . .
Realized volatility for the DAX over the period from 26. Nov
1990 to 01. Feb 2013 . . . . . . . . . . . . . . . . . . . . . . .
Rolling mean log return, volatility and correlation (252 days)
for the DAX . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Implied volatilities from European call options on the DAX
on 29. Apr 2011 (I) . . . . . . . . . . . . . . . . . . . . . . . .
Implied volatilities from European call options on the DAX
on 29. Apr 2011 (II) . . . . . . . . . . . . . . . . . . . . . . .
Daily quotes of 1 week EURIBOR and daily log changes over
the period from 01. Jan 1999 to 01. Feb 2013 . . . . . . . . .
Histogram of daily log changes in 1 week EURIBOR . . . . . .
Right tail of histogram of daily log changes in 1 week EURIBOR

3.3
3.4
3.5
3.6
3.7
3.8
3.9
3.10
3.11
3.12
3.13
3.14
3.15

13

41
41
43
43
46
46
47
47
49
49
53
53
55
56
56

14

LIST OF FIGURES
3.16 Daily quotes of 1 week, 1 month, 6 months and 1 year EURIBOR over the period from 01. Jan 1999 to 01. Feb 2013 . . . 57
5.1
5.2
5.3
5.4
5.5
5.6
5.7
6.1
6.2
7.1
7.2
8.1
8.2
8.3

Value of the example European call option for varying strike


K, maturity date T , short rate r and volatility (vol) . . .
Value of the example European put option for varying strike
K, maturity date T , short rate r and volatility (vol) . . .
The delta of the European call option with respect to maturity date T and strike K . . . . . . . . . . . . . . . . . . . .
The gamma of the European call option with respect to maturity date T and strike K . . . . . . . . . . . . . . . . . . .
The theta of the European call option with respect to maturity date T and strike K . . . . . . . . . . . . . . . . . . . .
The rho of the European call option with respect to maturity
date T and strike K . . . . . . . . . . . . . . . . . . . . . .
The vega of the European call option with respect to maturity
date T and strike K . . . . . . . . . . . . . . . . . . . . . .

. 100
. 101
. 103
. 104
. 104
. 105
. 105

Fourier series approximation of function f (x) = |x| of order 1


and of order 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Series with roots of unity for n = 5 and n = 30 plotted in the
imaginary plane . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Valuation results for the American put option from 25 simulation runs with M = 100 time intervals . . . . . . . . . . . . 148
Valuation results for the American Short Condor Spread
from 25 simulation runs with M = 100 time intervals . . . . . 148
Results of the calibration of Mertons jump-diusion model to
market quotesthree maturities . . . . . . . . . . . . . . . . . 163
Results of the calibration of Mertons jump-diusion model to
market quotesshort maturity only . . . . . . . . . . . . . . . 163
Comparison of European call option values from Lewis formula, Carr-Madan formula and Monte Carlo simulation . . . . 165

10.1 20 simulated paths for the Cox-Ingersoll-Ross short rate process194


10.2 Monte Carlo values for a ZCB maturing at T = 2exact scheme195
10.3 Monte Carlo values for a ZCB maturing at T = 2Euler scheme195
11.1 German Bund yields for maturities up to 10 years . . . . . . . 247
11.2 Market implied forward rates from German Bunds compared
to model forward rates . . . . . . . . . . . . . . . . . . . . . . 248

LIST OF FIGURES

15

11.3 Bond values at time t for a unit ZCB maturing at time T = 10


11.4 Valuation accuracy of Lewis integral approach in comparison
to Black-Scholes-Merton analytical formula . . . . . . . . . . .
11.5 Valuation accuracy of Carr-Madan FFT approach in comparison to Black-Scholes-Merton analytical formula . . . . . . . .
11.6 Results of jump-diusion part calibration to ve European call
options on the DAX with 29 days maturity . . . . . . . . . . .
11.7 Results of simultaneous jump-diusion part and stochastic
volatility part calibration . . . . . . . . . . . . . . . . . . . . .
11.8 Implied volatilities of European call option market quotes (29
days maturity) compared to model implied volatilities after
calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11.9 Implied volatilities of European call option market quotes (239
days maturity) compared to model implied volatilities after
calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11.10Implied volatilities of European call option market quotes (603
days maturity) compared to model implied volatilities after
calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12.1 10 simulated short rate paths from calibrated Cox-IngersollRoss short rate model for a time horizon of 1 year . . . . . .
12.2 10 simulated volatility paths from calibrated general market
model for a time horizon of 1 year . . . . . . . . . . . . . . .
12.3 10 simulated DAX level paths from calibrated general market
model for a time horizon of 1 year . . . . . . . . . . . . . . .
12.4 Histogram of simulated DAX levels from calibrated general
market model after a time period of 1 year . . . . . . . . . .
13.1 Dynamic replication of American put option in Black-ScholesMerton model with prot at exercise . . . . . . . . . . . . .
13.2 Dynamic replication of American put option in Black-ScholesMerton model with loss at exercise . . . . . . . . . . . . . .
13.3 Frequency distribution of (discounted) P&L at exercise date of
10,000 dynamic replications of American put option in BlackScholes-Merton model . . . . . . . . . . . . . . . . . . . . .
13.4 Dynamic replication of American put option in general market
model with prot at maturity . . . . . . . . . . . . . . . . .
13.5 Dynamic replication of American put option in general market
model with loss at maturity . . . . . . . . . . . . . . . . . .

248
251
251
255
256

257

257

258

. 279
. 279
. 280
. 280

. 291
. 294

. 295
. 297
. 297

16

LIST OF FIGURES
13.6 Frequency distribution of (discounted) P&L at exercise date of
10,000 dynamic replications of American put option in general
market model . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
13.7 Dynamic replication of American put option in general market
model with huge loss at exercise due to an index jump . . . . 299
A.1
A.2
A.3
A.4
A.5
A.6
A.7
A.8

Example of gure with matplotlibhere: line . . . . . . .


Example of gure with matplotlibhere: dots & bars . . .
Histogram of simulated stock index levels at T . . . . . . . .
Approximation of cosine function by regression . . . . . . . .
Approximation of cosine function by cubic splines . . . . . .
Excel sample sheet with DAX quotes . . . . . . . . . . . . .
Historic DAX index levels from 04. Jan 2010 to 07. Feb 2013
DAX index quotes from 03. Jan 2005 to 07. Feb 2013 and
daily log returns; source: finance.yahoo.com . . . . . . . .

.
.
.
.
.
.
.

321
322
331
333
333
339
341

. 344

Chapter 1
A Quick Tour
1.1 Market-Based Valuation
This book is about the market-based valuation of (stock) index options. In
the domain of Derivatives Analytics this is an important task which every
major investment bank and buy-side decision maker in this market is concerned with on a daily basis. While theoretical valuation approaches develop
a model, parametrize it and then derive values for options, the market-based
approach works the other way round. Prices from liquidly traded options
are taken as given (i.e. they are input instead of output) and one tries to
parametrize a market model in a way that replicates the observed option
prices as good as possible. This activity is generally referred to as model
calibration. Being equipped with a calibrated model, one then proceeds with
the task at hand, be it valuation, trading, investing, hedging or risk management. A bit more specic, one might be interested in pricing and hedging
an exotic derivative instrument with such a modelhoping that the results
are in line with the overall market due to the previous calibration to more
simple, vanilla instruments.
To accomplish a market-based valuation, four areas have to be covered:
1. market: knowledge about market realities is a conditio sine qua non
for any sincere attempt to develop market-consistent models and to
accomplish market-based valuation
2. theory: every valuation must be grounded on a sound market model,
ensuring, for example, the absence of arbitrage opportunities and providing means to derive option values from observed quantities
3. numerics: one can not hope to work with analytical results only; numerical techniques, like Monte Carlo simulation, are generally required
17

18

CHAPTER 1. A QUICK TOUR


in dierent steps of a market-based valuation process
4. technology: to implement numerical techniques eciently one is dependent on technology

This book covers all of these areas in an integrated manner. It uses equity
index options as the prime example for derivative instruments throughout.

1.2 Structure of the Book


The book is divided in three parts. The rst part is concerned with marketbased valuation as a process and empirical ndings about market realities.
The second part covers a number of topics for the theoretical valuation of options and derivatives. It also develops tools ercely needed during a marketbased valuation. Part three nally covers the major aspects related to a
market-based valuation and also of hedging strategies in such a context.
Part I The Market comprises two chapters:
Chapter 2: this chapter contains a discussion of topics related to
market-based valuation, like risks aecting the value of equity index
options
Chapter 3: this chapter mainly documents empirical and anecdotal facts about stocks, stock indices and in particular volatility (e.g.
stochasticity, clustering, smiles)

Part II Theoretical Valuation comprises four chapters:


Chapter 4: this chapter covers arbitrage pricing theory and riskneutral valuation in discrete time (in some detail) and continuous time
(on a higher level) according to the Harrison-Kreps-Pliska paradigm
(cf. [57] and [58])
Chapter 5: the topic of this chapter are the complete market models
of Black-Scholes-Merton (BSM, cf. [8], [81]) and Cox-Ross-Rubinstein
(CRR, cf. [34]) that are generally considered benchmarks for option
valuation
Chapter 6: Fourier-based approaches allow to derive semi-analytical
valuation formulas for European options in market models more complex and realistic than the BSM/CRR models; this chapter introduces
the two main approaches of Carr-Madan (cf. [18])and Lewis (cf. [73])

1.2. STRUCTURE OF THE BOOK

19

Chapter 7: the valuation of American options is more involved than


the one of European options; this chapter analyzes the respective problem and introduces algorithms for their valution via binomial trees and
Monte Carlo simulation; at the center stands the Least-Squares Monte
Carlo algorithm of Longsta-Schwartz (cf. [76])

Finally, Part III Market-Based Valuation has seven chapters:


Chapter 8: before going into details, this chapter illustrates the whole
process of a market-based valuation eort in the simple, but nevertheless still useful, setting of Mertons jump diusion model (cf. [80])
Chapter 9: this chapter introduces the general market model used
henceforth, which is from Bakshi-Cao-Chen (cf. [4]) and which accounts
for stochastic volatility, jumps and stochastic short rates
Chapter 10: Monte Carlo simulation is generally the method of choice
for the valuation of exotic/complex index options and derivatives; this
chapter therefore discusses in some detail the discretization and simulation of the stochastic volatility model by Heston (cf. [61]) with constant as well as stochastic short rates according to Cox-Ingersoll-Ross
(cf. [33])
Chapter 11: model calibration stays at the center of market-based
valuation; the chapter considers several general aspects associated with
this topic and then proceeds with the numerical calibration of the general market model to real market data
Chapter 12: this chapter combines the results from the previous two
to value European and American index options via Monte Carlo simulation in the calibrated general market model
Chapter 13: this chapter analyzes dynamic delta hedging strategies
for American options by Monte Carlo simulation in dierent settings,
from a simple one to the calibrated market model
Chapter 14: this brief chapter provides a concise summary of central
aspects related to the market-based valuation of index options

In addition, the book has an Appendix with one chapter:


Appendix A: this appendix introduces into some of the most important Python concepts and libraries in a nutshell; the selection of topics
is clearly inuenced by the requirements of the rest of the book

20

CHAPTER 1. A QUICK TOUR

1.3 Why Python?


Currently, and for the foreseeable future as well, Python does not belong to
the most important programming languages in the nancial services industry
in general or in Derivatives Analytics in particular. Languages like C++, C,
C#, VBA or Java and toolboxes like Matlab or R dominate the scene. However, we see a number of good reasons to choose Python, the most important
ones we want to mention in no particular order:
Open Source: Python and the majority of available libraries are completely open source; this allows an entry to this technology at no costs,
something particularly important for students, academics or other individuals
Syntax: Python programming is easy to learn, the code is quite compact and in general highly readable; at universities it is increasingly
used to introduce to programming in general
Multi-Paradigm: Python is as good at procedural programming (which
suces for the purposes of this book) as well as at object-oriented programming (which is necessary in more complex/professional contexts)
Interpreted: Python is an interpreted language which makes rapid
prototyping and development in general a bit more convenient, especially for beginners
Libraries: nowadays, there is a wealth of powerful libraries available
and the supply grows steadily; there is hardly a problem which cannot
be easily attacked with an existing library, be it a numerical problem,
a graphical one or a data-related problem
Speed: a common prejudice with regard to interpreted languages
compared to compiled ones like C++ or Cis the slow speed of code
execution; however, nancial applications are more or less all about
matrix and array manipulations and operations which can be done at
the speed of C code with the essential Python library NumPy
Market: in the London area (mainly nancial services) the number of
Python developer contract oerings was 644 in the three months ending
22. April 2011; the comparable gure in the same period 2010 was 245
and in 2009 only 142; this implies a more than fourfold demand for the

1.4. FURTHER READING

21

Python skill in 2011 as compared to 2009; over the same period the
average daily rate increased from 400 GBP to 475 GBP1
All in all, Python seems to be a good choice for our purposes. And that it
is possible to develop a commercial, full-edged Derivatives Analytics suite
with Python is illustrated by the solution DEXISION of Visixion GmbH. It
is the rst derivatives analytics suite whose core is completely built in this
language.2 The cover story Python Takes a Bite of the March 2010 issue
of Wilmott Magazine (cf. [72]) also illustrates that Python is gaining ground
in the nancial world.

1.4 Further Reading


The book covers a great variety of aspects which comes at the cost of depth
of exposition and analysis. Our aim is to emphasize the red line and to guide
the reader easily through the dierent topics. However, this inevitably leads
to uncovered aspects, omitted proofs and unanswered questions. Fortunately,
a number of good sources in book form is available which may be consulted
on the dierent topics.
market: cf. [11] to learn about options fundamentals, the main microstructure elements of their markets and the specic lingo; [50] is a
concise reference about option and volatility modeling in practice; [88]
is a book that covers comprehensively option markets, their empirical
specialities and the models used in theory and practice
theory: [85] is a comprehensive source for discrete market models; [36]
covers the general arbitrage theory in continuous time and is quite advanced; less advanced, but still comprehensive, treatments of arbitrage
pricing are [12] for continuous processes based on Brownian motion
and [28] for continuous processes with jumps; [100] oers a detailed
discussion of the seminal Black-Scholes-Merton model
numerics: [23] is a book-length treatment of the Fourier-based option
pricing approach; [52] is the standard textbook on Monte Carlo simulation in nancial applications; [14] covers a wide range of numerical
techniques regularly applied in mathematical nance and oers implementation examples in Matlab3
1
2
3

Source: www.itjobswatch.co.uk/contracts/london/python.do on 24. April 2011.


See the Web site www.dexision.com where free trials are available.
Python in combination with NumPy comes quite close to the syntax of Matlab such that
translations are generally straightforward.

22

CHAPTER 1. A QUICK TOUR


implementation: probably the best introduction into Python for the
purposes of this book is the excellent book [78]; this book covers the
main tools and libraries needed for this book, like IPython, NumPy and
pandas, in a detailed fashion and with a wealth of practical examples;
good general introductions to Python from a scientic perspective are
[55] and [71]; [46] introduces into the language with the specic purpose
of building nancial models; [75] is a huge book that covers a great
variety of nancial models and topics and shows how to implement
them in C++; in addition, there is a wealth of Python documentation
available for free in the Internet

Bibliography
[1] Andersen, Torben and Luca Benzoni (2009): Realized Volatility.
in Handbook of Financial Time Series, T. Andersen et al. (ed.), Springer
Verlag, Berlin et al., 555575.

[2] Andersen, Leif, Peter Jackel and Christian Kahl (2010): Simulation of Square-Root Processes. in Encyclopedia of Quantitative Finance, Rama Cont et al. (ed.), John Wiley & Sons, Hoboken, New Jersey.
[3] Andersen, Leif (2008): Simple and Ecient Simulation of the Heston
Stochastic Volatility Model. Journal of Computational Finance, Vol. 11,
No. 3, 142.
[4] Bakshi, Gurdip, Charles Cao and Zhiwu Chen (1997): Empirical Performance of Alternative Option Pricing Models. Journal of
Finance, Vol. 52, No. 5, 20032049.
[5] Bali, Turan and Liuren Wu (2006): A Comprehensive Analysis of
the Short-Term Interest-Rate Dynamics. Journal of Banking & Finance,
Vol. 30, 12691290.
[6] Bates, David (1996): Jumps and Stochastic Volatility: Exchange
Rates Processes Implicit in Deutsche Mark Options. Review of Financial
Studies, Vol. 9, No. 1, 69107.
[7] Baxter, Martin and Andrew Rennie (1996): Financial Calculus
An Introduction to Derivative Pricing. Cambridge University Press, Cambridge.
[8] Black, Fischer and Myron Scholes (1973): The Pricing of Options
and Corporate Liabilities. Journal of Political Economy, Vol. 81, No. 3,
638659.
[9] Bhattacharya, Rabi and Edward Waymire (2007): A Basic Course
in Probability Theory. Springer Verlag, New York.
345

346

BIBLIOGRAPHY

[10] Bittman, James (2009): Trading Options as a Professional. McGrawHill, New York et al.

[11] Bjork, Tomas (2009): An Overview of Interest Rate Theory. in


Handbook of Financial Time Series, T. Andersen et al. (ed.), Springer
Verlag, Berlin et al., 615651.

[12] Bjork, Tomas (2004): Arbitrage Theory in Continuous Time. 2nd ed.,
Oxford University Press, Oxford.
[13] Boyle, Phelim (1977): Options: A Monte Carlo approach. Journal
of Financial Economics, Vol. 4, No. 4, 322338.
[14] Brandimarte, Paolo (2006): Numerical Methods in Finance and Economics. 2nd ed., John Wiley & Sons, Hoboken, New Jersey.
[15] Brigo, Damiano and Fabio Mercurio (2006): Interest Rate
ModelsTheory and Practice. 2nd ed., Springer Verlag, Berlin et al.
[16] Brigo, Damiano and Fabio Mercurio (2001): On DeterministicShift Extensions of Short-Rate Models. Working Paper, Banca IMI, Milano, www.damianobrigo.it.

[17] Broadie, Mark and Ozgur Kaya (2006): Exact Simulation of
Stochastic Volatility and other Ane Jump Diusion Processes. Operations Research, Vol. 54, No. 2, 217231.
[18] Carr, Peter and Dilip Madan (1999): Option Valuation using
the Fast Fourier Transform. Journal of Computational Finance, Vol. 2,
No. 4, 6173.

[19] Cerny, Ale (2004): Introduction to Fast Fourier Transform in Fis
nance. Journal of Derivatives, Vol. 12, No. 1, 73-88.
[20] Cetin, Umut, Robert Jarrow and Philip Protter (2004): Liquidity Risk and Arbitrage Pricing Theory. Finance and Stochastics, Vol.
8, No. 3, 131.
[21] Chaudhury, Mo (2011): Option Bid-Ask Spread and Liquidity.
Working Paper, McGill University, Desautels Faculty of Management,
www.ssrn.com.
[22] Cheng, Peng and Olivier Scaillet (2006): Linear-Quadratic
Jump-Diusion Modeling. Working Paper, Swiss Finance Institute, University of Geneva, Geneva, www.hec.unige.ch.

BIBLIOGRAPHY

347

[23] Cherubini, Umberto, Giovanni Della Lunga, Sabrina Mulinacci and Pietro Rossi (2009): Fourier Transform Methods in Finance. John Wiley & Sons, West Sussex.
[24] Christoffersen, Peter and Kris Jacobs (2004): The Importance of the Loss Function in Option Valuation. Journal of Financial
Economics, Vol. 72, 291318.
[25] Cipra, Barry (2000): The Best of the 20th Century: Editors Name
Top 10 Algorithms. SIAM News, Vol. 33, No. 4, 12.

[26] Clement, Emmanuelle, Damien Lamberton and Philip Protter (2002): An Analysis of a Least Squares Regression Algorithm for
American Option Pricing. Finance and Stochastics , Vol. 17, 448471.
[27] Cont, Rama (2001): Empirical Properties of Asset Returns: Stylized
Facts and Statistical Issues. Quantitative Finance, Vol. 1, 223236.
[28] Cont, Rama and Peter Tankov (2004a): Financial Modelling With
Jump Processes. 2nd ed., CRC Press UK, London.
[29] Cont, Rama and Peter Tankov (2004b): Non-Parametric Calibration of Jump-Diusion Option Pricing Models. Journal of Computational Finance, Vol. 7, No. 3, 149.
[30] Cont, Rama, Peter Tankov and Ekaterina Voltchkova (2007):
Hedging with Options in Models with Jumps. in: Stochastic Analysis
and Applicationsthe Abel Symposium 2005, Springer Verlag, Berlin et
al.

[31] Crepey, Stephane (2008): Tikhonov Regularization. Working Pa


per, Universit dEvry Val dEssonne, Evry Cedex, http://grozny.
e
maths.univ-evry.fr.
[32] Cooley, James and John Tukey (1965): An Algorithm for the
Machine Calculation of Complex Fourier Series. Mathematics of Computation, Vol. 19, No. 90, 297301.
[33] Cox, John, Jonathan Ingersoll and Stephen Ross (1985): A
Theory of the Term Structure of Interest Rates. Econometrica, Vol. 53,
No. 2, 385407.
[34] Cox, John, Stephen Ross and Mark Rubinstein (1979): Option
Pricing: A Simplied Approach. Journal of Financial Economics, Vol.
7, No. 3, 229263.

348

BIBLIOGRAPHY

[35] Dai, Qiang and Kenneth Singleton (2000): Specication Analysis


of Ane Term Structure Models. Journal of Finance, Vol. 55, No.5,
19431978.
[36] Delbaen, Freddy and Walter Schachermayer (2004):
Mathematics of Arbitrage. Springer Verlag, Berlin et al.

The

[37] Delbaen, Freddy and Walter Schachermayer (1998): The Fundamental Theorem of Asset Pricing for Unbounded Stochastic Processes.
Mathematische Annalen, Vol. 312, 215250.
[38] Delbaen, Freddy and Walter Schachermayer (1994): A General Version of the Fundamental Theorem of Asset Pricing. Mathematische Annalen, Vol. 300, 463520.
[39] Detlefsen, Kai (2005): Hedging Exotic Options in Stochastic
Volatility and Jump Diusion Models. Master Thesis, HumboldtUniversity Berlin, Berlin.
[40] de Weert, Frans (2008): Exotic Options Trading. John Wiley &
Sons, Chichester, West Sussex.
[41] Duffie, Darrell, Jun Pan and Kenneth Singleton (2000):
Transform Analysis and Asset Pricing for Ane Jump-Diusions.
Econometrica, Vol. 68, No. 6, 13431376.
[42] Duffie, Darrell and Kenneth Singleton (2003): Credit Risk
Pricing, Measurement and Management. Princeton University Press,
Princeton, New Jersey.
[43] Elliot, Robert and Ekkehard Kopp (2005): Mathematics of Financial Markets. 2nd ed., Springer Verlag, New York.
[44] Fengler, Matthias (2005): Semi-Parametric Modeling of Implied
Volatility. Springer Verlag, Berlin et al.

[45] Filipovic, Damir (2009): Term Structure ModelsA Graduate


Course. Springer Verlag, Dordrecht et al.
[46] Fletcher, Shayner and Christopher Gardener (2009): Financial Modelling in Python. John Wiley & Sons, Chichester, West Sussex.

[47] Frey, Rudiger (2000): Market Illiquidity as a Source of Model Risk


in Dynamic Hedging. in Model Risk: Concepts, Calibration and Pricing,
Rajna Gibson (ed.), 125136, Risk Publications, London.

BIBLIOGRAPHY

349

[48] Fries, Christian (2005): Foresight Bias and Suboptimality Correction in Monte Carlo Pricing of Options with Early Exercise: Classication, Calculation & Removal. Working Paper, www.christian-fries.
de.
[49] Galluccio, Stefano and Yann Le Cam (2008): Implied Calibration and Moments Asymptotics in Stochastic Volatility Jump Diusion
Models. Working Paper, BNPParibas, London, www.ssrn.com.
[50] Gatheral, Jim (2006): The Volatility SurfaceA Practitioners
Guide. John Wiley & Sons, Hoboken, New Jersey.
[51] Gilbert, Charles, K. Ravindran and Robert Reitano (2007):
Results of the Survey on Variable Annuity Hedging Programs for Life
Insurance Companies. Report, Society of Actuaries, www.soa.org.
[52] Glasserman, Paul (2004): Monte Carlo Methods in Financial Engineering. Springer Verlag, New York et al.
[53] Grzelak, Lech, Cornelis Oosterlee and Sacha van Weeren
(2009): Extension of Stochastic Volatility Equity Models with HullWhite Interest Rate Process. Working Paper, Delft University of Technology, Delft, www.ssrn.com.
[54] Haastrecht, Alexander and Antoon Pelsser (2008): Ecient,
Almost Exact Simulation of the Heston Stochastic Volatility Model.
Working Paper, University of Amsterdam, Amsterdam, www.ssrn.com.

[55] Haenel, Valentin, Emmanuelle Gouillart and Gael


Varoquaux (2011):
Python Scientic Lecture Notes. http:
//scipy-lectures.github.com.
[56] Hansen, Lars and Eric Renault (2009): Pricing Kernels and
Stochastic Discount Factors. in: Encyclopedia of Quantitative Finance,
Rama Cont (ed.), John Wiley & Sons, Hoboken, 14181427.
[57] Harrison, Michael and David Kreps (1979): Martingales and Arbitrage in Multiperiod Securities Markets. Journal of Economic Theory,
Vol. 20, 381408.
[58] Harrison, Michael and Stanley Pliska (1981): Martingales and
Stochastic Integrals in the Theory of Continuous Trading. Stochastic
Processes and their Applications, Vol. 11, 215260.

350

BIBLIOGRAPHY

[59] Haugh, Martin and Leonid Kogan (2004): Pricing American Options: A Duality Approach. Operations Research, Vol. 52, No. 2, 258
270.
[60] Heath, David, Robert Jarrow and Andrew Morton (1992):
Bond Pricing and the Term Structure of Interest Rates: A New Methodology for Contingent Claims Valuation. Econometrica, Vol. 60, No. 1,
77105.
[61] Heston, Steven (1993): A Closed-From Solution for Options with
Stochastic Volatility with Applications to Bond and Currency Options.
The Review of Financial Studies, Vol. 6, No. 2, 327343.
[62] Hilpisch, Yves (2001): Dynamic Hedging, Positive Feedback, and
General Equilibrium. Dissertation Thesis, Saarland University, Saarbruecken, www.hilpisch.com.
[63] Hilpisch, Yves (2009): Calibrating Hestons Stochastic Volatility
ModelWith Complete Set of Python Scripts. Working Paper, Visixion
GmbH, Voelklingen, www.visixion.com.
[64] Jarrow, Robert (1999): In Honor of the Nobel Laureates Robert
C. Merton and Myron S. Scholes: A Partial Dierential Equation That
Changed the World. Journal of Economic Perspectives, Vol. 13, No. 4,
229248.
[65] Jarrow, Robert (2005): Liquidity Risk and Classical Option Pricing
Theory. in Mathematical Modeling of Market Liquidity Risk, ed. by P.
Neu and L. Matz, John Wiley & Sons, Singapore.
[66] Kahale, Nabil (2004): An Arbitrage-Free Interpolation of Volatilities. Risk Magazine, Vol. 17, May, 102106.
[67] Kahl, Christian (2007): Modelling and Simulation of Stochastic
Volatility in Finance. Dissertation.com, Boca Raton.

[68] Kloner, Stefan (2010): Grasping Economic Jumps by Sparse


Sampling Using Intradaily Highs and Lows. Working Paper, Saarland
University, Saarbruecken, http://econ.duke.edu/~brossi/NBERNSF/
Klossner.pdf.
[69] Kohler, Michael (2009): A Review on Regression-based Monte
Carlo Methods for Pricing American Options. Working Paper, Technical
University of Darmstadt, Darmstadt, www.mathematik.tu-darmstadt.
de.

BIBLIOGRAPHY

351

[70] Lamberton, Damien and Bernard Lapeyre (1996): Introduction


to Stochastic Calculus Applied to Finance. Chapman & Hall, London et
al.
[71] Langtangen, Hans Petter (2009): A Primer on Scientic Programming with Python. Springer Verlag, Berlin.
[72] Lee, Eileen (2010): Python takes a Bite. WILMOTT Magazine,
Cover Story, March Issue.
[73] Lewis, Alan (2001): A Simple Option Formula for General JumpDiusion and Other Exponential Lvy Processes. Working Paper, Ope
tionCity, www.optioncity.net.
[74] Liberti, Leo (2008): Introduction to Global Optimization. Working

Paper, Ecole Polytechnique, Palaiseau, www.lix.polytechnique.fr.


[75] London, Justin (2005): Modeling Derivatives in C++. John Wiley &
Sons, Hoboken, New Jersey.
[76] Longstaff, Francis and Eduardo Schwartz (2001): Valuing
American Options by Simulation: A Simple Least Squares Approach.
Review of Financial Studies, Vol. 14, No. 1, 113147.
[77] Lord, Roger, Remmert Koekkoek and Dick van Dijk (2006):
A Comparison of Biased Simulation Schemes for Stochastic Volatility
Models. Working Paper, Erasmus University, Rotterdam, www.ssrn.
com.
[78] McKinney, Wes (2012): Python for Data Analysis. OReilly, Beijing
et. al.
[79] Medvedev, Alexey and Olivier Scaillet (2009): Pricing American Options Under Stochastic Volatility and Stochastic Interest Rates.
Working Paper, www.ssrn.com.
[80] Merton, Robert (1976): Option Pricing when the Underlying Stock
Returns are Discontinuous. Journal of Financial Economics, Vol. 3, No.
3, 125144.
[81] Merton, Robert (1973): Theory of Rational Option Pricing. Bell
Journal of Economics and Management Science, Vol. 4, 141183.

352

BIBLIOGRAPHY

[82] Mikhailov, Sergei and Ulrich Nogel (2003): Hestons Stochastic


Volatility ModelImplementation, Calibration and Some Extensions.
WILMOTT Magazine, July, 7479.
[83] Moodley, Nimalin (2005): The Heston Model: A Practical
ApproachWith Matlab Code. Bachelor Thesis, University of the Witwatersrand, Johannesburg, math.nyu.edu.
[84] Nandi, Saikat and Daniel Waggoner (2000): Issues in Hedging
Options Positions. Economic Review, 1st Qu., Federal Reserve Bank of
Atlanta.
[85] Pliska, Stanley (1997): Introduction to Mathematical Finance.
Blackwell Publishers, Malden and Oxford.
[86] Protter, Philip (2005): Stochastic Integration and Dierenatial
Equations. 2nd ed., 3rd printing, Springer Verlag, Berlin et al.
[87] Protter, Philip (2001): A Partial Introduction to Financial Asset
Pricing Theory. Stochastic Processes and their Applications, Vol. 91,
169203.
[88] Rebonato, Riccardo (2004): Volatility and Correlation. 2nd ed.,
Wiley & Sons, West Sussex.
[89] Reinsberg, Rene (2006): Pricing Options on the DAXAn Empirical Investigation. Thesis, WHUOtto Beisheim School of Management,
Vallendar, www.ssrn.com.
[90] Rudin, Walter (1970): Real and Complex Analysis. International Student Edition, McGraw-Hill, London et al.
[91] Schmelzele, Martin (2010): Option Pricing Formulae using
Fourier Transform: Theory and Application. Working Paper, www.
pfadintegral.com.
[92] Schoutens, Wim, Erwin Simons and Jurgen Tistaert (2004): A
Perfect Calibration! Now What? WILLMOT Magazine, March, 6678.
[93] Stentoft, Lars (2004): Least Squares Monte-Carlo and GARCH
Methods for American Options: Theory and Applications. Dissertation
Thesis, University of Aarhus, Denmark, www.samfundsvidenskab.au.
dk.

BIBLIOGRAPHY

353

[94] Svoboda, Simona (2002): An Investigation Of Various Interest Rate


Models and Their Calibration in the South African Market. Dissertation Thesis, University of the Witwatersrand, Johannesburg, http:
//janroman.dhis.org.
[95] Tankov, Peter and Ekaterina Voltchkova (2009): JumpDiusion Models: A Practitioners Guide. Banqu et Marchs, No. 99,
e
e
March-April 2009.
[96] Tsitsiklis, John and Benjamin Van Roy (2001): Regression Methods for Pricing Complex American-Style Options. IEEE Transactions on
Neural Networks, Vol. 12, 694730.
[97] Wallner, Christian and Uwe Wystup (2004): Ecient Computation of Option Price Sensitivities for Options of American Style.
WILMOTT Magazine, November Issue, 211.
[98] Wang, Yang and Russel Calfisch (2010): Pricing and Hedging
American-Style Options: A Simple Simulation-based Approach. Journal
of Computational Finance, Vol. 13, No. 4,95-125 .
[99] Williams, David (1991): Probability with Martingales. Reprint 2001,
Cambridge University Press, Cambridge.
[100] Wilmott, Paul, Sam Howison and Jeff Dewynne (1995): The
Mathematics of Financial Derivatives. Cambridge University Press,
Cambridge.

Index
algebra, 72
algebra generation, 75
American options, 139, 201
Bakshi-Cao-Chen (1997), 282
Black-Scholes-Merton (1973), 146,
290
Cox-Ross-Rubinstein (1979), 142
dual problem, 142
early exercise premium, 282
least-squares algorithm, 203
primal problem, 141
American put option, 146
American short condor spread, 147
approximation, 331
cubic splines, 332
rst order, 290
ordinary least-squares regression
(OLS), 331
regression, 331
second order, 295
arbitrage opportunity
continuous time, 88
discrete time, 81
weak, 81
Arrow-Debreu security, 84
ask quote, 50
at-the-money, 26

Brownian motion, 87
call option, 25
call option transform, 119
characteristic function, 118
Bakshi-Cao-Chen (1997), 184, 252
Black-Scholes-Merton (1973), 249
Heston (1993), 183, 252
Merton (1976), 128, 160
Merton (1976) jump part, 184, 252
contingent claim, 80
attainable, 80
convergence
binomial model, 109
convolution, 130
correlation
historical, 39
instantaneous, 40
correlation risk, 31

DAX index, 45, 243, 339, 340


leverage eect, 48
normality test, 45
realized volatility, 48
volatility clustering, 45
default risk, 31
delta, 103, 289
hedging, 289
discretization
Bachelier model, 87
absorption, 198
bid quote, 50
Bakshi-Cao-Chen (1997), 278
bid/ask spread, 50
Black-Scholes-Merton (1973), 140
bond valuation
exact log Euler scheme, 197
Cox-Ingersoll-Ross (1985), 180, 246
full truncation, 197
Monte Carlo simulation, 192
354

INDEX
Higham-Mao, 198
partial truncation, 197
reection, 197
simple Euler scheme, 197
simple reection, 198
truncation, 197
dynamic hedging, 289, 312
Bakshi-Cao-Chen (1997), 295
Black-Scholes-Merton (1973), 290

355
valuation accuracy, 250
Fourier inversion, 117
Fourier series, 124
Fourier transform, 117
discrete, 129
fundamental theorem of asset pricing
continuous time, 89
discrete time, 82

gains process
continuous time, 86
Euler formulas, 124
discrete time, 79
EURIBOR, 55
gamma, 103
stochasticity, 55
Greeks, 102
term structure, 57
delta, 102
EURO STOXX 50, 161, 243
gamma, 102
European options, 25, 196
rho, 102
Bakshi-Cao-Chen (1997), 253, 281
theta, 102
Black-Scholes-Merton (1973), 98,
vega, 102
99, 249, 323, 336
Cox-Ross-Rubinstein (1979), 324
hedging, 33, 289
Monte Carlo simulation, 184, 329
PDE approach, 181
in-the-money, 26
Python classes, 336
inner value, 25
transform methods, 183
interest rate
exotic instruments, 29
mean reversion, 54
expectation, 74
positivity, 54
conditional, 76
stochasticity, 54
term structure, 55
fat tails, 45
interest rate market, 54
ltration, 74
interest rate risk, 31
forward rates, 245
interpolation, 331
Cox-Ingersoll-Ross (1985), 245
IPython, 22, 313
Fourier approach, 311
Its lemma
o
advantages, 115
Bakshi-Cao-Chen (1997), 185
Bakshi-Cao-Chen (1997), 183, 249
Black-Scholes-Merton, 109
Black-Scholes-Merton (1973), 249
Carr-Madan (1999), 122, 161, 183 jump risk, 31
fast Fourier transform (FFT), 126, jump-diusion model
250, 328
Bates (1996), 176
Merton (1976), 127, 178
Lewis (2001), 119, 120, 161, 183,
249
jumps, 45

356
kurtosis, 39

INDEX

non-uniqueness, 240
uniqueness, 84
Lvy process, 87
e
matplotlib, 313, 320
leverage eect, 45
bars, 322
liquidity risk, 31
dots, 322
lines, 321
market completeness
model calibration, 161, 237, 311
continuous time, 91
DAX call option quotes, 253
discrete time, 84
degeneracy, 253
market incompleteness
equity index component, 249
narrow sense, 238
German Bund yield curve, 246
numerical example, 239
implied volatilities, 256
wider sense, 238
indeterminacy, 253
market microstructure, 50
market data, 243
market model
market incompleteness, 238
Bakshi-Cao-Chen (1997), 176, 249,
mean squared error (MSE), 242
252, 277
numerical results, 254
Bates (1996), 176, 178
objective function, 241
binomial model, 106, 324
optimization algorithm, 244
Black-Scholes-Merton (1973), 96,
role of model components, 240
140, 178, 323
short rate component, 244
complete, 95
Tikhonov regularization, 254
continuous time, 85, 89, 140, 159, model risk, 33
176
Monte Carlo simulation, 277, 311, 341
Cox-Ingersoll-Ross (1985), 176, 192,
accuracy vs. speed, 208
201, 244
algorithm features, 205
Cox-Ross-Rubinstein (1979), 106,
Bakshi-Cao-Chen (1997), 277, 295
324
Black-Scholes-Merton (1973), 290,
discrete time, 77, 79, 324
329
Heston (1993), 178, 196, 201, 252
dual algorithm, 145
Merton (1976), 159, 178, 252
Heston (1993), 197
requirements, 57
least-squares algorithm, 139, 143,
market realities, 17, 21
201, 205, 282, 290, 311
market risks, 311
Merton (1976), 162
market-based valuation, 17, 30, 159,
recipe, 184
166
square-root diusion, 192
American options, 282
variance reduction, 199, 201, 278
European options, 281
process, 34
no arbitrage condition (NA), 88
martingale, 76
no free lunches with vanishing risk
condition (NFLVR), 88
martingale measure, 76

INDEX
numerical integration, 335
numerical methods, 18, 21
NumPy, 22, 313
arange, 319
array operations, 318
arrays, 317
iterations, 327
loops, 327
polyt, 332
polyval, 332
random, 320
objective function
degeneracy, 253
indeterminacy, 253
mean squared error (MSE), 242
operational risk, 33
optimization
brute force algorithm, 162
global, 162, 244, 334
local, 162, 244, 334
simplex algorithm, 162
option denition, 25
option markets, 50
option price
moneyness, 101
short rate, 101
time-to-maturity, 101
volatility, 102
option quote spread, 50
option value factors, 27
out-of-the-money, 27
pandas, 22, 313, 341
data storage, 341
DataFrame, 340
Excel spreadsheets, 340
nancial data gathering, 341
plotting, 340, 343
Parsevals relation, 118
partial dierential equation

357
Bakshi-Cao-Chen (1997), 181
Black-Scholes-Merton (1973), 98
portfolio, 78
value, 78
predictability, 78
price risk, 31
price system
linear, 81
probability measure, 73
probability space, 73
ltered, 74
PyTables, 198, 313
Python, 313
arrays, 317
class, 336
class attributes, 336
class methods, 336
data, 337
dynamic typing, 315
Excel spreadsheets, 338
function denition, 316
integrated development environment (IDE), 314
iterations, 326
loops, 326
math, 316
module, 317
object, 336
random numbers, 320
range, 319
string replacement, 319
xlrd, 313
xlwt, 313
Python programming language, 20
Python(x,y), 314
qualitative model features, 30
quantitative model features, 30
Radon-Nikodym derivative, 77
random variable, 73

358

INDEX

Tikhonov regularization, 254


rapid nancial engineering, 341
trading strategy, 79
rho, 106
admissible, 79, 87
risk-neutral valuation, 71
self-nancing, 79, 88
continuous time, 85, 117
simple predicable, 85
Cox-Ross-Rubinstein (1979), 107,
325
uncertainty
discrete time, 82
continuous time, 85
root of unity, 128
discrete time, 72
SciPy, 313
valuation speed, 328
brute, 334
valuation theory, 17, 21, 71
fmin, 334
value process, 79
integrate, 335
vanilla instruments, 29
interpolate, 332
variance reduction, 278
optimize, 334
antithetic paths, 199, 278
quad, 335
control variates, 201
semimartingale, 86
importance sampling, 278
total, 86
moment matching, 199, 278
short rate, 54
vega, 106
skewness, 39
volatility
square-root diusion, 192
clustering, 44
Euler discretization, 193
historical, 38
Euler schemes, 197
implied, 38, 256
exact discretization, 192
instantaneous, 38
short rate process, 176, 201, 245
leverage eect, 45
variance process, 196, 201
mean reversion, 44
state price, 84
stochastic, 44
stochastic dierential equation
volatility risk, 31
Bakshi-Cao-Chen (1997), 176
Black-Scholes-Merton (1973), 96
Cox-Ingersoll-Ross (1985), 192
Merton (1976), 159
stochastic process, 75
decomposable, 86
stochastic volatility model
Bates (1996), 176, 178
Heston (1993), 178, 196, 201
stopping time, 75
super-replication, 81
technology, 18, 22

You might also like