Wiley
Wiley.com
Print this page Share

Financial Modelling: Theory, Implementation and Practice with MATLAB Source

ISBN: 978-0-470-74489-5
734 pages
March 2013
Financial Modelling: Theory, Implementation and Practice with MATLAB Source (0470744898) cover image

Financial Modelling - Theory, Implementation and Practice is a unique combination of quantitative techniques, the application to financial problems and programming using Matlab. The book enables the reader to model, design and implement a wide range of financial models for derivatives pricing and asset allocation, providing practitioners with complete financial modelling workflow, from model choice, deriving  prices and Greeks using (semi-) analytic and simulation techniques, and calibration even for exotic options.

The book is split into three parts. The first part considers financial markets in general and looks at the complex models needed to handle observed structures, reviewing models based on diffusions including stochastic-local volatility models and (pure) jump processes. It shows the possible risk neutral densities, implied volatility surfaces, option pricing and typical paths for a variety of models including SABR, Heston, Bates, Bates-Hull-White, Displaced-Heston, or stochastic volatility versions of Variance Gamma, respectively Normal Inverse Gaussian models and finally, multi-dimensional models. The stochastic-local-volatility Libor market model with time-dependent parameters is considered and as an application how to price and risk-manage CMS spread products is demonstrated.

The second part of the book deals with numerical methods which enables the reader to use the models of the first part for pricing and risk management, covering methods based on direct integration and Fourier transforms, and detailing the implementation of the COS, CONV, Carr-Madan method or Fourier-Space-Time Stepping. This is applied to pricing of European, Bermudan and exotic options as well as the calculation of the Greeks. The Monte Carlo simulation technique is outlined and bridge sampling is discussed in a Gaussian setting and for Lévy processes. Computation of Greeks is covered using likelihood ratio methods and adjoint techniques. A chapter on state-of-the-art optimization algorithms rounds up the toolkit for applying advanced mathematical models to financial problems and the last chapter in this section of the book also serves as an introduction to model risk. 

The third part is devoted to the usage of Matlab, introducing the software package by describing the basic functions applied for financial engineering. The programming is approached from an object-oriented perspective with examples to propose a framework for calibration, hedging and the adjoint method for calculating Greeks in a Libor Market model.

Source code used for producing the results and analysing the models is provided on the author’s dedicated website, http://www.mathworks.de/matlabcentral/fileexchange/authors/246981

See More

Introduction 1

1 Introduction and Management Summary 1

2 Why We Have Written this Book 2

3 Why You Should Read this Book 3

4 The Audience 3

5 The Structure of this Book 4

6 What this Book Does Not Cover 5

7 Credits 6

8 Code 6

PART I FINANCIAL MARKETS AND POPULAR MODELS

1 Financial Markets – Data, Basics and Derivatives 9

1.1 Introduction and Objectives 9

1.2 Financial Time-Series, Statistical Properties of Market Data and Invariants 10

1.2.1 Real World Distribution 15

1.3 Implied Volatility Surfaces and Volatility Dynamics 17

1.3.1 Is There More than just a Volatility? 19

1.3.2 Implied Volatility 22

1.3.3 Time-Dependent Volatility 22

1.3.4 Stochastic Volatility 23

1.3.5 Volatility from Jumps 23

1.3.6 Traders’ Rule of Thumb 24

1.3.7 The Risk Neutral Density 24

1.4 Applications 26

1.4.1 Asset Allocation 26

1.4.2 Pricing, Hedging and Risk Management 27

1.5 General Remarks on Notation 30

1.6 Summary and Conclusions 31

1.7 Appendix – Quotes 32

2 Diffusion Models 35

2.1 Introduction and Objectives 35

2.2 Local Volatility Models 35

2.2.1 The Bachelier and the Black–Scholes Model 37

2.2.2 The Hull–White Model 40

2.2.3 The Constant Elasticity of Variance Model 46

2.2.4 The Displaced Diffusion Model 50

2.2.5 CEV and DD Models 53

2.3 Stochastic Volatility Models 54

