4
$\begingroup$

I am trying to find a book for our study group that teaches the bare minimum C++ needed for financial applications. I am trying to teach it in a project based manner. In case, I don't settle on one book, I will have to mix different books and online resources eg. quantlib.

Any suggestions on books and online resources (eg. online course with assignments) of that spirit?

->Duffy's book "introduction to C++ for financial engineers" could have been a trully great book because in spirit it teaches and implements the bare minimum C++ material needed for financial applications.

However, as you may know already it is disappointing: a) code is full of bugs, b) the explanations are confusing for beginners and c)occasionaly the code is bad (eg. using goto).

->Joshi's OOP book, is very good with smart and neat code; however, one must be already mature in C++ before doing the problems.

->Schlogl's OOP book has very neat code and exercises and it is a good precursor to Joshi's. However, it requires knowledge up to C++ templates.

$\endgroup$
  • $\begingroup$ I am firmly of the belief that it is better to start with a generalist C++ book. e.g. Deitel or Deitel. or see the detailed list on markjoshi.com . My book requires novice level skills in C++ so is not suitable for a beginner, but certainly does not require you to be an expert. $\endgroup$ – Mark Joshi Apr 21 '16 at 6:09
  • 1
    $\begingroup$ Accelerated C++ is a good introduction book to c++, that offers a birds-eye view. It's condense, informative and contains a lot of sample code. It does not treat any scientific / financial applications though, so that should come from somewhere else. $\endgroup$ – Olaf Apr 21 '16 at 8:27
  • $\begingroup$ Here's a more comprehensive list of "good" c++ books. $\endgroup$ – Olaf Apr 21 '16 at 16:27
3
$\begingroup$

I don't think there is any good finance book for learning C++. The best C++ books are simply the generalist C++ books that you can see by searching "C++" on Amazon. There are many free C++ online courses, I'm sure you will find something on Coursea.

The best C++ book has to be The C++ Programming Language, by Bjarne Stroustrup. However, it's probably too hard for you learn for a course, although you will need to reach the level if you want to do anything with QuantLib.

Don't waste too much time on templates. Erik does it because he believes static binding would save some computation time (eg: no virtual function), and indeed this is how the high-frequency trading work. But you really don't need to know.

PS: You've left out Modelling Derivatives in C++. This is the most complete C++ finance book you'll find, however, the quality is not very good. I returned the book to the library the next day as there were too many coding errors. Try to borrow it from Library to see if you like it,

$\endgroup$
  • 3
    $\begingroup$ Long time ago, I bought the book "Modelling Derivatives in C++". But after I saw a piece of code for declaring an array with "new" while without "delete" it, I immediately threw it away. $\endgroup$ – Gordon Apr 21 '16 at 14:20
  • $\begingroup$ In his course, Stroustrup uses his new book Programming: Principles and Practice Using C++. It's explicitly meant to be a learning text. The C++ Programming Language is more of a summa of the language. $\endgroup$ – Luigi Ballabio Jun 21 '16 at 6:32
  • $\begingroup$ Also, "you don't need to know [templates]" is a bit strong. You don't need template metaprogramming, that's for sure; but one way or the other, you'll find templates in any codebase. $\endgroup$ – Luigi Ballabio Jun 21 '16 at 13:04
  • $\begingroup$ @LuigiBallabio Template is extensively used in QuantLib, but not like every Quant project... $\endgroup$ – SmallChess Jun 23 '16 at 4:03
  • $\begingroup$ Agreed. You won't need to know them enough to write the STL; just enough to use it. $\endgroup$ – Luigi Ballabio Jun 23 '16 at 5:20
3
$\begingroup$

I agree with Student T regarding a lack of texts that will teach C++ specifically geared towards finance, and I would also say that isn't the best way to learn the language anyway.

I taught a C++ course for graduate students for several years when I was doing a post-doc. The intent of the course was to quickly get engineering graduate students with some programming experience (basic Matlab, VBA, etc..) up and running with C++ for research work. Ultimately, the text I ended up using (quite successfully) was Accelerated C++: Practical Programming By Example by Koenig and Moo, alongside Stroustrup's The C++ programming language as a reference. Accelerated C++ is brief, concise, yet pretty comprehensive, and goes into a lot of why you want to do things the C++ way.

$\endgroup$
1
$\begingroup$

May I suggest you have a look at my book Modern Computational Finance with Wiley? It is written in the spirit of Duffy and Joshi but in modern C++ with a focus on parallel computing and automatic adjoint differentiation (AAD)?

https://medium.com/@antoine_savine/modern-computational-finance-aad-and-parallel-simulations-c8cd42e7ad6e

Antoine Savine

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.