Financial instrument pricing using C++

Getting into the lucrative parts of coding

Build a business case: developing custom apps

Book review C++ is the most used language in that most lucrative of fields: financial engineering. Yet most of the people who use it for derivatives have no formal training in programming, and often use C++ as little more than C, or even as a mutant form of Fortran. The results are not always pretty.

Duffy tries to show how modern OO and pattern directed development could produce more robust code - that still runs fast. To that end, he doesn’t cop out by solving all “hard” problems by Monte Carlo simulation and, given that this sort of work is mostly structured number crunching, he adds to his coverage: STL, XML, Excel interfacing and patterns; as well as a good treatment of the underlying maths. That’s broader than most programming books even attempt and this means that the coverage of things like STL and UML are shallower than they’d be in a dedicated book. Nevertheless, if all you’re going to be doing is pricing basket options, then this focus probably suits you.

This book is aimed at those with at least undergraduate maths, so it first refreshes basic stats, calculus and linear algebra before getting to the real meat: numerical solutions to partial and stochastic differential equations (see here for some notes on the techniques mentioned below). Starting with the standard Euler scheme for discretisation, Duffy shows how this is hopelessly bad in the Black Scholes (BS) framework; and moves quickly into more appropriate fitting schemes, through Richardson and the more widely used predictor-corrector. As this is basically a cookbook, there’s not a lot of formal proof, although the code does allow you to compare the quality of the output of the methods described.

The more efficient methods tend to require the repeated solution of systems of equations, and Duffy skips lightly over the Cryer scheme brought to finance by Wilmott. A little more hand holding in this area would have added greatly to the value of the book. But the application of this set of techniques to BS is rather good, bringing in Crank Nicolson with its limitations; and showing how ADI et al can mitigate most of the issues, albeit at the cost of more complexity. The section on exotics is again too brief, but gives good tips on getting started.

There’s also an XML section, for no good reason that I can think of [fashion? Ed]; although it competently manages to link the relevant ideas into financial data even though hardly any quants get their data in that form as yet. The more common way of getting data is through Excel, and Duffy covers COM in enough depth that you can cook up your own interface relatively quickly.

In this it goes rather further and deeper than Bourg’s Excel book (see my review here), and thus it’s not really ideal for a beginner; but it’s refreshing to see someone go beyond yet another “…for dummies” level book.

Financial Instrument Pricing Using C++

Verdict: Duffy’s book is far from ideal as your first book on programming in mathematical finance (Wilmott, Joshi and Stroustrup cover that) but in today’s market, it is easily the best book to read after them.

Author: Daniel Duffy

Publisher: John Wiley & Son

ISBN: 0470855096

Media: Book

Buy this book at Cash & Carrion!

Gartner critical capabilities for enterprise endpoint backup

More from The Register

next story
'Stop dissing Google or quit': OK, I quit, says Code Club co-founder
And now a message from our sponsors: 'STFU or else'
Why has the web gone to hell? Market chaos and HUMAN NATURE
Tim Berners-Lee isn't happy, but we should be
Microsoft boots 1,500 dodgy apps from the Windows Store
DEVELOPERS! DEVELOPERS! DEVELOPERS! Naughty, misleading developers!
Apple promises to lift Curse of the Drained iPhone 5 Battery
Have you tried turning it off and...? Never mind, here's a replacement
Mozilla's 'Tiles' ads debut in new Firefox nightlies
You can try turning them off and on again
Uber, Lyft and cutting corners: The true face of the Sharing Economy
Casual labour and tired ideas = not really web-tastic
Linux turns 23 and Linus Torvalds celebrates as only he can
No, not with swearing, but by controlling the release cycle
Scratched PC-dispatch patch patched, hatched in batch rematch
Windows security update fixed after triggering blue screens (and screams) of death
prev story


Top 10 endpoint backup mistakes
Avoid the ten endpoint backup mistakes to ensure that your critical corporate data is protected and end user productivity is improved.
Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
Backing up distributed data
Eliminating the redundant use of bandwidth and storage capacity and application consolidation in the modern data center.
The essential guide to IT transformation
ServiceNow discusses three IT transformations that can help CIOs automate IT services to transform IT and the enterprise
Next gen security for virtualised datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.