2.3.1 Pricing European Options 55

2.3.2 Risk Neutral Density 56

2.3.3 The Heston Model (and Extensions) 57

2.3.4 The SABR Model 67

2.3.5 SABR – Further Remarks 73

2.4 Stochastic Volatility and Stochastic Rates Models 81

2.4.1 The Heston–Hull–White Model 81

2.5 Summary and Conclusions 90

3 Models with Jumps 93

3.1 Introduction and Objectives 93

3.2 Poisson Processes and Jump Diffusions 94

3.2.1 Poisson Processes 94

3.2.2 The Merton Model 95

3.2.3 The Bates Model 99

3.2.4 The Bates–Hull–White Model 104

3.3 Exponential L´evy Models 105

3.3.1 The Variance Gamma Model 107

3.3.2 The Normal Inverse Gaussian Model 112

3.4 Other Models 118

3.4.1 Exponential L´evy Models with Stochastic Volatility 122

3.4.2 Stochastic Clocks 122

3.5 Martingale Correction 129

3.6 Summary and Conclusions 134

4 Multi-Dimensional Models 137

4.1 Introduction and Objectives 137

4.2 Multi-Dimensional Diffusions 137

4.2.1 GBM Baskets 137

4.2.2 Libor Market Models 139

4.3 Multi-Dimensional Heston and SABR Models 141

4.3.1 Stochastic Volatility Models 141

4.4 Parameter Averaging 143

4.4.1 Applications to CMS Spread Options 144

4.5 Markovian Projection 159

4.5.1 Baskets with Local Volatility 162

4.5.2 Markovian Projection on Local Volatility and Heston Models 162

4.5.3 Markovian Projection onto DD SABR Models 164

4.6 Copulae 172

4.6.1 Measures of Concordance and Dependency 174

4.6.2 Examples 175

4.6.3 Elliptical Copulae 175

4.6.4 Archimedean Copulae 177

4.6.5 Building New Copulae from Given Copulae 179

4.6.6 Asymmetric Copulae 179

4.6.7 Applying Copulae to Option Pricing 180

4.6.8 Applying Copulae to Asset Allocation 180

4.7 Multi-Dimensional Variance Gamma Processes 187

4.8 Summary and Conclusions 193

PART II NUMERICAL METHODS AND RECIPES

5 Option Pricing by Transform Techniques and Direct Integration 197

5.1 Introduction and Objectives 197

5.2 Fourier Transform 197

5.2.1 Discrete Fourier Transform 199

5.2.2 Fast Fourier Transform 200

5.3 The Carr–Madan Method 202

5.3.1 The Optimal α 207

5.4 The Lewis Method 210

5.4.1 Application to Other Payoffs 214

5.5 The Attari Method 215

5.6 The Convolution Method 216

5.7 The Cosine Method 220

5.8 Comparison, Stability and Performance 228

5.8.1 Other Issues 233

5.9 Extending the Methods to Forward Start Options 235

5.9.1 Forward Characteristic Function for L´evy Processes and CIR

Time Change 238

5.9.2 Forward Characteristic Function for L´evy Processes and Gamma-OU

Time Change 239

5.9.3 Results 242

5.10 Density Recovery 245

5.11 Summary and Conclusions 250

6 Advanced Topics Using Transform Techniques 253

6.1 Introduction and Objectives 253

6.2 Pricing Non-Standard Vanilla Options 253

6.2.1 FFT with Lewis Method 254

6.3 Bermudan and American Options 254

6.3.1 The Convolution Method 257

6.3.2 The Cosine Method 258

6.3.3 Numerical Results 266

6.3.4 The Fourier Space Time-Stepping 270

6.4 The Cosine Method and Barrier Options 277

6.5 Greeks 278

6.6 Summary and Conclusions 287

7 Monte Carlo Simulation and Applications 289

7.1 Introduction and Objectives 289

7.2 Sampling Diffusion Processes 289

7.2.1 The Exact Scheme 290

7.2.2 The Euler Scheme 290

