Design Patterns and Derivatives Pricing

This is the homepage for my book which was published June 8th 2004 by Cambridge University Press. Here is the cover blurb:

Design patterns are the cutting-edge paradigm for programming in object-oriented languages. Here they are discussed, for the first time in a book, in the context of implementing financial models in C++. Assuming only a basic knowledge of C++ and mathematical finance, the reader is taught how to produce well-designed, structured, re-usable code via concrete examples. Each example is treated in depth, with the whys and wherefores of the chosen method of solution critically examined. Part of the book is devoted to designing re-usable components that are then put together to build a Monte Carlo pricer for path-dependent exotic options. Advanced topics treated include the factory pattern, the singleton pattern and the decorator pattern. Complete ANSI/ISO-compatible C++ source code is included on a CD for the reader to study and re-use and so develop the skills needed to implement financial models with object-oriented programs and become a working financial engineer.

 


I have now created a bulletin board to make it easy for readers to ask questions and discuss details in the book.



The original CD was highly defective -- the publishers appear to have messed up the files in several ways rendering the code unusable. My apologies if this is causing you trouble. Here is a copy of the code that should work. This problem was fixed on all new copies from September 2004.

The code was originally tested under Mingw 2.95, Visual C++ 6.0 and  Borland 5.5. It should therefore work under most compilers. If you are having trouble with another compiler please let me know and I will do my best to help. Even better if you had trouble with another compiler and managed to fix the problem, please let me know. I have also tested under MingW 3.2 and Visual C++ 8.0.

I have also heard from others that it works on Visual Studio .Net 2002, 2003 and Orcas.

If you have tried the code on another compiler please let me know.


Get up to date UK price comparison from bublos.

Get up to date US price comparison from bublos.

Buy from amazon.co.uk
Buy from amazon.com


Reviews

"This book is thought-provoking and rewarding. Even for the less experienced programmer, the presentation is readily accessible, and the coded examples can be directly used to solve real-life problems." Journal of the American Statistics Association, Ana-Maria Matache


'This is a short book, but an elegant one. It would serve as an excellent course text for a course on the practical aspects of mathematical finance.' International Statistical Institute


"It is good for anyone who knows C++ language but does not have object-oriented programming experience. He also integrates finance into the codes very well. After reading his book, future quants will know why C++ programming is so important such days and how one can do in real life. "

Strongly recommended by quantfinancejob.com


"Joshi does not intend to teach financial mathematics in this text. To learn about this topic, you can read his other book "The Concepts and Practice of Mathematical Finance". Joshi also doesn't try to provide an introduction to C++ programming -- there are plenty of good books on this topic.

Instead, the author does an excellent job of demonstrating how common C++ design patterns (templates, wrappers, decorators, bridges, factories, and so on) can be applied to price financial derivative instruments.

The book develops reusable components that are subsequently combined in a simple Monte Carlo framework, capable of pricing certain path-dependent European options. Another section uses Binomial Trees to tackle the early exercise challenges presented by American options.

The aim of the book is to allow the reader to develop an intuition for using the design tools rather than to provide an exhaustive framework. As a consequence, more complex instruments -- including any credit or interest rate dependent products -- are not covered. Finite difference methods are also not presented. But the design tools described are equally applicable to these areas.

Bottom line: "C++ Design Patterns and Derivatives Pricing" is a good addition to your quant library. "

Rico Blaser


It is, however, a very good book for someone already working in the finance industry who doesn’t have a lot of free time and doesn’t want to learn things that are probably not relevant. C++ has many features, and there are many ways of combining them to develop good codes. Although Joshi’s treatment of design tools is not exhaustive, enough is provided so that the reader develops a sense of how to use them. The book does not focus on syntactical rules, but rather on when to use the language features that can be useful in financial applications. Many books on C++ are very large and cover much material that is not important to a quant. This book, although it is quite short, does cover a significant amount of material and does deal with some fairly advanced topics that are important to practitioners. The real strength of the book is its clarity and conciseness. It is because Joshi writes so well that the reader may wish he had covered more. Joshi has written another book, The Concepts and Practice of Mathematical Finance, where he covers the finance topics that aren’t covered in this book. At least one of us plans to buy that book

Anita Mayo, SIAM Review




Back to www.markjoshi.com


cover