C++ Design Patterns and Derivatives Pricing (Mathematics, Finance and Risk)

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

This book introduces several design patterns using finance as an example. The book is pretty thin for a $50 book, and can be read in under a week easily. I would recommend this book to MS/PHD students who want to become quants, but did not read the GoF book yet. Overall, the book is not too bad, if you are willing to spend $50 on it(library?). The author delivers books like hot buns, which does not look good to me. Quality beats Quantity. Pros: + the code is clean and easy to read + covers Monte Carlo and Trees, also Excel briefly + the explanations are clear + the material progresses from easy to hard nicely Cons: - high price - source code is not readily available, you would have to download it from different sources, and it will differ from the book, no makefiles - no big projects for the reader - PDE & interest rate models are not covered at all - no discussion of greeks for some reason - some important patterns are not covered - no errata

Author(s): M. S. Joshi
Series: Mathematics, Finance and Risk
Edition: 2
Publisher: Cambridge University Press
Year: 2008

Language: English
Pages: 310

Contents......Page 9
Preface......Page 15
Acknowledgements......Page 18
1.2 The theory......Page 19
1.3 A simple implementation of a Monte Carlo call option pricer......Page 20
1.4 Critiquing the simple Monte Carlo routine......Page 25
1.5 Identifying the classes......Page 27
1.6 What will the classes buy us?......Page 28
1.8 Key points......Page 29
1.9 Exercises......Page 30
2.1 Implementing the pay-off class......Page 31
2.2 Privacy......Page 33
2.3 Using the pay-off class......Page 34
2.4 Further extensibility defects......Page 37
2.5 The open–closed principle......Page 38
2.6 Key points......Page 39
2.7 Exercises......Page 40
3.1‘is a’......Page 41
3.3 Virtual functions......Page 42
3.4 Why we must pass the inherited object by reference......Page 47
3.5 Not knowing the type and virtual destruction......Page 48
3.6 Adding extra pay-offs without changing files......Page 52
3.8 Exercises......Page 55
4.1 The problem......Page 56
4.2 Afirst solution......Page 57
4.3 Virtual construction......Page 61
4.4 The rule of three......Page 69
4.5 The bridge......Page 71
4.6 Beware of new......Page 75
4.7 A parameters class......Page 76
4.9 Exercises......Page 83
5.2 Designing a statistics gatherer......Page 84
5.3 Using the statistics gatherer......Page 87
5.4 Templates and wrappers......Page 91
5.5 A convergence table......Page 95
5.6 Decoration......Page 98
5.8 Exercises......Page 99
6.1 Why?......Page 101
6.2 Design considerations......Page 102
6.3 The base class......Page 104
6.4 A linear congruential generator and the adapter pattern......Page 106
6.5 Anti-thetic sampling via decoration......Page 111
6.6 Using the random number generator class......Page 115
6.8 Exercises......Page 120
7.1 Introduction......Page 121
7.2 Identifying components......Page 122
7.3 Communication between the components......Page 123
7.4 The base classes......Page 124
7.5 A Black–Scholes path generation engine......Page 129
7.6 An arithmetic Asian option......Page 133
7.7 Putting it all together......Page 135
7.9 Exercises......Page 138
8.1 Introduction......Page 139
8.2 The design......Page 141
8.3 The TreeProduct class......Page 143
8.4 A tree class......Page 147
8.5 Pricing on the tree......Page 153
8.7 Exercises......Page 157
9.1 The problem......Page 159
9.2 Function objects......Page 160
9.3 Bisecting with a template......Page 163
9.4 Newton–Raphson and function template arguments......Page 167
9.5 Using Newton–Raphson to do implied volatilities......Page 169
9.6 The pros and cons of templatization......Page 172
9.8 Exercises......Page 174
10.2 The basic idea......Page 175
10.3 The singleton pattern......Page 176
10.4 Coding the factory......Page 177
10.5 Automatic registration......Page 180
10.6 Using the factory......Page 183
10.7 Key points......Page 184
10.8 Exercises......Page 185
11.2.1 Virtual copy constructor......Page 186
11.3 Structural patterns......Page 187
11.4.1 Strategy......Page 188
11.5 Why design patterns?......Page 189
11.7 Key points......Page 190
11.8 Exercise......Page 191
12.2 Compilers and the standard library......Page 192
12.3 Boost......Page 194
12.5 xlw......Page 195
12.7 Exercises......Page 196
13.1 Introduction......Page 197
13.3 The use of smart pointers......Page 198
13.4 The rule of almost zero......Page 201
13.5 Commands to never use......Page 202
13.6 Making the wrapper class exception safe......Page 203
13.7 Throwing in special functions......Page 204
13.8 Floating point exceptions......Page 205
13.9 Key points......Page 210
14.2 Using inheritance to add structure......Page 215
14.3 The curiously recurring template pattern......Page 217
14.4 Using argument lists......Page 218
14.5 The private part of the ArgumentList class......Page 224
14.6 The implementation of the ArgumentList......Page 226
14.7 Cell matrices......Page 238
14.8 Cells and the ArgumentList......Page 242
14.9 The template factory......Page 250
14.10 Using the templatized factory......Page 255
14.11 Key points......Page 260
14.12 Exercises......Page 261
15.1 Introduction......Page 262
15.2 Usage......Page 263
15.3 Basic data types......Page 265
15.4 Extended data types......Page 266
15.6 The interfacefile......Page 268
15.7 The interface generator......Page 271
15.9 Debugging with xlls......Page 272
15.11 Exercises......Page 273
16.2 Headerfiles......Page 274
16.3 Splittingfiles......Page 277
16.4 Direction of informationflow and levelization......Page 278
16.6 inlining......Page 280
16.7 Template code......Page 281
16.9 Pimpls......Page 282
16.11 Exercises......Page 283
A Black–Scholes formulas......Page 284
B Distribution functions......Page 288
C.1 Choosing an array class......Page 292
C.2 The headerfile......Page 293
C.3 The source code......Page 296
D.3 License......Page 303
Glossary......Page 304
Bibliography......Page 305
Index......Page 307