7.2.3 The Predictor-Corrector Scheme 290

7.2.4 The Milstein Scheme 291

7.2.5 Implementation and Results 291

7.3 Special Purpose Schemes 292

7.3.1 Schemes for the Heston Model 294

7.3.2 Unbiased Scheme for the SABR Model 300

7.4 Adding Jumps 313

7.4.1 Jump Models – Poisson Processes 313

7.4.2 Fixed Grid Sampling (FGS) 315

7.4.3 Stochastic Grid Sampling (SGS) 315

7.4.4 Simulation – L´evy Models 322

7.4.5 Schemes for L´evy Models with Stochastic Volatility 330

7.5 Bridge Sampling 339

7.6 Libor Market Model 346

7.7 Multi-Dimensional L´evy Models 351

7.8 Copulae 352

7.8.1 Distributional Sampling Approach (DSA) 353

7.8.2 Conditional Sampling Approach (CSA) 356

7.8.3 Simulation from Other Copulae 358

7.9 Summary and Conclusions 359

8 Monte Carlo Simulation – Advanced Issues 361

8.1 Introduction and Objectives 361

8.2 Monte Carlo and Early Exercise 361

8.2.1 Longstaff–Schwarz Regression 362

8.2.2 Policy Iteration Methods 369

8.2.3 Upper Bounds 374

8.2.4 Problems of the Method 376

8.2.5 Financial Examples and Numerical Results 378

8.3 Greeks with Monte Carlo 382

8.3.1 The Finite Difference Method (FDM) 383

8.3.2 The Pathwise Method 385

8.3.3 The Affine Recursion Problem (ARP) 389

8.3.4 Adjoint Method 391

8.3.5 Bermudan ARPs 393

8.4 Euler Schemes and General Greeks 396

8.4.1 SDE of Diffusions 396

8.4.2 Approximation by Euler Schemes 397

8.4.3 Approximating General Greeks Using ARP 397

8.4.4 Greeks 404

8.5 Application to Trigger Swap 407

8.5.1 Mathematical Modelling 408

8.5.2 Numerical Results 410

8.5.3 The Likelihood Ratio Method (LRM) 413

8.5.4 Likelihood Ratio for Finite Differences – Proxy Simulation 416

8.5.5 Numerical Results 419

8.6 Summary and Conclusions 433

8.7 Appendix – Trees 434

9 Calibration and Optimization 435

9.1 Introduction and Objectives 435

9.2 The Nelder–Mead Method 437

9.2.1 Implementation 442

9.2.2 Calibration Examples 444

9.3 The Levenberg–Marquardt Method 449

9.3.1 Implementation 453

9.3.2 Calibration Examples 455

9.4 The L-BFGS Method 460

9.4.1 Implementation 463

9.4.2 Calibration Examples 464

9.5 The SQP Method 468

9.5.1 The Modified and Globally Convergent SQP Iteration 473

9.5.2 Implementation 475

9.5.3 Calibration Examples 477

9.6 Differential Evolution 482

9.6.1 Implementation 487

9.6.2 Calibration Examples 488

9.7 Simulated Annealing 493

9.7.1 Implementation 497

9.7.2 Calibration Examples 500

9.8 Summary and Conclusions 505

10 Model Risk – Calibration, Pricing and Hedging 507

10.1 Introduction and Objectives 507

10.2 Calibration 508

10.2.1 Similarities – Heston and Bates Models 508

10.2.2 Parameter Stability 511

10.3 Pricing Exotic Options 521

10.3.1 Exotic Options and Different Models 528

10.4 Hedging 528

10.4.1 Hedging – The Basics 531

10.4.2 Hedging in Incomplete Markets 533

10.4.3 Discrete Time Hedging 541

10.4.4 Numerical Examples 544

10.5 Summary and Conclusions 550

PART III IMPLEMENTATION, SOFTWARE DESIGN AND MATHEMATICS

11 Matlab – Basics 553

11.1 Introduction and Objectives 553

11.2 General Remarks 553

