info@ifc.ir   021-66724545
  پارسی   English   العربیه

How to Implement Market Models Using VBA

توضیحات

Praise for How to Implement Market Models Using VBA

"This well-written book proposes a wide instructional use of Visual Basic in order to learn computational finance in more detail by covering issues and techniques useful for quant/trading jobs in investment companies.

All readers, students or financial engineers, will find much to improve their thinking of VBA when applied to finance thanks to the important resource of examples. I strongly recommend this new book to accompany each step toward successful programming."
—Sofiane Aboura Professor of finance, University of Paris Dauphine

"This book offers the reader a unique opportunity to obtain both introductory and advanced knowledge in Finance with direct implementations in VBA. It starts with a survival kit for VBA newcomers and covers classical techniques usually studied in MSc Finance programs. However, it also presents more sophisticated approaches to these topics (among others, the HJM and Heston models), qualifying the book for both professionals and advanced students in quantitative/computational Finance.

As such I would recommend this book to my students attending the Master 'Financial and Risk Engineering' or under my supervision in a PhD program, as well as to everyone willing to update or upgrade his knowledge in VBA for implementing market models in a professional environment."
—Olivier Brandouy Professor of finance, University of Bordeaux and IAE/Paris Sorbonne

"As financial markets have reached maturity and volumes of products have dramatically increased, the emphasis of financial research has shifted from model development to model implementation. Nowadays it is paramount to use models optimally in aspects such as development costs, transparency, controllability, etc. Their implementation is therefore as important as their all-encompassing-ness, which explains why VBA has become a tool of choice to test models and valuation tools.

How to Implement Market Models Using VBA proposes a rare junction between instruments types, asset classes, models and implementation techniques - presenting its material in a clear and educational manner.

It is a positive addition to an often fragmented and specialised literature. This book will be of great use in the hands of graduate students as well as on the desk of practitioners."
—Dr. Vincent Gesser, CEO Kleber consulting Ltd

"This book tackles a wide range of technical issues arising from the implementation of popular market models in a remarkably practical manner. The author clearly does a lot to comprehensively expose the rationale under lying pricing formulae and illustrate them with an easy to learn programming language. Practitioners wishing to strengthen their quantitative insight as well as students in finance should make the best from this book."
—Yassine Makrini, quantitative analyst, J.P. Morgan


FRANÇOIS GOOSSENS has 12 years' experience of programming pricing algorithms in Java and VBA. As a consultant, he currently trains students and young practitioners in computational finance through VBA coding.

Prior to that, over a 15 year period he ran interest-rates and equity related trading desks with Credit Lyonnais and Ixis whilst strongly involved in exotic derivatives' management. François graduated from Ecole Centrale in Paris.

Preface ix

Acknowledgements xi

Abbreviations xiii

About the Author xv

CHAPTER 1 The Basics of VBA Programming 1

1.1 Getting started 1

1.2 VBA objects and syntax 2

1.2.1 The object-oriented basic syntax 3

1.2.2 Using objects 3

1.3 Variables 5

1.3.1 Variable declaration 5

1.3.2 Some usual objects 7

1.3.3 Arrays 9

1.4 Arithmetic 10

1.5 Subroutines and functions 13

1.5.1 Subroutines 14

1.5.2 Functions 15

1.5.3 Operations on one-dimensional arrays 16

1.5.4 Operations on two-dimensional arrays (matrices) 16

1.5.5 Operations with dates 19

1.6 Custom objects 21

1.6.1 Types 21

1.6.2 Classes 22

1.7 Debugging 24

1.7.1 Error handling 24

1.7.2 Tracking the code execution 25

CHAPTER 2 Mathematical Algorithms 29

2.1 Introduction 29

2.2 Sorting lists 29

2.2.1 Shell sort 29

2.2.2 Quick sort 32

2.3 Implicit equations 34

2.4 Search for extrema 36

2.4.1 The Nelder-Mead algorithm 36

2.4.2 The simulated annealing 40

2.5 Linear algebra 43

2.5.1 Matrix inversion 44

2.5.2 Cholesky decomposition 46

2.5.3 Interpolation 48

2.5.4 Integration 57

2.5.5 Principal Component Analysis 60

CHAPTER 3 Vanilla Instruments 67

3.1 Definitions 67

3.2 Fixed income 67

3.2.1 Bond market 68

3.2.2 Interbank market 72

3.3 Vanilla derivatives 75

3.3.1 Forward contracts 75

3.3.2 Swaps 77

3.3.3 Bond futures 81

3.4 Options basics 84

3.4.1 Brownian motion 84

3.4.2 Ito integral 85

3.4.3 Ito formula 86

3.4.4 Black-Scholes basic model 89

3.4.5 Risk-neutral probability 90

3.4.6 Change of probability 90

3.4.7 Martingale and numeraires 92

3.4.8 European-style options pricing 94

3.5 First generation exotic options 95

3.5.1 Barrier options 95

3.5.2 Quanto options 102

CHAPTER 4 Numerical Solutions 105

4.1 Finite differences 105

4.1.1 Generic equation 105

4.1.2 Implementation 106

4.2 Trees 112

4.2.1 Binomial trees 112

4.2.2 Trinomial trees 116

4.3 Monte-Carlo scenarios 116

4.3.1 Uniform number generator 117

4.3.2 From uniform to Gaussian numbers 127

4.4 Simulation and regression 129

4.5 Double-barrier analytical approximation 134

CHAPTER 5 Monte-Carlo Pricing Issues 139

5.1 Multi-asset simulation 139

5.1.1 The correlations issue 139

5.1.2 The Gaussian case 139

5.1.3 Exotics 143

5.2 Discretization schemes 146

5.3 Variance reduction techniques 147

5.3.1 Antithetic variates 147

5.3.2 Importance sampling 148

5.3.3 Control variates 153

CHAPTER 6 Yield Curve Models 163

6.1 Short rate models 163

6.1.1 Introduction 163

6.1.2 Hull and White one-factor model 164

6.1.3 Gaussian two-factor model 180

6.1.4 Hull and White two-factor model 203

6.2 Forward rate models 204

6.2.1 Generic Heath-Jarrow-Morton 205

6.2.2 LMM (LIBOR market model) 216

CHAPTER 7 Stochastic Volatilities 233

7.1 The Heston model 234

7.1.1 Code 234

7.1.2 A faster algorithm 239

7.1.3 Calibration 248

7.2 Barrier options 254

7.2.1 Numerical results 257

7.2.2 Code 257

7.3 Asian-style options 260

7.4 SABR model 264

7.4.1 Caplets 264

7.4.2 Code 265

CHAPTER 8 Interest Rate Exotics 267

8.1 CMS swaps 267

8.1.1 Code 269

8.2 Cancelable swaps 272

8.2.1 Code 272

8.2.2 Tree approximation 276

8.3 Target redemption note 281

8.3.1 Code 282

Bibliography 287

Index 289