11.3 Matrices, Vectors and Cell Arrays 556

11.3.1 Matrices and Vectors 556

11.3.2 Cell Arrays 562

11.4 Functions and Function Handles 564

11.4.1 Functions 564

11.4.2 Function Handles 567

11.5 Toolboxes 570

11.5.1 Financial 570

11.5.2 Financial Derivatives 571

11.5.3 Fixed-Income 571

11.5.4 Optimization 573

11.5.5 Global Optimization 577

11.5.6 Statistics 578

11.5.7 Portfolio Optimization 581

11.6 Useful Functions and Methods 589

11.6.1 FFT 589

11.6.2 Solving Equations and ODE 589

11.6.3 Useful Functions 591

11.7 Plotting 593

11.7.1 Two-Dimensional Plots 593

11.7.2 Three-Dimensional Plots – Surfaces 595

11.8 Summary and Conclusions 597

12 Matlab – Object Oriented Development 599

12.1 Introduction and Objectives 599

12.2 The Matlab OO Model 599

12.2.1 Classes 599

12.2.2 Handling Classes in Matlab 606

12.2.3 Inheritance, Base Classes and Superclasses 607

12.2.4 Handle and Value Classes 609

12.2.5 Overloading 610

12.3 A Model Class Hierarchy 611

12.4 A Pricer Class Hierarchy 613

12.5 An Optimizer Class Hierarchy 618

12.6 Design Patterns 620

12.6.1 The Builder Pattern 621

12.6.2 The Visitor Pattern 624

12.6.3 The Strategy Pattern 626

12.7 Example – Calibration Engine 629

12.7.1 Calibrating a Data Set or a History 631

12.8 Example – The Libor Market Model and Greeks 634

12.8.1 An Abstract Class for LMM Derivatives 634

12.8.2 A Class for Bermudan Swaptions 637

12.8.3 A Class for Trigger Swaps 639

12.9 Summary and Conclusions 641

13 Math Fundamentals 643

13.1 Introduction and Objectives 643

13.2 Probability Theory and Stochastic Processes 643

13.2.1 Probability Spaces 644

13.2.2 Random Variables 644

13.2.3 Important Results 645

13.2.4 Distributions 649

13.2.5 Stochastic Processes 654

13.2.6 L´evy Processes 655

13.2.7 Stochastic Differential Equations 660

13.3 Numerical Methods for Stochastic Processes 665

13.3.1 Random Number Generation 665

13.3.2 Methods for Computing Variates 670

13.4 Basics on Complex Analysis 671

13.4.1 Complex Numbers 671

13.4.2 Complex Differentiation and Integration along Paths 672

13.4.3 The Complex Exponential and Logarithm 673

13.4.4 The Residual Theorem 674

13.5 The Characteristic Function and Fourier Transform 675

13.6 Summary and Conclusions 679

List of Figures 681

List of Tables 691

Bibliography 695

Index 705

See More

Jörg Kienitz is head of Quantitative Analytics at Deutsche Postbank AG. He is primarily involved in developing and implementing models for pricing complex derivatives structures and for asset allocation. He also lectures at university level on advanced financial modelling and implementation including the University of Oxford’s part-time Masters of Finance course. Jörg works as an independent consultant for model development and validation as well as giving seminars for finance professionals. He is a speaker at the major financial conferences including Global Derivatives, WBS Fixed Income or RISK. Jörg is the member of the editorial board of International Review of Applied Financial Issues and Economics and holds a Ph.D. in stochastic analysis from the University of Bielefeld.

Daniel Wetterau is senior specialist in the Quantitative Analytics team of Deutsche Postbank AG. He is responsible for the implementation of term structure models, advanced numerical methods, optimization algorithms and methods for advanced quantitative asset allocation. Further to his work he teaches finance courses for market professionals. Daniel received a Masters in financial mathematics from the University of Wuppertal and was awarded the Barmenia mathematics award for his thesis.

See More
Download TitleSizeDownload
Errata 235.04 KB Click to Download
See More
Back to Top